r78214 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78213‎ | r78214 | r78215 >
Date:23:36, 10 December 2010
Author:pdhanda
Status:resolved (Comments)
Tags:
Comment:
Merged r78213 from trunk
Modified paths:
  • /branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /branches/priyanka-wmf-fixes/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

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

Follow-up revisions

RevisionCommit summaryAuthorDate
r78321Fixed bad merge r78214. Merged r78319pdhanda20:02, 13 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78213After r78212, it is safer to get the revision id from the DifferenceEngine ob...pdhanda23:00, 10 December 2010

Comments

#Comment by RobLa-WMF (talk | contribs)   01:20, 11 December 2010

Any reason why this is different than r78213, particularly in the way that this rev adds $newRevId as a required parameter to onArticleContentOnDiff, whereas in r78213, $diffEngine->mNewid is passed to addCustomContentHtml? Since this version gives PHP errors (missing parameter 3 to onArticleContentOnDiff), I've modified the working copy on prototype.wikimedia.org/flaggedrevs to reflect r78213, which seems to fix the problem.

Status & tagging log