Skip to content

Commit

Permalink
Support for $CFG->sessioncookiepath
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Mar 28, 2006
1 parent 9869134 commit 1ae655b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/defaults.php
Expand Up @@ -87,6 +87,7 @@
'runclamonupload' => 0,
'secureforms' => false,
'sessioncookie' => '',
'sessioncookiepath' => '/',
'sessiontimeout' => 7200,
'showsiteparticipantslist' => 0,
'showblocksonmodpages' => 0,
Expand Down
6 changes: 3 additions & 3 deletions lib/moodlelib.php
Expand Up @@ -1467,7 +1467,7 @@ function require_logout() {
session_unregister("SESSION");
}

setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, $CFG->sessioncookiepath);
unset($_SESSION['USER']);
unset($_SESSION['SESSION']);

Expand Down Expand Up @@ -6940,8 +6940,8 @@ function report_session_error() {
}
moodle_setlocale();
//clear session cookies
setcookie('MoodleSession'.$CFG->sessioncookie, '', time() - 3600, '/');
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');
setcookie('MoodleSession'.$CFG->sessioncookie, '', time() - 3600, $CFG->sessioncookiepath);
setcookie('MoodleSessionTest'.$CFG->sessioncookie, '', time() - 3600, $CFG->sessioncookiepath);
//increment database error counters
if (isset($CFG->session_error_counter)) {
set_config('session_error_counter', 1 + $CFG->session_error_counter);
Expand Down
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)

$version = 2006032200; // YYYYMMDD = date
$version = 2006032800; // YYYYMMDD = date
// XY = increments within a single day

$release = '1.6 development'; // Human-friendly version name
Expand Down

0 comments on commit 1ae655b

Please sign in to comment.