Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -228,6 +228,7 @@ |
229 | 229 | 'revreview-restriction-none' => 'none', |
230 | 230 | |
231 | 231 | 'revreview-reviewlink' => 'review', |
| 232 | + 'revreview-reviewlink-title' => 'View diff of all pending changes', |
232 | 233 | |
233 | 234 | 'tooltip-ca-current' => 'View this page with pending changes', |
234 | 235 | 'tooltip-ca-stable' => 'View the published version of this page', |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1920,13 +1920,20 @@ |
1921 | 1921 | public static function addToChangeListLine( |
1922 | 1922 | &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched |
1923 | 1923 | ) { |
1924 | | - if ( empty( $rc->mAttribs['fpp_rev_id'] ) ) |
| 1924 | + if ( empty( $rc->mAttribs['fpp_rev_id'] ) ) { |
1925 | 1925 | return true; // page is not listed in pending edit table |
1926 | | - if ( !FlaggedRevs::inReviewNamespace( $rc->getTitle() ) ) |
| 1926 | + } |
| 1927 | + if ( !FlaggedRevs::inReviewNamespace( $rc->getTitle() ) ) { |
1927 | 1928 | 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>"; |
1931 | 1938 | return true; |
1932 | 1939 | } |
1933 | 1940 | |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -63,17 +63,21 @@ |
64 | 64 | $this->load(); |
65 | 65 | # This only applies to viewing content pages |
66 | 66 | $action = $wgRequest->getVal( 'action', 'view' ); |
67 | | - if ( !self::isViewAction( $action ) || !$this->article->isReviewable() ) |
| 67 | + if ( !self::isViewAction( $action ) || !$this->article->isReviewable() ) { |
68 | 68 | return false; |
| 69 | + } |
69 | 70 | # Does not apply to diffs/old revision... |
70 | | - if ( $wgRequest->getVal( 'oldid' ) || $wgRequest->getVal( 'diff' ) ) |
| 71 | + if ( $wgRequest->getVal( 'oldid' ) || $wgRequest->getVal( 'diff' ) ) { |
71 | 72 | return false; |
| 73 | + } |
72 | 74 | # Explicit requests for a certain stable version handled elsewhere... |
73 | | - if ( $wgRequest->getVal( 'stableid' ) ) |
| 75 | + if ( $wgRequest->getVal( 'stableid' ) ) { |
74 | 76 | return false; |
| 77 | + } |
75 | 78 | # Check user preferences |
76 | | - if ( $wgUser->getOption( 'flaggedrevsstable' ) ) |
| 79 | + if ( $wgUser->getOption( 'flaggedrevsstable' ) ) { |
77 | 80 | return !( $wgRequest->getIntOrNull( 'stable' ) === 0 ); |
| 81 | + } |
78 | 82 | # Get page configuration |
79 | 83 | $config = $this->article->getVisibilitySettings(); |
80 | 84 | # Does the stable version override the current one? |