Changeset 691
- Timestamp:
- 11/05/06 05:46:27 (2 years ago)
- Files:
-
- devel/lib/elgglib.php (modified) (2 diffs)
- devel/lib/setup.php (modified) (3 diffs)
- devel/login/logout.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/lib/elgglib.php
r659 r691 355 355 356 356 //clear session cookies 357 setcookie('ElggSession'.$CFG->sessioncookie, '', time() - 3600, '/');358 setcookie('ElggSessionTest'.$CFG->sessioncookie, '', time() - 3600, '/');357 setcookie('ElggSession'.$CFG->sessioncookie, '', time() - 3600, $CFG->cookiepath); 358 setcookie('ElggSessionTest'.$CFG->sessioncookie, '', time() - 3600, $CFG->cookiepath); 359 359 //increment database error counters 360 360 if (isset($CFG->session_error_counter)) { … … 3536 3536 update_record('users',$user); 3537 3537 3538 setcookie(AUTH_COOKIE, $ticket, time()+AUTH_COOKIE_LENGTH, '/');3538 setcookie(AUTH_COOKIE, $ticket, time()+AUTH_COOKIE_LENGTH, $CFG->cookiepath); 3539 3539 global $messages; 3540 3540 $messages[] = __gettext("The system will remember you and automatically log you in next time."); devel/lib/setup.php
r653 r691 60 60 if (empty($CFG->disable_templatechanging)) { 61 61 $CFG->disable_templatechanging = false; 62 } 63 64 if (empty($CFG->cookiepath)) { 65 $pathcomponents = @parse_url($CFG->wwwroot); 66 if (!empty($pathcomponents['path'])) { 67 $CFG->cookiepath = $pathcomponents['path']; 68 } else { 69 $CFG->cookiepath = '/'; 70 } 71 unset($pathcomponents); 62 72 } 63 73 … … 257 267 } 258 268 269 // wtf? $noelggcookie is never set - Sven 259 270 if (!isset($noelggcookie)) { 260 271 session_name('ElggSession'.$CFG->sessioncookie); 272 ini_set("session.cookie_path", $CFG->cookiepath); 261 273 @session_start(); 262 274 if (! isset($_SESSION['SESSION'])) { … … 266 278 $_SESSION['SESSION']->has_timed_out = true; 267 279 } 268 setcookie('ElggSessionTest'.$CFG->sessioncookie, $_SESSION['SESSION']->session_test, 0, '/');280 setcookie('ElggSessionTest'.$CFG->sessioncookie, $_SESSION['SESSION']->session_test, 0, $CFG->cookiepath); 269 281 $_COOKIE['ElggSessionTest'.$CFG->sessioncookie] = $_SESSION['SESSION']->session_test; 270 282 } devel/login/logout.php
r269 r691 19 19 20 20 if (isset($_COOKIE[session_name()])) { 21 setcookie(session_name(), '', time()-84600, '/');21 setcookie(session_name(), '', time()-84600, $CFG->cookiepath); 22 22 } 23 23 24 24 // Remove the any AUTH_COOKIE persistent logins 25 setcookie(AUTH_COOKIE, '', time()-84600, '/');25 setcookie(AUTH_COOKIE, '', time()-84600, $CFG->cookiepath); 26 26 27 27 session_destroy();
