summaryrefslogtreecommitdiffstats
path: root/lib/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/template.php')
-rw-r--r--lib/template.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/template.php b/lib/template.php
index 2f535335648..9467dedb62a 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -246,14 +246,14 @@ class OC_Template{
// if the formfactor is not yet autodetected do the
// autodetection now. For possible formfactors check the
// detectFormfactor documentation
- if(!isset($_SESSION['formfactor'])) {
- $_SESSION['formfactor'] = self::detectFormfactor();
+ if (!\OC::$session->exists('formfactor')) {
+ \OC::$session->set('formfactor', self::detectFormfactor());
}
// allow manual override via GET parameter
if(isset($_GET['formfactor'])) {
- $_SESSION['formfactor']=$_GET['formfactor'];
+ \OC::$session->set('formfactor', $_GET['formfactor']);
}
- $formfactor=$_SESSION['formfactor'];
+ $formfactor = \OC::$session->get('formfactor');
if($formfactor=='default') {
$fext='';
}elseif($formfactor=='mobile') {