diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-07-16 19:40:22 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-29 10:22:21 +0200 |
commit | f551917a3ca2cedf748337646ed4b1d398ac8437 (patch) | |
tree | eccf53eb77c44019ef59e90c41af43297993ddf9 /lib/private/template.php | |
parent | ed2424c3822a3470065788ff113a3807d24d80dc (diff) | |
download | nextcloud-server-f551917a3ca2cedf748337646ed4b1d398ac8437.tar.gz nextcloud-server-f551917a3ca2cedf748337646ed4b1d398ac8437.zip |
kill OC::$session
maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession
restore order os OC::$session and OC::$CLI
remove unneded initialization of dummy session
write back session when $useCustomSession is true
log warning when deprecated app is used
Diffstat (limited to 'lib/private/template.php')
-rw-r--r-- | lib/private/template.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/template.php b/lib/private/template.php index 173345cc001..d6afe1a3e40 100644 --- a/lib/private/template.php +++ b/lib/private/template.php @@ -52,7 +52,7 @@ class OC_Template extends \OC\Template\Base { // Read the detected formfactor and use the right file name. $fext = self::getFormFactorExtension(); - $requesttoken = OC::$session ? OC_Util::callRegister() : ''; + $requesttoken = OC::$server->getSession() ? OC_Util::callRegister() : ''; $parts = explode('/', $app); // fix translation when app is something like core/lostpassword $l10n = OC_L10N::get($parts[0]); @@ -101,20 +101,20 @@ class OC_Template extends \OC\Template\Base { */ static public function getFormFactorExtension() { - if (!\OC::$session) { + if (!\OC::$server->getSession()) { return ''; } // if the formfactor is not yet autodetected do the // autodetection now. For possible formfactors check the // detectFormfactor documentation - if (!\OC::$session->exists('formfactor')) { - \OC::$session->set('formfactor', self::detectFormfactor()); + if (!\OC::$server->getSession()->exists('formfactor')) { + \OC::$server->getSession()->set('formfactor', self::detectFormfactor()); } // allow manual override via GET parameter if(isset($_GET['formfactor'])) { - \OC::$session->set('formfactor', $_GET['formfactor']); + \OC::$server->getSession()->set('formfactor', $_GET['formfactor']); } - $formfactor = \OC::$session->get('formfactor'); + $formfactor = \OC::$server->getSession()->get('formfactor'); if($formfactor==='default') { $fext=''; }elseif($formfactor==='mobile') { |