Remove boneheaded config var $wgEnablePersistentCookies. Setting the default expirati...
authorChad Horohoe <demon@users.mediawiki.org>
Mon, 18 Aug 2008 19:57:01 +0000 (19:57 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Mon, 18 Aug 2008 19:57:01 +0000 (19:57 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/WebResponse.php

index 2078443..c081abf 100644 (file)
@@ -34,8 +34,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   $wgAddGroups and $wgRemoveGroups, where the user must belong to a specified
   group in order to add or remove those groups from themselves.
   Backwards compatibility is maintained.
-* $wgEnablePersistentCookies has been added. Setting to false disables the
-  setting of persistent cookies. Defaults to true.
 * $wgRestrictDisplayTitle controls if the use of the {{DISPLAYTITLE}} magic
   word is restricted to titles equivalent to the actual page title. This
   is true per default, but can be set to false to allow any title.
index 692e1ff..020c1af 100644 (file)
@@ -1470,6 +1470,9 @@ $wgRCChangedSizeThreshold                 = -500;
  * view for watched pages with new changes */
 $wgShowUpdatedMarker                           = true;
 
+/**
+ * Default cookie expiration time. Setting to 0 disables makes all cookies session-only.
+ */
 $wgCookieExpiration = 30*86400;
 
 /** Clock skew or the one-second resolution of time() can occasionally cause cache
@@ -1556,11 +1559,6 @@ $wgCookiePrefix = false;
  */
 $wgCookieHttpOnly = version_compare("5.2", PHP_VERSION, "<");
 
-/**
- * Allow MediaWiki to set persistent cookies for login, etc.
- */
-$wgEnablePersistentCookies = true;
-
 /**
  * If the requesting browser matches a regex in this blacklist, we won't
  * send it cookies with HttpOnly mode, even if $wgCookieHttpOnly is on.
index 5ebc699..b667e9f 100644 (file)
@@ -12,13 +12,9 @@ class WebResponse {
 
        /** Set the browser cookie */
        function setcookie( $name, $value, $expire = 0 ) {
-               global $wgEnablePersistentCookies;
-               if ( !$wgEnablePersistentCookies ) {
-                       return false;
-               }
                global $wgCookiePath, $wgCookiePrefix, $wgCookieDomain;
                global $wgCookieSecure,$wgCookieExpiration, $wgCookieHttpOnly;
-               if( $expire == 0 ) {
+               if ( $expire == 0 ) {
                        $expire = time() + $wgCookieExpiration;
                }
                $httpOnlySafe = wfHttpOnlySafe();