Fix scope.
authorJan Schneider <jan@horde.org>
Fri, 5 Nov 2010 17:47:43 +0000 (18:47 +0100)
committerJan Schneider <jan@horde.org>
Mon, 8 Nov 2010 12:34:53 +0000 (13:34 +0100)
horde/admin/config/index.php

index 01ac685..f764cbf 100644 (file)
@@ -30,7 +30,7 @@ function _uploadFTP($params)
 
     /* Loop through the config and write to FTP. */
     $no_errors = true;
-    foreach ($session->get('horde', 'config/') as $app => $config) {
+    foreach ($GLOBALS['session']->get('horde', 'config/') as $app => $config) {
         $path = $registry->get('fileroot', $app) . '/config';
         /* Try to back up the current conf.php. */
         if ($vfs->exists($path, 'conf.php')) {
@@ -45,7 +45,7 @@ function _uploadFTP($params)
         try {
             $vfs->writeData($path, 'conf.php', $config);
             $notification->push(sprintf(_("Successfully wrote %s"), Horde_Util::realPath($path . '/conf.php')), 'horde.success');
-            $session->remove('horde', 'config/' . $app);
+            $GLOBALS['session']->remove('horde', 'config/' . $app);
         } catch (VFS_Exception $e) {
             $no_errors = false;
             $notification->push(sprintf(_("Could not write configuration for \"%s\": %s"), $app, $e->getMessage()), 'horde.error');