r64676 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64675‎ | r64676 | r64677 >
Date:23:29, 6 April 2010
Author:aaron
Status:ok
Tags:
Comment:
* Use 'parentheses' msg
* Added title to (review) links in RC
* Code style tweaks and cleanups
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php
@@ -228,6 +228,7 @@
229229 'revreview-restriction-none' => 'none',
230230
231231 'revreview-reviewlink' => 'review',
 232+ 'revreview-reviewlink-title' => 'View diff of all pending changes',
232233
233234 'tooltip-ca-current' => 'View this page with pending changes',
234235 'tooltip-ca-stable' => 'View the published version of this page',
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1920,13 +1920,20 @@
19211921 public static function addToChangeListLine(
19221922 &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched
19231923 ) {
1924 - if ( empty( $rc->mAttribs['fpp_rev_id'] ) )
 1924+ if ( empty( $rc->mAttribs['fpp_rev_id'] ) ) {
19251925 return true; // page is not listed in pending edit table
1926 - if ( !FlaggedRevs::inReviewNamespace( $rc->getTitle() ) )
 1926+ }
 1927+ if ( !FlaggedRevs::inReviewNamespace( $rc->getTitle() ) ) {
19271928 return true; // confirm that page is in reviewable namespace
1928 - $rlink = $list->skin->makeKnownLinkObj( $rc->getTitle(), wfMsg( 'revreview-reviewlink' ),
1929 - 'oldid=' . intval( $rc->mAttribs['fpp_rev_id'] ) . '&diff=cur' );
1930 - $articlelink .= " <span class='mw-fr-reviewlink'>($rlink)</span>";
 1929+ }
 1930+ $rlink = $list->skin->link(
 1931+ $rc->getTitle(),
 1932+ wfMsgHtml( 'revreview-reviewlink' ),
 1933+ array( 'title' => wfMsg( 'revreview-reviewlink-title' ) ),
 1934+ array( 'oldid' => $rc->mAttribs['fpp_rev_id'], 'diff' => 'cur' )
 1935+ );
 1936+ $rlink = wfMsgHtml( 'parentheses', $rlink );
 1937+ $articlelink .= " <span class=\"mw-fr-reviewlink\">$rlink</span>";
19311938 return true;
19321939 }
19331940
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -63,17 +63,21 @@
6464 $this->load();
6565 # This only applies to viewing content pages
6666 $action = $wgRequest->getVal( 'action', 'view' );
67 - if ( !self::isViewAction( $action ) || !$this->article->isReviewable() )
 67+ if ( !self::isViewAction( $action ) || !$this->article->isReviewable() ) {
6868 return false;
 69+ }
6970 # Does not apply to diffs/old revision...
70 - if ( $wgRequest->getVal( 'oldid' ) || $wgRequest->getVal( 'diff' ) )
 71+ if ( $wgRequest->getVal( 'oldid' ) || $wgRequest->getVal( 'diff' ) ) {
7172 return false;
 73+ }
7274 # Explicit requests for a certain stable version handled elsewhere...
73 - if ( $wgRequest->getVal( 'stableid' ) )
 75+ if ( $wgRequest->getVal( 'stableid' ) ) {
7476 return false;
 77+ }
7578 # Check user preferences
76 - if ( $wgUser->getOption( 'flaggedrevsstable' ) )
 79+ if ( $wgUser->getOption( 'flaggedrevsstable' ) ) {
7780 return !( $wgRequest->getIntOrNull( 'stable' ) === 0 );
 81+ }
7882 # Get page configuration
7983 $config = $this->article->getVisibilitySettings();
8084 # Does the stable version override the current one?

Status & tagging log