Index: trunk/phase3/includes/User.php |
— | — | @@ -1346,22 +1346,22 @@ |
1347 | 1347 | } |
1348 | 1348 | |
1349 | 1349 | function setCookies() { |
1350 | | - global $wgCookieExpiration, $wgCookiePath, $wgCookieDomain, $wgCookieSecure, $wgDBname; |
| 1350 | + global $wgCookieExpiration, $wgCookiePath, $wgCookieDomain, $wgCookieSecure, $wgCookiePrefix; |
1351 | 1351 | if ( 0 == $this->mId ) return; |
1352 | 1352 | $this->loadFromDatabase(); |
1353 | 1353 | $exp = time() + $wgCookieExpiration; |
1354 | 1354 | |
1355 | 1355 | $_SESSION['wsUserID'] = $this->mId; |
1356 | | - setcookie( $wgDBname.'UserID', $this->mId, $exp, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
| 1356 | + setcookie( $wgCookiePrefix.'UserID', $this->mId, $exp, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
1357 | 1357 | |
1358 | 1358 | $_SESSION['wsUserName'] = $this->getName(); |
1359 | | - setcookie( $wgDBname.'UserName', $this->getName(), $exp, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
| 1359 | + setcookie( $wgCookiePrefix.'UserName', $this->getName(), $exp, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
1360 | 1360 | |
1361 | 1361 | $_SESSION['wsToken'] = $this->mToken; |
1362 | 1362 | if ( 1 == $this->getOption( 'rememberpassword' ) ) { |
1363 | | - setcookie( $wgDBname.'Token', $this->mToken, $exp, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
| 1363 | + setcookie( $wgCookiePrefix.'Token', $this->mToken, $exp, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
1364 | 1364 | } else { |
1365 | | - setcookie( $wgDBname.'Token', '', time() - 3600 ); |
| 1365 | + setcookie( $wgCookiePrefix.'Token', '', time() - 3600 ); |
1366 | 1366 | } |
1367 | 1367 | } |
1368 | 1368 | |
— | — | @@ -1370,17 +1370,17 @@ |
1371 | 1371 | * It will clean the session cookie |
1372 | 1372 | */ |
1373 | 1373 | function logout() { |
1374 | | - global $wgCookiePath, $wgCookieDomain, $wgCookieSecure, $wgDBname; |
| 1374 | + global $wgCookiePath, $wgCookieDomain, $wgCookieSecure, $wgCookiePrefix; |
1375 | 1375 | $this->loadDefaults(); |
1376 | 1376 | $this->setLoaded( true ); |
1377 | 1377 | |
1378 | 1378 | $_SESSION['wsUserID'] = 0; |
1379 | 1379 | |
1380 | | - setcookie( $wgDBname.'UserID', '', time() - 3600, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
1381 | | - setcookie( $wgDBname.'Token', '', time() - 3600, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
| 1380 | + setcookie( $wgCookiePrefix.'UserID', '', time() - 3600, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
| 1381 | + setcookie( $wgCookiePrefix.'Token', '', time() - 3600, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
1382 | 1382 | |
1383 | 1383 | # Remember when user logged out, to prevent seeing cached pages |
1384 | | - setcookie( $wgDBname.'LoggedOut', wfTimestampNow(), time() + 86400, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
| 1384 | + setcookie( $wgCookiePrefix.'LoggedOut', wfTimestampNow(), time() + 86400, $wgCookiePath, $wgCookieDomain, $wgCookieSecure ); |
1385 | 1385 | } |
1386 | 1386 | |
1387 | 1387 | /** |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -731,7 +731,9 @@ |
732 | 732 | enable it. |
733 | 733 | * (bug 5277) Use audio/midi rather that audio/mid |
734 | 734 | * (bug 5410) Use namespace name when a custom namespace's nstab-NS message is nonexistent |
| 735 | +* (bug 5432) Fix inconsistencies in cookie names when using table prefixes |
735 | 736 | |
| 737 | + |
736 | 738 | === Caveats === |
737 | 739 | |
738 | 740 | Some output, particularly involving user-supplied inline HTML, may not |