Framework: fix loading vhost config files
authorBen Klang <ben@alkaloid.net>
Tue, 18 May 2010 19:08:07 +0000 (15:08 -0400)
committerBen Klang <ben@alkaloid.net>
Tue, 18 May 2010 19:08:07 +0000 (15:08 -0400)
framework/Core/lib/Horde/Registry.php

index 6177ff3..7014dca 100644 (file)
@@ -316,6 +316,16 @@ class Horde_Registry
             umask($conf['umask']);
         }
 
+        $vhost = null;
+        if (!empty($conf['vhosts'])) {
+            $vhost = HORDE_BASE . '/config/registry-' . $conf['server']['name'] . '.php';
+            if (file_exists($vhost)) {
+                $this->_regmtime = max($this->_regmtime, filemtime($vhost));
+            } else {
+                $vhost = null;
+            }
+        }
+
         /* Always need to load applications information. */
         $this->_loadApplicationsCache($vhost);
 
@@ -347,16 +357,6 @@ class Horde_Registry
         $this->_regmtime = max(filemtime(HORDE_BASE . '/config/registry.php'),
                                filemtime(HORDE_BASE . '/config/registry.d'));
 
-        $vhost = null;
-        if (!empty($conf['vhosts'])) {
-            $vhost = HORDE_BASE . '/config/registry-' . $conf['server']['name'] . '.php';
-            if (file_exists($vhost)) {
-                $this->_regmtime = max($this->_regmtime, filemtime($vhost));
-            } else {
-                $vhost = null;
-            }
-        }
-
         /* Stop system if Horde is inactive. */
         if ($this->applications['horde']['status'] == 'inactive') {
             throw new Horde_Exception(_("This system is currently deactivated."));