Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$_SESSION['DefaultTheme'] is never initialized
03-25-2014, 03:39 AM,
#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'].
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)