r108196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108195‎ | r108196 | r108197 >
Date:07:10, 6 January 2012
Author:aaron
Status:ok (Comments)
Tags:
Comment:
* Always show 'revreview-editnotice' msg on edit form if the edit can't be automatically reviewed. Also tweaked the message for consistency (also matches edit form review checkbox).
* Made editWillBeAutoreviewed() use quickUserCan() for performance.
Modified paths:
  • /trunk/extensions/FlaggedRevs/frontend/FlaggablePageView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/frontend/language/FlaggedRevs.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/frontend/FlaggablePageView.php
@@ -933,9 +933,9 @@
934934 # Find out revision id of base version
935935 $latestId = $this->article->getLatest();
936936 $revId = $editPage->oldid ? $editPage->oldid : $latestId;
937 - # Let new users know about review procedure a tag.
938 - # If the log excerpt was shown this is redundant.
939 - if ( !$log && !$reqUser->getId() && $this->article->isStableShownByDefault() ) {
 937+ # Let users know if their edit will have to be reviewed.
 938+ # Note: if the log excerpt was shown then this is redundant.
 939+ if ( !$log && $this->editWillRequireReview( $editPage ) ) {
940940 $items[] = wfMsgExt( 'revreview-editnotice', 'parseinline' );
941941 }
942942 # Add a notice if there are pending edits...
@@ -1745,10 +1745,10 @@
17461746 * @return bool
17471747 */
17481748 protected function editWillRequireReview( EditPage $editPage ) {
1749 - $request = $this->getRequest();
 1749+ $request = $this->getRequest(); // convenience
17501750 $title = $this->article->getTitle(); // convenience
17511751 if ( !$this->editRequiresReview( $editPage ) ) {
1752 - return false; // edit will go live immediatly
 1752+ return false; // edit will go live immediately
17531753 } elseif ( $request->getCheck( 'wpReviewEdit' ) && $title->userCan( 'review' ) ) {
17541754 return false; // edit checked off to be reviewed on save
17551755 }
@@ -1780,7 +1780,7 @@
17811781 if ( !$this->article->isReviewable() ) {
17821782 return false;
17831783 }
1784 - if ( $title->userCan( 'autoreview' ) ) {
 1784+ if ( $title->quickUserCan( 'autoreview' ) ) {
17851785 if ( FlaggedRevs::autoReviewNewPages() && !$this->article->exists() ) {
17861786 return true; // edit will be autoreviewed
17871787 }
Index: trunk/extensions/FlaggedRevs/frontend/language/FlaggedRevs.i18n.php
@@ -98,10 +98,10 @@
9999 'revreview-depth-4' => 'Featured',
100100 'revreview-draft-title' => 'Pending changes are displayed on this page',
101101 'revreview-edit' => 'Edit',
102 - 'revreview-editnotice' => '\'\'\'Your changes will be displayed to readers once an authorized user reviews them. ([[{{MediaWiki:Validationpage}}|help]])\'\'\'',
 102+ 'revreview-editnotice' => '\'\'\'Your changes will be displayed to readers once an authorized user accepts them. ([[{{MediaWiki:Validationpage}}|help]])\'\'\'',
103103 'revreview-submitedit' => 'Submit changes',
104104 'revreview-submitedit-title' => 'Submit your changes for review',
105 - 'revreview-edited' => '\'\'\'Your changes will be displayed to readers once an authorized user reviews them. ([[{{MediaWiki:Validationpage}}|help]])\'\'\'
 105+ 'revreview-edited' => '\'\'\'Your changes will be displayed to readers once an authorized user accepts them. ([[{{MediaWiki:Validationpage}}|help]])\'\'\'
106106
107107 There {{PLURAL:$2|is|are}} [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur{{MediaWiki:flaggedrevs-diffonly}}}} $2 pending {{PLURAL:$2|change|changes}}] \'\'(shown below)\'\' awaiting review.',
108108 'revreview-edited-section' => 'Return to page section named "[[#$1|$2]]".',

Comments

Status & tagging log