Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$_SESSION['DefaultTheme'] is never initialized
03-25-2014, 03:39 AM
Post: #3
RE: $_SESSION['DefaultTheme'] is never initialized
Hey Tim,
yeah, $_SESSION['DefaultTheme'] not being set seems to have been my problem, regardless, in line 195-203 of session.inc:

Code:
If (isset($_POST['Theme']) AND ($_SESSION['UsersRealName'] == $_POST['RealName'])) {
    $_SESSION['Theme'] = $_POST['Theme'];
    $Theme = $_POST['Theme'];
} elseif (!isset($_SESSION['Theme'])) {
    $Theme = $_SESSION['DefaultTheme'];
    $_SESSION['Theme'] = $_SESSION['DefaultTheme'];

} else {
    $Theme = $_SESSION['Theme'];
}

The elseif will never happen because $_SESSION['Theme'] is always set prior- it's not possible to add a user without a theme, and the user settings are loaded before that statement runs. Basically the only time $_SESSION['DefaultTheme'] is used is on the WWW_Users.php & SystemParamaters.php page, to make sure the select box is set to the default.

likewise, on line 98,

Code:
$Theme = (isset($_SESSION['Theme'])) ? $_SESSION['Theme'] : 'gel';

Why gel? this could be a use for $_SESSION['DefaultTheme'].
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: $_SESSION['DefaultTheme'] is never initialized - serakfalcon - 03-25-2014 03:39 AM

Forum Jump:


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