Merge pull request #7710 from MrPetovan/task/rework-theme-session-vars

Rework theme session variables
This commit is contained in:
Philipp 2019-10-07 18:17:29 +02:00 committed by GitHub
commit 5f80180b47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 119 additions and 140 deletions

View file

@ -20,6 +20,7 @@ use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Protocol\Diaspora;
@ -189,11 +190,10 @@ class Profile
$a->page['title'] = $a->profile['name'] . ' @ ' . Config::get('config', 'sitename');
if (!$profiledata && !PConfig::get(local_user(), 'system', 'always_my_theme')) {
$_SESSION['theme'] = $a->profile['theme'];
$a->setCurrentTheme($a->profile['theme']);
$a->setCurrentMobileTheme($a->profile['mobile-theme']);
}
$_SESSION['mobile-theme'] = $a->profile['mobile-theme'];
/*
* load/reload current theme info
*/