r78213 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78212‎ | r78213 | r78214 >
Date:23:00, 10 December 2010
Author:pdhanda
Status:resolved (Comments)
Tags:
Comment:
After r78212, it is safer to get the revision id from the DifferenceEngine object
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1814,7 +1814,7 @@
18151815 return true; // nothing to do
18161816 }
18171817 $view = FlaggedArticleView::singleton();
1818 - $view->addCustomContentHtml( $out );
 1818+ $view->addCustomContentHtml( $out, $diffEngine->mNewid );
18191819 return false;
18201820 }
18211821
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -1820,12 +1820,12 @@
18211821 * to the specific revision. This will be replaced with article content
18221822 * using javascript and an api call.
18231823 */
1824 - public function addCustomContentHtml( OutputPage $out ) {
 1824+ public function addCustomContentHtml( OutputPage $out, $newRevId ) {
18251825 $this->load();
1826 - if ( $out->getRevisionId() ) {
 1826+ if ( $newRevId ) {
18271827 $out->addHTML( "<div id='mw-fr-revisioncontents'><span class='plainlinks'>" );
18281828 $out->addWikiMsg( 'revcontents-getcontents',
1829 - $this->article->getTitle()->getPrefixedDBKey(), $out->getRevisionId() );
 1829+ $this->article->getTitle()->getPrefixedDBKey(), $newRevId );
18301830 $out->addHTML( "</span></div>" );
18311831 }
18321832 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r78214Merged r78213 from trunkpdhanda23:36, 10 December 2010
r78319Used accessor method instead of raw field. Follow up to r78213pdhanda19:57, 13 December 2010
r80733MFT first round of FlaggedRevs fixes r78517, r78346, r78319, r78293, r78226, ...demon23:56, 21 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78212If we only want to show the diff this should make it faster. Sort of related ...pdhanda22:47, 10 December 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   04:17, 11 December 2010

Please use accessors like getNewid() instead of raw field accesses (fields like this could become protected).

Status & tagging log