r56015 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56014‎ | r56015 | r56016 >
Date:04:47, 8 September 2009
Author:aaron
Status:ok
Tags:
Comment:
Tweak form position and tag defaults for r56014
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -565,7 +565,7 @@
566566 /**
567567 * @param FlaggedRevision $srev, stable version
568568 * @param bool $quality, revision is quality
569 - * Parser cache control deferred to caller
 569+ * @returns bool, diff added to output
570570 */
571571 protected function maybeShowTopDiff( $srev, $quality ) {
572572 global $wgUser, $wgOut, $wgMemc;
@@ -613,8 +613,10 @@
614614 "</table>" .
615615 "</div>\n"
616616 );
 617+ $this->isDiffFromStable = true;
 618+ return true;
617619 }
618 - return true;
 620+ return false;
619621 }
620622
621623 /**
@@ -876,7 +878,9 @@
877879 if( !self::isViewAction($action) || !$wgRequest->getVal('title') ) {
878880 return true;
879881 }
880 - $this->addQuickReview( $data, $wgRequest->getVal('diff'), false );
 882+ # Place the form at the top or bottom as most convenient
 883+ $onTop = $wgRequest->getVal('diff') || $this->isDiffFromStable;
 884+ $this->addQuickReview( $data, $onTop, false );
881885 return true;
882886 }
883887
@@ -1230,13 +1234,14 @@
12311235
12321236 /**
12331237 * Add a link to patrol non-reviewable pages.
1234 - * Also add a diff to stable for other pages if possible.
 1238+ * Also add a diff-to-stable for other pages if possible.
12351239 */
12361240 public function addDiffLink( $diff, $oldRev, $newRev ) {
12371241 global $wgUser, $wgOut;
12381242 // Is there a stable version?
12391243 if( $oldRev && $this->isReviewable() ) {
12401244 $frev = $this->getStableRev();
 1245+ # Is this a diff of the draft rev against the stable rev?
12411246 if( $frev && $frev->getRevId() == $oldRev->getID() && $newRev->isCurrent() ) {
12421247 $this->isDiffFromStable = true;
12431248 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r56014bug 20058 Add option for editors in preferences to always show diff to latest...aaron04:30, 8 September 2009

Status & tagging log