From bb8721aaeb4961f0dee8ca250749906e01a8f6a8 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 03 Jun 2010 04:02:12 -0400
Subject: [PATCH] - Support dynamic hostname (%d/%n) variables in configuration options (#1485438)

---
 program/include/rcmail.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 652dbd0..20b7bf7 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -575,7 +575,7 @@
       if (!$allowed)
         return false;
       }
-    else if (!empty($config['default_host']) && $host != $config['default_host'])
+    else if (!empty($config['default_host']) && $host != rcube_parse_host($config['default_host']))
       return false;
 
     // parse $host URL
@@ -743,7 +743,7 @@
       $host = get_input_value('_host', RCUBE_INPUT_POST);
     }
     else
-      $host = $default_host;
+      $host = rcube_parse_host($default_host);
 
     return $host;
   }

--
Gitblit v1.9.1