*/
public function setIEVersion($ver)
{
- $_SESSION['horde_browser'] = array(
- 'ie_version' => $ver
- );
+ $GLOBALS['session']['horde:ie_version'] = $ver;
}
/**
*/
public function getIEVersion()
{
- return isset($_SESSION['horde_browser']['ie_version'])
- ? $_SESSION['horde_browser']['ie_version']
- : null;
+ return $GLOBALS['session']['horde:ie_version'];
}
}
try {
$this->_instances[$sig] = Horde_Prefs::factory($driver, $scope, $opts, $params);
} catch (Horde_Prefs_Exception $e) {
- if (empty($_SESSION['prefs_cache']['unavailable'])) {
- $_SESSION['prefs_cache']['unavailable'] = true;
+ if (!$GLOBALS['session']['horde:no_prefs']) {
+ $GLOBALS['session']['horde:no_prefs'] = true;
if (isset($GLOBALS['notification'])) {
$GLOBALS['notification']->push(_("The preferences backend is currently unavailable and your preferences have not been loaded. You may continue to use the system with default preferences."));
}
*/
public function getTasklistFromCache()
{
- if (isset($_SESSION['horde_logintasks'][$this->_app])) {
- return @unserialize($_SESSION['horde_logintasks'][$this->_app]);
- }
- return false;
+ global $session;
+
+ return isset($session['horde:logintasks/' . $this->_app])
+ ? @unserialize($session['horde:logintasks/' . $this->_app])
+ : false;
}
/**
*/
public function storeTasklistInCache($tasklist)
{
- $_SESSION['horde_logintasks'][$this->_app] = serialize($tasklist);
+ $GLOBALS['session']['horde:logintasks/' . $this->_app] = serialize($tasklist);
}
/**
*/
public function getTasks()
{
+ global $session;
+
$app_list = array($this->_app);
$tasks = array();
switch ($this->_app) {
case 'horde':
- if (isset($_SESSION['horde_logintasks']['horde'])) {
+ if (isset($session['horde:logintasks/horde'])) {
return $tasks;
}
break;
default:
- if (!isset($_SESSION['horde_logintasks']['horde'])) {
+ if (!isset($session['horde:logintasks/horde'])) {
array_unshift($app_list, 'horde');
}
break;
*/
public function markLastRun()
{
+ global $session;
+
$lasttasks = $this->getLastRun();
$lasttasks[$this->_app] = time();
if (($this->_app != 'horde') &&
- !isset($_SESSION['horde_logintasks']['horde'])) {
+ !isset($session['horde:logintasks/horde'])) {
$lasttasks['horde'] = time();
- $_SESSION['horde_logintasks']['horde'] = true;
+ $session['horde:logintasks/horde'] = true;
}
$this->setLastRun($lasttasks);
}
*/
public function clearCache()
{
- unset($_SESSION['_registry']);
+ unset($GLOBALS['session']['horde:registry/']);
$this->_saveCacheVar('api', true);
$this->_saveCacheVar('appcache', true);
}
}
} else {
$data = serialize($this->_cache[$name]);
- $_SESSION['_registry']['md5'][$name] = $md5sum = hash('md5', $data);
+ $GLOBALS['session']['horde:registry/' . $name] = $md5sum = hash('md5', $data);
$id = $this->_getCacheId($name, false) . '|' . $md5sum;
if ($ob->set($id, $data, 86400)) {
Horde::logMessage('Horde_Registry: stored ' . $name . ' with cache ID ' . $id, 'DEBUG');
if (!$md5) {
return $id;
- } elseif (isset($_SESSION['_registry']['md5'][$name])) {
- return $id . '|' . $_SESSION['_registry']['md5'][$name];
+ } elseif ($hash = $GLOBALS['session']['horde:registry/' . $name]) {
+ return $id . '|' . $hash;
}
return false;