r50566 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50565‎ | r50566 | r50567 >
Date:21:52, 13 May 2009
Author:aaron
Status:ok
Tags:
Comment:
break some long lines here
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -76,10 +76,12 @@
7777 $action = $wgRequest->getVal( 'action', 'view' );
7878 if( !self::isViewAction($action) || !$this->isReviewable() )
7979 return false;
80 - # Does not apply to diffs/old revision. Explicit requests
81 - # for a certain stable version will be handled elsewhere.
82 - if( $wgRequest->getVal('oldid') || $wgRequest->getVal('diff') || $wgRequest->getVal('stableid') )
 80+ # Does not apply to diffs/old revision...
 81+ if( $wgRequest->getVal('oldid') || $wgRequest->getVal('diff') )
8382 return false;
 83+ # Explicit requests for a certain stable version handled elsewhere...
 84+ if( $wgRequest->getVal('stableid') )
 85+ return false;
8486 # Check user preferences
8587 if( $wgUser->getOption('flaggedrevsstable') )
8688 return !( $wgRequest->getIntOrNull('stable') === 0 );
@@ -235,7 +237,8 @@
236238 if( !FlaggedRevs::useSimpleUI() && !empty($flags) ) {
237239 $tag .= " " . FlaggedRevsXML::ratingToggle() .
238240 "<span id='mw-revisionratings' style='display:block;'><br/>" .
239 - wfMsgHtml('revreview-oldrating') . FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
 241+ wfMsgHtml('revreview-oldrating') .
 242+ FlaggedRevsXML::addTagRatings( $flags ) . '</span>';
240243 }
241244 $tag = "<div id='mw-revisiontag-old' class='flaggedrevs_notice plainlinks noprint'>$tag</div>";
242245 $wgOut->addHTML( $tag );
@@ -348,7 +351,8 @@
349352 $msg = $quality ? 'revreview-quick-quality-old' : 'revreview-quick-basic-old';
350353 $html = "{$prot}<span class='{$class}' title=\"{$tooltip}\"></span>" .
351354 wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time );
352 - $tag .= FlaggedRevsXML::prettyRatingBox( $frev, $html, $revsSince, true, false, $old );
 355+ $tag .= FlaggedRevsXML::prettyRatingBox( $frev, $html, $revsSince,
 356+ true, false, $old );
353357 // Standard UI
354358 } else {
355359 $msg = $quality ? 'revreview-quality-old' : 'revreview-basic-old';
@@ -413,18 +417,21 @@
414418 }
415419 $tooltip = wfMsgHtml($tooltip);
416420 $msgHTML = "{$prot}<span class='{$class}' title=\"{$tooltip}\"></span>$msgHTML";
417 - $tag .= FlaggedRevsXML::prettyRatingBox( $frev, $msgHTML, $revsSince, $synced, $synced, $old );
 421+ $tag .= FlaggedRevsXML::prettyRatingBox( $frev, $msgHTML, $revsSince,
 422+ $synced, $synced, $old );
418423 // Standard UI
419424 } else {
420425 if( $synced ) {
421426 $msg = $quality ? 'revreview-quality-same' : 'revreview-basic-same';
422427 $class = $quality ? 'fr-icon-quality' : 'fr-icon-stable';
423428 $tooltip = $quality ? 'revreview-quality-title' : 'revreview-stable-title';
424 - $msgHTML = wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time, $revsSince );
 429+ $msgHTML = wfMsgExt( $msg, array('parseinline'), $frev->getRevId(),
 430+ $time, $revsSince );
425431 } else {
426432 $msg = $quality ? 'revreview-newest-quality' : 'revreview-newest-basic';
427433 $msg .= ($revsSince == 0) ? '-i' : '';
428 - $msgHTML = wfMsgExt( $msg, array('parseinline'), $frev->getRevId(), $time, $revsSince );
 434+ $msgHTML = wfMsgExt( $msg, array('parseinline'), $frev->getRevId(),
 435+ $time, $revsSince );
429436 }
430437 $tooltip = wfMsgHtml($tooltip);
431438 $tag .= "{$prot}<span class='{$class}' title=\"{$tooltip}\"></span>" . $msgHTML;
@@ -655,7 +662,9 @@
656663 return true;
657664 }
658665 # Don't show for old revisions, diff, preview, or undo.
659 - if( $editPage->oldid || $editPage->section === "new" || in_array($editPage->formtype,array('diff','preview')) ) {
 666+ if( $editPage->oldid || $editPage->section === "new"
 667+ || in_array($editPage->formtype,array('diff','preview')) )
 668+ {
660669 return true; // nothing to show here
661670 }
662671
@@ -683,8 +692,10 @@
684693 "<col class='diff-marker' />" .
685694 "<col class='diff-content' />" .
686695 "<tr>" .
687 - "<td colspan='2' width='50%' align='center' class='diff-otitle'><b>" . $leftNote . "</b></td>" .
688 - "<td colspan='2' width='50%' align='center' class='diff-ntitle'><b>" . $rightNote . "</b></td>" .
 696+ "<td colspan='2' width='50%' align='center' class='diff-otitle'><b>" .
 697+ $leftNote . "</b></td>" .
 698+ "<td colspan='2' width='50%' align='center' class='diff-ntitle'><b>" .
 699+ $rightNote . "</b></td>" .
689700 "</tr>" .
690701 $diffEngine->generateDiffBody( $text, $editPage->textbox1 ) .
691702 "</table>" .
@@ -732,12 +743,12 @@
733744 $category = $this->parent->getTitle()->getText();
734745
735746 $unreviewed = SpecialPage::getTitleFor( 'UnreviewedPages' );
736 - $unreviewedLink = $wgUser->getSkin()->makeKnownLinkObj( $unreviewed, wfMsgHtml('unreviewedpages'),
737 - 'category=' . urlencode($category) );
 747+ $unreviewedLink = $wgUser->getSkin()->makeKnownLinkObj( $unreviewed,
 748+ wfMsgHtml('unreviewedpages'), 'category=' . urlencode($category) );
738749
739750 $oldreviewed = SpecialPage::getTitleFor( 'OldReviewedPages' );
740 - $oldreviewedLink = $wgUser->getSkin()->makeKnownLinkObj( $oldreviewed, wfMsgHtml('oldreviewedpages'),
741 - 'category=' . urlencode($category) );
 751+ $oldreviewedLink = $wgUser->getSkin()->makeKnownLinkObj( $oldreviewed,
 752+ wfMsgHtml('oldreviewedpages'), 'category=' . urlencode($category) );
742753
743754 $wgOut->appendSubtitle("<span id='mw-category-oldreviewed'>$unreviewedLink / $oldreviewedLink</span>");
744755
@@ -813,16 +824,16 @@
814825 $frev = $this->getStableRev();
815826 if( $frev && $frev->getRevId() == $this->parent->getLatest() ) {
816827 $wgOut->prependHTML( "<span class='plainlinks'>" .
817 - wfMsgExt( 'revreview-visibility',array('parseinline'), $title->getPrefixedText() ) .
818 - "</span>" );
 828+ wfMsgExt( 'revreview-visibility',array('parseinline'),
 829+ $title->getPrefixedText() ) . "</span>" );
819830 } else if( $frev ) {
820831 $wgOut->prependHTML( "<span class='plainlinks'>" .
821 - wfMsgExt( 'revreview-visibility2',array('parseinline'), $title->getPrefixedText() ) .
822 - "</span>" );
 832+ wfMsgExt( 'revreview-visibility2',array('parseinline'),
 833+ $title->getPrefixedText() ) . "</span>" );
823834 } else {
824835 $wgOut->prependHTML( "<span class='plainlinks'>" .
825 - wfMsgExt( 'revreview-visibility3',array('parseinline'), $title->getPrefixedText() ) .
826 - "</span>" );
 836+ wfMsgExt( 'revreview-visibility3',array('parseinline'),
 837+ $title->getPrefixedText() ) . "</span>" );
827838 }
828839 }
829840 return true;
@@ -1063,11 +1074,13 @@
10641075 } else if( !empty($changeList) && $wgUser->isAllowed('review') ) {
10651076 $changeList = implode(', ',$changeList);
10661077 $wgOut->addHTML( "<div id='mw-difftostable' class='flaggedrevs_diffnotice plainlinks'>" .
1067 - wfMsgExt('revreview-update', array('parseinline')).'&nbsp;'.$changeList.$notice.'</div>' );
 1078+ wfMsgExt('revreview-update', array('parseinline')).'&nbsp;'.
 1079+ $changeList.$notice.'</div>' );
10681080 } else if( !empty($changeList) ) {
10691081 $changeList = implode(', ',$changeList);
10701082 $wgOut->addHTML( "<div id='mw-difftostable' class='flaggedrevs_diffnotice plainlinks'>" .
1071 - wfMsgExt('revreview-update-includes', array('parseinline')).'&nbsp;'.$changeList.$notice.'</div>' );
 1083+ wfMsgExt('revreview-update-includes', array('parseinline')).'&nbsp;'.
 1084+ $changeList.$notice.'</div>' );
10721085 }
10731086 # Set flag for review form to tell it to autoselect tag settings from the
10741087 # old revision unless the current one is tagged to.
@@ -1519,7 +1532,8 @@
15201533 wfLoadExtensionMessages( 'FlaggedRevs' );
15211534 $reviewTitle = SpecialPage::getTitleFor( 'ReaderFeedback' );
15221535 $action = $reviewTitle->getLocalUrl( 'action=submit' );
1523 - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'mw-feedbackform' ) );
 1536+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action,
 1537+ 'id' => 'mw-feedbackform' ) );
15241538 $form .= Xml::openElement( 'fieldset', array('class' => 'flaggedrevs_reviewform noprint') );
15251539 $form .= "<legend><strong>" . wfMsgHtml( 'readerfeedback' ) . "</strong></legend>\n";
15261540 # Avoid clutter
@@ -1532,7 +1546,8 @@
15331547 $label = array();
15341548 $selected = ( isset($flags[$quality]) && $flags[$quality] > 0 ) ? $flags[$quality] : -1;
15351549 $form .= "<b>" . Xml::label( wfMsgHtml("readerfeedback-$quality"), "wp$quality" ) . ":</b>";
1536 - $attribs = array( 'name' => "wp$quality", 'id' => "wp$quality", 'onchange' => "updateFeedbackForm()" );
 1550+ $attribs = array( 'name' => "wp$quality", 'id' => "wp$quality",
 1551+ 'onchange' => "updateFeedbackForm()" );
15371552 $form .= '&nbsp;' . Xml::openElement( 'select', $attribs );
15381553 $levels = array_reverse($levels,true);
15391554 foreach( $levels as $i => $name ) {

Status & tagging log