r39607 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39606‎ | r39607 | r39608 >
Date:19:57, 18 August 2008
Author:demon
Status:old
Tags:
Comment:
Remove boneheaded config var $wgEnablePersistentCookies. Setting the default expiration to 0 now makes the cookies session-only (seeing as it was largely ignored)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/WebResponse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -1470,6 +1470,9 @@
14711471 * view for watched pages with new changes */
14721472 $wgShowUpdatedMarker = true;
14731473
 1474+/**
 1475+ * Default cookie expiration time. Setting to 0 disables makes all cookies session-only.
 1476+ */
14741477 $wgCookieExpiration = 30*86400;
14751478
14761479 /** Clock skew or the one-second resolution of time() can occasionally cause cache
@@ -1557,11 +1560,6 @@
15581561 $wgCookieHttpOnly = version_compare("5.2", PHP_VERSION, "<");
15591562
15601563 /**
1561 - * Allow MediaWiki to set persistent cookies for login, etc.
1562 - */
1563 -$wgEnablePersistentCookies = true;
1564 -
1565 -/**
15661564 * If the requesting browser matches a regex in this blacklist, we won't
15671565 * send it cookies with HttpOnly mode, even if $wgCookieHttpOnly is on.
15681566 */
Index: trunk/phase3/includes/WebResponse.php
@@ -12,13 +12,9 @@
1313
1414 /** Set the browser cookie */
1515 function setcookie( $name, $value, $expire = 0 ) {
16 - global $wgEnablePersistentCookies;
17 - if ( !$wgEnablePersistentCookies ) {
18 - return false;
19 - }
2016 global $wgCookiePath, $wgCookiePrefix, $wgCookieDomain;
2117 global $wgCookieSecure,$wgCookieExpiration, $wgCookieHttpOnly;
22 - if( $expire == 0 ) {
 18+ if ( $expire == 0 ) {
2319 $expire = time() + $wgCookieExpiration;
2420 }
2521 $httpOnlySafe = wfHttpOnlySafe();
Index: trunk/phase3/RELEASE-NOTES
@@ -34,8 +34,6 @@
3535 $wgAddGroups and $wgRemoveGroups, where the user must belong to a specified
3636 group in order to add or remove those groups from themselves.
3737 Backwards compatibility is maintained.
38 -* $wgEnablePersistentCookies has been added. Setting to false disables the
39 - setting of persistent cookies. Defaults to true.
4038 * $wgRestrictDisplayTitle controls if the use of the {{DISPLAYTITLE}} magic
4139 word is restricted to titles equivalent to the actual page title. This
4240 is true per default, but can be set to false to allow any title.

Status & tagging log