diff options
author | Chad Horohoe <demon@users.mediawiki.org> | 2008-08-18 19:57:01 +0000 |
---|---|---|
committer | Chad Horohoe <demon@users.mediawiki.org> | 2008-08-18 19:57:01 +0000 |
commit | 88ba444d0dbe61afe3179c0aee3ea52831109e0b (patch) | |
tree | ede9a55704753b45da685cf45296279f1c1bc9d5 | |
parent | 7fb9ffba7e18521d903bb9aed24cc59900634ca3 (diff) | |
download | mediawikicore-88ba444d0dbe61afe3179c0aee3ea52831109e0b.tar.gz mediawikicore-88ba444d0dbe61afe3179c0aee3ea52831109e0b.zip |
Remove boneheaded config var $wgEnablePersistentCookies. Setting the default expiration to 0 now makes the cookies session-only (seeing as it was largely ignored)
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/39607
-rw-r--r-- | RELEASE-NOTES | 2 | ||||
-rw-r--r-- | includes/DefaultSettings.php | 8 | ||||
-rw-r--r-- | includes/WebResponse.php | 6 |
3 files changed, 4 insertions, 12 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 20784439f07e..c081abf7e6fa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 692e1ff8024a..020c1afa3d16 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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 @@ -1557,11 +1560,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. */ diff --git a/includes/WebResponse.php b/includes/WebResponse.php index 5ebc69976438..b667e9ff02f5 100644 --- a/includes/WebResponse.php +++ b/includes/WebResponse.php @@ -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(); |