Fixed $USER and $SESSION to be pointers to the real $_SESSION

variables, so there's no longer a need for save_session  (thanks,Petri)
This commit is contained in:
moodler
2003-02-27 02:38:55 +00:00
parent 4e94d2608b
commit 08c17336a7
3 changed files with 9 additions and 20 deletions
+9 -4
View File
@@ -134,9 +134,15 @@
class object {};
@session_start();
if (! isset($_SESSION["SESSION"])) { $_SESSION["SESSION"] = new object; }
if (! isset($_SESSION["USER"])) { $_SESSION["USER"] = new object; }
extract($_SESSION); // Makes $SESSION and $USER available for read-only access
if (! isset($_SESSION['SESSION'])) {
$_SESSION['SESSION'] = new object;
}
if (! isset($_SESSION['USER'])) {
$_SESSION['USER'] = new object;
}
$SESSION = &$_SESSION['SESSION']; // Makes them easier to reference
$USER = &$_SESSION['USER'];
if (isset($FULLME)) {
$ME = $FULLME;
@@ -159,7 +165,6 @@
if (isset($lang)) {
$SESSION->lang = $lang;
save_session("SESSION");
}
if (!empty($SESSION->lang) and ($SESSION->lang != $CFG->lang) ) {