/** * Add a link to diff-to-stable for reviewable pages */ protected static function diffToStableLink(FlaggableWikiPage $article, $oldRev, Revision $newRev) { $srev = $article->getStableRev(); if (!$srev) { return ''; // nothing to do } $review = ''; # Is this already the full diff-to-stable? $fullStableDiff = $newRev->isCurrent() && self::isDiffToStable($srev, $oldRev, $newRev); # Make a link to the full diff-to-stable if: # (a) Actual revs are pending and (b) We are not viewing the full diff-to-stable if ($article->revsArePending() && !$fullStableDiff) { $review = Linker::linkKnown($article->getTitle(), wfMsgHtml('review-diff2stable'), array(), array('oldid' => $srev->getRevId(), 'diff' => 'cur') + FlaggedRevs::diffOnlyCGI()); $review = wfMsgHtml('parentheses', $review); $review = "<div class='fr-diff-to-stable' align='center'>{$review}</div>"; } return $review; }