From 7454dadfcf4b55d8478dc57df8a49863a24b357a Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 16 Jul 2012 10:45:27 +0200 Subject: [PATCH] (bug 36524) "Show" options are now remembered between successive clicks. The problem is that $options in SpecialRecentChanges::makeOptionsLink() can that values set to false and wfArrayToCgi() omits such items; instead they have to be explicitely converted to "0" to not be omitted. Change-Id: I20af27fc4e012fec36d48b9120ec49a39f5cbb1f --- RELEASE-NOTES-1.20 | 8 +++++--- includes/specials/SpecialRecentchanges.php | 10 ++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index aecc2a4a26..7239db0752 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -108,10 +108,10 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * Added support in jquery.localize for placeholder attributes. * (bug 38151) Implemented mw.user.getRights for getting and caching the current user's user rights. -* Session storage can now configured independently of general object cache - storage, by using $wgSessionCacheType. $wgSessionsInMemcached has been +* Session storage can now configured independently of general object cache + storage, by using $wgSessionCacheType. $wgSessionsInMemcached has been renamed to $wgSessionsInObjectCache, with the old name retained for backwards - compatibility. When this feature is enabled, the expiry time can now be + compatibility. When this feature is enabled, the expiry time can now be configured with $wgObjectCacheSessionExpiry. * Added a Redis client for object caching. * Implemented mw.user.getGroups for getting and caching user groups. @@ -201,6 +201,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 38953) --memory-limit switch not working for runJobs.php. * (bug 33037) Make subpage of Special:newfiles control how many files are returned, like in previous versions. +* (bug 36524) "Show" options on Special:RecentChanges and Special:RecentChangesLinked + are now remembered between successive clicks. === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index bb384d415d..ec8f93b587 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -772,6 +772,16 @@ class SpecialRecentChanges extends IncludableSpecialPage { */ function makeOptionsLink( $title, $override, $options, $active = false ) { $params = $override + $options; + + // Bug 36524: false values have be converted to "0" otherwise + // wfArrayToCgi() will omit it them. + foreach ( $params as &$value ) { + if ( $value === false ) { + $value = '0'; + } + } + unset( $value ); + $text = htmlspecialchars( $title ); if ( $active ) { $text = '' . $text . ''; -- 2.20.1