From df759e4fd7f79fe702a521256c7d0dfedd001c52 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 28 Jan 2010 15:09:07 -0700 Subject: [PATCH] Fix active sessions script --- .../Horde/SessionHandler/horde-active-sessions.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/framework/SessionHandler/scripts/Horde/SessionHandler/horde-active-sessions.php b/framework/SessionHandler/scripts/Horde/SessionHandler/horde-active-sessions.php index d8adadcbc..08306fc04 100755 --- a/framework/SessionHandler/scripts/Horde/SessionHandler/horde-active-sessions.php +++ b/framework/SessionHandler/scripts/Horde/SessionHandler/horde-active-sessions.php @@ -17,21 +17,21 @@ require_once $horde_base . '/lib/Application.php'; Horde_Registry::appInit('horde', array('authentication' => 'none', 'cli' => true)); $cli = Horde_Cli::singleton(); -/* Make sure there's no compression. */ -@ob_end_clean(); - /* Check for sessionhandler object. */ -if (empty($GLOBALS['horde_sessionhandler'])) { +$registry->setupSessionHandler(); +if (!$registry->sessionHandler) { throw new Horde_Exception('Horde is unable to load the session handler'); } -$type = !empty($conf['sessionhandler']['type']) ? - $conf['sessionhandler']['type'] : 'builtin'; +$type = !empty($conf['sessionhandler']['type']) + ? $conf['sessionhandler']['type'] + : 'builtin'; + if ($type == 'external') { - throw new Horde_Exception('Session counting is not supported in the \'external\' SessionHandler at this time.'); + throw new Horde_Exception('Session counting is not supported in the \'external\' SessionHandler.'); } -$sessions = $GLOBALS['horde_sessionhandler']->getSessionsInfo(); +$sessions = $registry->sessionHandler->getSessionsInfo(); if (($argc < 2) || (($argv[1] != '-l') && ($argv[1] != '-ll'))) { $cli->writeln(count($sessions)); -- 2.11.0