Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Disabled storing user preferences into the session data (refs #3727)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyfrosch committed Mar 17, 2013
1 parent c0fb455 commit f20a872
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/modules/AppKit/lib/database/models/NsmUser.php
Expand Up @@ -221,9 +221,9 @@ public function setPref($key, $val, $overwrite = true, $blob = false) {

AppKitLogger::warn("New: Setting %s => %s", $key,$pref->toArray(false) );
}
NsmUser::$cachedPreferences[$key] = array();
NsmUser::$cachedPreferences[$key] = $val;
$this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
// disabled storing cached prefs into session -mfrosch
//$this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
return true;
}

Expand Down Expand Up @@ -325,7 +325,8 @@ public function getPreferences($shortenBlob = false) {
if(!empty(self::$cachedPreferences)) {
return self::$cachedPreferences;
}
self::$cachedPreferences = $this->getStorage()->read("appkit.nsm_user.preferences");
// disabled storing cached prefs into session -mfrosch
//self::$cachedPreferences = $this->getStorage()->read("appkit.nsm_user.preferences");
if(!empty(self::$cachedPreferences)) {
return self::$cachedPreferences;
}
Expand All @@ -347,7 +348,8 @@ public function getPreferences($shortenBlob = false) {
}
}
self::$cachedPreferences = $out;
$this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
// disabled storing cached prefs into session -mfrosch
//$this->getStorage()->write("appkit.nsm_user.preferences",self::$cachedPreferences);
return $out;
}

Expand Down

0 comments on commit f20a872

Please sign in to comment.