Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -565,7 +565,7 @@ |
566 | 566 | /** |
567 | 567 | * @param FlaggedRevision $srev, stable version |
568 | 568 | * @param bool $quality, revision is quality |
569 | | - * Parser cache control deferred to caller |
| 569 | + * @returns bool, diff added to output |
570 | 570 | */ |
571 | 571 | protected function maybeShowTopDiff( $srev, $quality ) { |
572 | 572 | global $wgUser, $wgOut, $wgMemc; |
— | — | @@ -613,8 +613,10 @@ |
614 | 614 | "</table>" . |
615 | 615 | "</div>\n" |
616 | 616 | ); |
| 617 | + $this->isDiffFromStable = true; |
| 618 | + return true; |
617 | 619 | } |
618 | | - return true; |
| 620 | + return false; |
619 | 621 | } |
620 | 622 | |
621 | 623 | /** |
— | — | @@ -876,7 +878,9 @@ |
877 | 879 | if( !self::isViewAction($action) || !$wgRequest->getVal('title') ) { |
878 | 880 | return true; |
879 | 881 | } |
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 ); |
881 | 885 | return true; |
882 | 886 | } |
883 | 887 | |
— | — | @@ -1230,13 +1234,14 @@ |
1231 | 1235 | |
1232 | 1236 | /** |
1233 | 1237 | * 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. |
1235 | 1239 | */ |
1236 | 1240 | public function addDiffLink( $diff, $oldRev, $newRev ) { |
1237 | 1241 | global $wgUser, $wgOut; |
1238 | 1242 | // Is there a stable version? |
1239 | 1243 | if( $oldRev && $this->isReviewable() ) { |
1240 | 1244 | $frev = $this->getStableRev(); |
| 1245 | + # Is this a diff of the draft rev against the stable rev? |
1241 | 1246 | if( $frev && $frev->getRevId() == $oldRev->getID() && $newRev->isCurrent() ) { |
1242 | 1247 | $this->isDiffFromStable = true; |
1243 | 1248 | } |