From f4d06ebd47e45bbe2248d92a8b98cf1ee17fcd32 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 6 Oct 2019 12:08:15 -0400 Subject: [PATCH] Remove useless theme session variable deletions in modules --- mod/community.php | 8 -------- mod/search.php | 4 ---- mod/uimport.php | 8 -------- src/Module/Directory.php | 3 --- src/Module/Home.php | 8 -------- src/Module/Login.php | 3 --- src/Module/Register.php | 7 ------- 7 files changed, 41 deletions(-) diff --git a/mod/community.php b/mod/community.php index d29fa729dd..81857c6d3a 100644 --- a/mod/community.php +++ b/mod/community.php @@ -17,14 +17,6 @@ use Friendica\Database\DBA; use Friendica\Model\Item; use Friendica\Model\User; -function community_init(App $a) -{ - if (!local_user()) { - unset($_SESSION['theme']); - unset($_SESSION['mobile-theme']); - } -} - function community_content(App $a, $update = 0) { $o = ''; diff --git a/mod/search.php b/mod/search.php index 9ac5950224..b28ad7b0e9 100644 --- a/mod/search.php +++ b/mod/search.php @@ -76,10 +76,6 @@ function search_init(App $a) { } $a->page['aside'] .= search_saved_searches(); - - } else { - unset($_SESSION['theme']); - unset($_SESSION['mobile-theme']); } } diff --git a/mod/uimport.php b/mod/uimport.php index 22a3161559..436802265b 100644 --- a/mod/uimport.php +++ b/mod/uimport.php @@ -41,14 +41,6 @@ function uimport_content(App $a) } } - - if (!empty($_SESSION['theme'])) { - unset($_SESSION['theme']); - } - if (!empty($_SESSION['mobile-theme'])) { - unset($_SESSION['mobile-theme']); - } - $tpl = Renderer::getMarkupTemplate("uimport.tpl"); return Renderer::replaceMacros($tpl, [ '$regbutt' => L10n::t('Import'), diff --git a/src/Module/Directory.php b/src/Module/Directory.php index 7d75e4d477..1cdd971e8a 100644 --- a/src/Module/Directory.php +++ b/src/Module/Directory.php @@ -34,9 +34,6 @@ class Directory extends BaseModule if (local_user()) { $app->page['aside'] .= Widget::findPeople(); $app->page['aside'] .= Widget::follow(); - } else { - unset($_SESSION['theme']); - unset($_SESSION['mobile-theme']); } $output = ''; diff --git a/src/Module/Home.php b/src/Module/Home.php index 673701c28d..5a1dccde2a 100644 --- a/src/Module/Home.php +++ b/src/Module/Home.php @@ -14,14 +14,6 @@ class Home extends BaseModule { public static function content() { - if (!empty($_SESSION['theme'])) { - unset($_SESSION['theme']); - } - - if (!empty($_SESSION['mobile-theme'])) { - unset($_SESSION['mobile-theme']); - } - $app = self::getApp(); $config = $app->getConfig(); diff --git a/src/Module/Login.php b/src/Module/Login.php index 966ded57fa..40e376aeb1 100644 --- a/src/Module/Login.php +++ b/src/Module/Login.php @@ -32,9 +32,6 @@ class Login extends BaseModule { $a = self::getApp(); - Session::remove('theme'); - Session::remove('mobile-theme'); - if (local_user()) { $a->internalRedirect(); } diff --git a/src/Module/Register.php b/src/Module/Register.php index 51287053fd..1aabb84393 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -61,13 +61,6 @@ class Register extends BaseModule } } - if (!empty($_SESSION['theme'])) { - unset($_SESSION['theme']); - } - if (!empty($_SESSION['mobile-theme'])) { - unset($_SESSION['mobile-theme']); - } - $username = defaults($_REQUEST, 'username' , ''); $email = defaults($_REQUEST, 'email' , ''); $openid_url = defaults($_REQUEST, 'openid_url', ''); -- 2.39.5