From: Alexandre Emsenhuber Date: Mon, 11 Aug 2008 16:24:51 +0000 (+0000) Subject: (bug 15101) Displaying only bots edits in Special:Recentchanges now works again X-Git-Tag: 1.31.0-rc.0~45951 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=a204de99e5a5d95aac725b2f1e7e30298dd24d48;p=lhc%2Fweb%2Fwiklou.git (bug 15101) Displaying only bots edits in Special:Recentchanges now works again --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 93af1d6bf5..e6f94c0d89 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -87,19 +87,22 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN Patch by Max Semenik. * (bug 15055) Talk page notifications no longer attempt to send mail when user's e-mail address is invalid or unconfirmed -* (bug 12370) Add throttle on password attempts. Defaults to max 5 attempts in 5 minutes. -* (bug 15016) 'Templates used on this page' list in view source should be wrapped - in a div with class "templatesUsed" +* (bug 12370) Add throttle on password attempts. Defaults to max 5 attempts in 5 + minutes. +* (bug 15016) 'Templates used on this page' list in view source should be + wrapped in a div with class "templatesUsed" * (bug 14868) Setting $wgFeedDiffCutoff to 0 now disables generation of the diff entirely, not just the display of it. * (bug 6387) Introduced new setting $wgCategoryPrefixedDefaultSortkey which allows having the unprefixed page title as the default category sortkey -* (bug 15079) Add class="ns-talk" / "ns-subject" to . Also added ns-special to - special pages. +* (bug 15079) Add class="ns-talk" / "ns-subject" to . Also added + ns-special to special pages. * (bug 15052) Skins should add their name as a class in * (bug 14165, bug 14294) Wikimedia specific configuration in convertGrammar() for several languages was removed. The settings have been put in extension WikimediaMessages. Patch for Czech by Danny B. +* (bug 15101) Displaying only bots edits in Special:Recentchanges now works + again === API changes in 1.14 === diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 2afacc80fe..4f43c8e0f9 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -572,8 +572,9 @@ class SpecialRecentChanges extends SpecialPage { function makeOptionsLink( $title, $override, $options, $active = false ) { global $wgUser; $sk = $wgUser->getSkin(); - return $sk->makeKnownLinkObj( $this->getTitle(), htmlspecialchars( $title ), - wfArrayToCGI( $override, $options ), '', '', $active ? 'style="font-weight: bold;"' : '' ); + $params = wfArrayMerge( $options, $override ); + return $sk->link( $this->getTitle(), htmlspecialchars( $title ), + ( $active ? array( 'style'=>'font-weight: bold;' ) : array() ), $params, array( 'known' ) ); } /** @@ -601,28 +602,28 @@ class SpecialRecentChanges extends SpecialPage { # Sort data for display and make sure it's unique after we've added user data. $wgRCLinkLimits[] = $options['limit']; $wgRCLinkDays[] = $options['days']; - sort($wgRCLinkLimits); - sort($wgRCLinkDays); - $wgRCLinkLimits = array_unique($wgRCLinkLimits); - $wgRCLinkDays = array_unique($wgRCLinkDays); + sort( $wgRCLinkLimits ); + sort( $wgRCLinkDays ); + $wgRCLinkLimits = array_unique( $wgRCLinkLimits ); + $wgRCLinkDays = array_unique( $wgRCLinkDays ); // limit links foreach( $wgRCLinkLimits as $value ) { $cl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ), array( 'limit' => $value ), $nondefaults, $value == $options['limit'] ) ; } - $cl = implode( ' | ', $cl); + $cl = implode( ' | ', $cl ); // day links, reset 'from' to none foreach( $wgRCLinkDays as $value ) { $dl[] = $this->makeOptionsLink( $wgLang->formatNum( $value ), array( 'days' => $value, 'from' => '' ), $nondefaults, $value == $options['days'] ) ; } - $dl = implode( ' | ', $dl); + $dl = implode( ' | ', $dl ); // show/hide links - $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' )); + $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) ); $minorLink = $this->makeOptionsLink( $showhide[1-$options['hideminor']], array( 'hideminor' => 1-$options['hideminor'] ), $nondefaults); $botLink = $this->makeOptionsLink( $showhide[1-$options['hidebots']], @@ -647,11 +648,11 @@ class SpecialRecentChanges extends SpecialPage { // show from this onward link $now = $wgLang->timeanddate( wfTimestampNow(), true ); - $tl = $this->makeOptionsLink( $now, array( 'from' => wfTimestampNow()), $nondefaults ); + $tl = $this->makeOptionsLink( $now, array( 'from' => wfTimestampNow() ), $nondefaults ); - $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter'), + $rclinks = wfMsgExt( 'rclinks', array( 'parseinline', 'replaceafter' ), $cl, $dl, $hl ); - $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter'), $tl ); + $rclistfrom = wfMsgExt( 'rclistfrom', array( 'parseinline', 'replaceafter' ), $tl ); return "$note
$rclinks
$rclistfrom"; } }