r29127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29126‎ | r29127 | r29128 >
Date:17:11, 31 December 2007
Author:aaron
Status:old
Tags:
Comment:
Tweak UI for consistency. Always show comment input, remove watch checkbox.
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/Language/FlaggedRevsPage.i18n.en.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -148,9 +148,6 @@
149149
150150 # Can users make comments that will show up below flagged revisions?
151151 $wgFlaggedRevComments = false;
152 -# Automatically checks the 'watch' box on the review form if they set
153 -# "watch pages I edit" as true at [[Special:Preferences]].
154 -$wgFlaggedRevsWatch = true;
155152 # Redirect users out to review changes since stable version on save?
156153 $wgReviewChangesAfterEdit = true;
157154 # Auto-review edits directly to the stable version by reviewers?
Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -617,17 +617,9 @@
618618 }
619619 }
620620 $form .= Xml::hidden( 'imageParams', $imageParams ) . "\n";
 621+
 622+ $form .= "<p>".Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 50 )."\n";
621623
622 - $watchLabel = wfMsgExt('watchthis', array('parseinline'));
623 - $watchAttribs = array('accesskey' => wfMsg( 'accesskey-watch' ), 'id' => 'wpWatchthis');
624 - $watchChecked = ( $wgFlaggedRevsWatch && $wgUser->getOption( 'watchdefault' ) || $wgTitle->userIsWatching() );
625 - # Not much to say unless you are a validator
626 - if( $wgUser->isAllowed( 'validate' ) )
627 - $form .= "<p>".Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 60 )."</p>\n";
628 -
629 - $form .= "<p>&nbsp;&nbsp;&nbsp;".Xml::check( 'wpWatchthis', $watchChecked, $watchAttribs );
630 - $form .= "&nbsp;<label for='wpWatchthis'".$skin->tooltipAndAccesskey('watch').">{$watchLabel}</label>";
631 -
632624 $form .= '&nbsp;&nbsp;&nbsp;'.Xml::submitButton( wfMsg( 'revreview-submit' ) )."</p></fieldset>";
633625 $form .= Xml::closeElement( 'form' );
634626
Index: trunk/extensions/FlaggedRevs/Language/FlaggedRevsPage.i18n.en.php
@@ -108,7 +108,7 @@
109109 'revreview-style-2' => 'Good',
110110 'revreview-style-3' => 'Concise',
111111 'revreview-style-4' => 'Featured',
112 - 'revreview-log' => 'Log comment:',
 112+ 'revreview-log' => 'Comment:',
113113 'revreview-submit' => 'Submit review',
114114 'revreview-changed' => '\'\'\'The requestion action could not be performed on this revision.\'\'\'
115115
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php
@@ -62,14 +62,11 @@
6363 $wgOut->permissionRequired( 'badaccess-group0' );
6464 return;
6565 }
66 - // Watch checkbox
67 - $this->watchThis = $wgRequest->getCheck( 'wpWatchthis' );
6866 // Special parameter mapping
6967 $this->templateParams = $wgRequest->getVal( 'templateParams' );
7068 $this->imageParams = $wgRequest->getVal( 'imageParams' );
7169 // Log comment
72 - $this->comment = $wgUser->isAllowed('validate') ?
73 - $wgRequest->getText( 'wpReason' ) : '';
 70+ $this->comment = $wgRequest->getText( 'wpReason' );
7471 // Additional notes (displayed at bottom of page)
7572 $this->notes = (FlaggedRevs::allowComments() && $wgUser->isAllowed('validate')) ?
7673 $wgRequest->getText('wpNotes') : '';
@@ -222,9 +219,8 @@
223220 "</textarea>" .
224221 "</fieldset>";
225222 }
226 - // Not much to say unless you are a validator
227 - if( $wgUser->isAllowed( 'validate' ) )
228 - $form .= '<p>'.Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 60 ).'</p>';
 223+
 224+ $form .= '<p>'.Xml::inputLabel( wfMsg( 'revreview-log' ), 'wpReason', 'wpReason', 60 ).'</p>';
229225
230226 $form .= '<p>'.Xml::submitButton( wfMsg( 'revreview-submit' ) ).'</p>';
231227
@@ -288,11 +284,6 @@
289285 $this->approveRevision( $rev, $this->notes ) : $this->unapproveRevision( $frev );
290286 // Return to our page
291287 if( $success ) {
292 - if( $this->watchThis ) {
293 - $wgUser->addWatch( $this->page );
294 - } else {
295 - $wgUser->removeWatch( $this->page );
296 - }
297288 $wgOut->redirect( $this->page->getFullUrl() );
298289 } else {
299290 $wgOut->showErrorPage( 'internalerror', 'revreview-changed' );
@@ -305,7 +296,7 @@
306297 * @param string $notes
307298 */
308299 function approveRevision( $rev, $notes='' ) {
309 - global $wgUser, $wgFlaggedRevsWatch, $wgParser;
 300+ global $wgUser, $wgParser;
310301 // Get the page this corresponds to
311302 $title = $rev->getTitle();
312303
@@ -445,7 +436,7 @@
446437 * Removes flagged revision data for this page/id set
447438 */
448439 function unapproveRevision( $row ) {
449 - global $wgUser, $wgParser, $wgFlaggedRevsWatch;
 440+ global $wgUser, $wgParser;
450441
451442 $user = $wgUser->getId();
452443

Status & tagging log