(bug 36524) "Show" options are now remembered between successive clicks.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Mon, 16 Jul 2012 08:45:27 +0000 (10:45 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 14 Aug 2012 10:36:00 +0000 (12:36 +0200)
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
includes/specials/SpecialRecentchanges.php

index aecc2a4..7239db0 100644 (file)
@@ -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.
index bb384d4..ec8f93b 100644 (file)
@@ -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 = '<strong>' . $text . '</strong>';