Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$_SESSION['DefaultTheme'] is never initialized
03-24-2014, 10:34 PM (This post was last modified: 03-24-2014 10:48 PM by serakfalcon.)
Post: #1
$_SESSION['DefaultTheme'] is never initialized
While working on integrating the theme code into my Views project, I've come to find that while $_SESSION['DefaultTheme'] is referenced multiple times (line 245, CustLoginSetup.php,line 263, SuppLoginSetup.php, Lines 111 & 389, SystemParameters.php, line 625 WWW_Users.php, session.inc 199 & 200), however it is never actually initialized.

instead, $Theme is set to 'gel' if $_SESSION['Theme'] is not initialized (only applies to the login screen (line 99, session.inc) and, if the user logs in, the session is set according to what is saved in their preferences. At no point is $_SESSION['DefaultTheme'] set to a value.

Likely this error has gone unnoticed since $Theme and $_SESSION['Theme'] are always initialized to something.

Suggestion:
a) remove it entirely, it's confusing and doesn't do anything.
b) make it do what it's supposed to, aka represent the default system theme, in which case the login screen should reflect that. I don't see how it is really useful beyond that though.
OK so looking closer it should theoretically be set by GetConfig.php but for some reason it's not being set, and in any case isn't used for anything.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
$_SESSION['DefaultTheme'] is never initialized - serakfalcon - 03-24-2014 10:34 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)