From: Rob Church Date: Tue, 4 Apr 2006 13:09:52 +0000 (+0000) Subject: (bug 5409) Hide "show/hide patrolled edits" in Special:Recentchanges if patrolling... X-Git-Tag: 1.6.0~27 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=dfc5d04d69c9e0defc65214969cef596f2c5bf0b;p=lhc%2Fweb%2Fwiklou.git (bug 5409) Hide "show/hide patrolled edits" in Special:Recentchanges if patrolling is disabled ...and it comes with free message adaptations for French and German, because I'm nice like that --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index db560094dc..ad164ff81a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -426,6 +426,8 @@ Special Pages: * (bug 2871) Links to talk pages in watchlist editing view * (bug 5385) Allow hiding anonymous edits on Special:Recentchanges * (bug 2544) Illogical error reporting order in Special:Userlogin +* (bug 5409) Hide "show/hide patrolled edits" in Special:Recentchanges if patrolling + is disabled Misc.: * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 6a40d0ce98..8668f4015a 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -143,7 +143,7 @@ function wfSpecialRecentchanges( $par, $specialPage ) { $hidem = $hideminor ? 'AND rc_minor = 0' : ''; $hidem .= $hidebots ? ' AND rc_bot = 0' : ''; $hidem .= $hideliu ? ' AND rc_user = 0' : ''; - $hidem .= $hidepatrolled ? ' AND rc_patrolled = 0' : ''; + $hidem .= ( $wgUseRCPatrol && $hidepatrolled ) ? ' AND rc_patrolled = 0' : ''; $hidem .= $hideanons ? ' AND rc_user != 0' : ''; if( $hidemyself ) { @@ -479,7 +479,7 @@ function makeOptionsLink( $title, $override, $options ) { * Creates the options panel */ function rcOptionsPanel( $defaults, $nondefaults ) { - global $wgLang; + global $wgLang, $wgUseRCPatrol; $options = $nondefaults + $defaults; @@ -522,8 +522,16 @@ function rcOptionsPanel( $defaults, $nondefaults ) { array( 'hidepatrolled' => 1-$options['hidepatrolled'] ), $nondefaults); $myselfLink = makeOptionsLink( $showhide[1-$options['hidemyself']], array( 'hidemyself' => 1-$options['hidemyself'] ), $nondefaults); - $hl = wfMsg( 'showhideminor', $minorLink, $botLink, $liuLink, $patrLink, $myselfLink, $anonsLink ); - + + $links[] = wfMsgHtml( 'rcshowhideminor', $minorLink ); + $links[] = wfMsgHtml( 'rcshowhidebots', $botLink ); + $links[] = wfMsgHtml( 'rcshowhideanons', $anonsLink ); + $links[] = wfMsgHtml( 'rcshowhideliu', $liuLink ); + if( $wgUseRCPatrol ) + $links[] = wfMsgHtml( 'rcshowhidepatr', $patrLink ); + $links[] = wfMsgHtml( 'rcshowhidemine', $myselfLink ); + $hl = implode( ' | ', $links ); + // show from this onward link $now = $wgLang->timeanddate( wfTimestampNow(), true ); $tl = makeOptionsLink( $now, array( 'from' => wfTimestampNow()), $nondefaults ); diff --git a/languages/Messages.php b/languages/Messages.php index e955572258..1f52d9410e 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -784,7 +784,12 @@ Unselected groups will not be changed. You can deselect a group with CTRL + Left 'rcnote' => "Below are the last $1 changes in last $2 days.", 'rcnotefrom' => "Below are the changes since $2 (up to $1 shown).", 'rclistfrom' => "Show new changes starting from $1", -'showhideminor' => "$1 minor edits | $2 bots | $3 logged in users | $6 anonymous users | $4 patrolled edits | $5 my edits", +'rcshowhideminor' => '$1 minor edits', +'rcshowhidebots' => '$1 bots', +'rcshowhideliu' => '$1 logged-in users', +'rcshowhideanons' => '$1 anonymous users', +'rcshowhidepatr' => '$1 patrolled edits', +'rcshowhidemine' => '$1 my edits', 'rclinks' => "Show last $1 changes in last $2 days
$3", 'rchide' => "in $4 form; $1 minor edits; $2 secondary namespaces; $3 multiple edits.", 'rcliu' => "; $1 edits from logged in users", diff --git a/languages/MessagesDe.php b/languages/MessagesDe.php index 95e981299e..a4df09d929 100644 --- a/languages/MessagesDe.php +++ b/languages/MessagesDe.php @@ -971,7 +971,12 @@ Diskussions-Seite nicht, da schon eine mit dem neuen Titel existiert. Bitte glei "thumbnail-more" => "vergrößern", "and" => "und", "rchide" => "in $4 form; $1 kleine Änderungen; $2 sekundäre Namensräume; $3 mehrfache Änderungen.", -"showhideminor" => "kleine Änderungen $1 | $2 bots | $3 logged in users | $4 patrolled edits", +'rcshowhideminor' => 'Kleine Änderungen $1', +'rcshowhidebots' => '$1 bots', +'rcshowhideliu' => 'Angemeldete Benutzer $1', +'rcshowhideanons' => '$1 anonymous users', +'rcshowhidepatr' => '$1 patrolled edits', +'rcshowhidemine' => 'Eigene Beiträge $1', "rcliu" => "$1 Änderungen durch eingeloggte Benutzer", "uploaddisabled" => "Entschuldigung, das Hochladen ist deaktiviert.", "deadendpages" => "Sackgassenartikel", diff --git a/languages/MessagesFr.php b/languages/MessagesFr.php index 758f4c3407..a596723937 100644 --- a/languages/MessagesFr.php +++ b/languages/MessagesFr.php @@ -496,7 +496,12 @@ $2 Inclure les page de redirections   Rechercher $3 $9', 'rcnote' => 'Voici les $1 dernières modifications effectuées au cours des $2 derniers jours.', 'rcnotefrom' => 'Voici les modifications effectuées depuis le $2 ($1 au maximum).', 'rclistfrom' => 'Afficher les nouvelles modifications depuis le $1.', -'showhideminor' => '$1 modifications mineures | $2 robots | $3 utilisateurs enregistrés | $4 patrolled edits', +'rcshowhideminor' => '$1 modifications mineures', +'rcshowhidebots' => '$1 robots', +'rcshowhideliu' => '$1 utilisateurs enregistrés', +'rcshowhideanons' => '$1 anonymous users', +'rcshowhidepatr' => '$1 patrolled edits', +'rcshowhidemine' => '$1 mes contributions', 'rclinks' => 'Afficher les $1 dernières modifications effectuées au cours des $2 derniers jours; $3 modifications mineures.', 'rchide' => 'in $4 form; $1 modifications mineures; $2 espaces secondaires; $3 modifications multiples.', // FIXME 'rcliu' => '; $1 modifications par des contributeurs connectés',