Clean up user-defined registry entries.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 3 Feb 2010 06:35:17 +0000 (23:35 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 3 Feb 2010 06:50:48 +0000 (23:50 -0700)
framework/Core/lib/Horde/Registry.php

index 4e47287..9b64343 100644 (file)
@@ -393,11 +393,17 @@ class Horde_Registry
                 continue;
             }
 
-            if (isset($app['fileroot']) &&
-                (!file_exists($app['fileroot']) ||
-                 (file_exists($app['fileroot'] . '/config/conf.xml') &&
-                  !file_exists($app['fileroot'] . '/config/conf.php')))) {
-                $app['status'] = 'inactive';
+            if (isset($app['fileroot'])) {
+                $app['fileroot'] = rtrim($app['fileroot'], ' /');
+                if (!file_exists($app['fileroot']) ||
+                    (file_exists($app['fileroot'] . '/config/conf.xml') &&
+                    !file_exists($app['fileroot'] . '/config/conf.php'))) {
+                    $app['status'] = 'inactive';
+                }
+            }
+
+            if (isset($app['webroot'])) {
+                $app['webroot'] = rtrim($app['webroot'], ' /');
             }
 
             if (($app['status'] != 'inactive') &&