Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1813,13 +1813,13 @@ |
1814 | 1814 | /* |
1815 | 1815 | * If an article is reviewable, get custom article contents from the FlaggedArticleView |
1816 | 1816 | */ |
1817 | | - public static function onArticleContentOnDiff( $diffEngine, $out ) { |
| 1817 | + public static function onArticleContentOnDiff( $diffEngine, $out, $newRevId ) { |
1818 | 1818 | $fa = FlaggedArticle::getTitleInstance( $out->getTitle() ); |
1819 | 1819 | if ( !$fa->isReviewable() ) { |
1820 | 1820 | return true; // nothing to do |
1821 | 1821 | } |
1822 | 1822 | $view = FlaggedArticleView::singleton(); |
1823 | | - $view->addCustomContentHtml( $out ); |
| 1823 | + $view->addCustomContentHtml( $out, $newRevId ); |
1824 | 1824 | return false; |
1825 | 1825 | } |
1826 | 1826 | |
Index: branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -1812,9 +1812,9 @@ |
1813 | 1813 | * to the specific revision. This will be replaced with article content |
1814 | 1814 | * using javascript and an api call. |
1815 | 1815 | */ |
1816 | | - public function addCustomContentHtml( OutputPage $out ) { |
| 1816 | + public function addCustomContentHtml( OutputPage $out, $newRevId ) { |
1817 | 1817 | $this->load(); |
1818 | | - if ( $out->getRevisionId() ) { |
| 1818 | + if ( $newRevId ) { |
1819 | 1819 | $out->addHTML( "<div id='mw-fr-revisioncontents' class='plainlinks'>" ); |
1820 | 1820 | $out->addWikiMsg( 'revcontents-getcontents', |
1821 | 1821 | $this->article->getTitle()->getPrefixedDBKey(), $out->getRevisionId() ); |