r84178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84177‎ | r84178 | r84179 >
Date:16:41, 17 March 2011
Author:aaron
Status:ok
Tags:
Comment:
* Follow-up r84097: check wfReadOnly(); didn't find anything else needing these
* Code style tweak
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -670,12 +670,14 @@
671671 */
672672 public static function updateSyncStatus( Article $article, $synced ) {
673673 wfProfileIn( __METHOD__ );
674 - $dbw = wfGetDB( DB_MASTER );
675 - $dbw->update( 'flaggedpages',
676 - array( 'fp_reviewed' => (int)$synced ),
677 - array( 'fp_page_id' => $article->getID() ),
678 - __METHOD__
679 - );
 674+ if ( !wfReadOnly() ) {
 675+ $dbw = wfGetDB( DB_MASTER );
 676+ $dbw->update( 'flaggedpages',
 677+ array( 'fp_reviewed' => (int)$synced ),
 678+ array( 'fp_page_id' => $article->getID() ),
 679+ __METHOD__
 680+ );
 681+ }
680682 wfProfileOut( __METHOD__ );
681683 }
682684
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -337,8 +337,7 @@
338338 if ( !( $parser instanceof Parser ) ) {
339339 return true; // nothing to do
340340 }
341 - $incManager = FRInclusionManager::singleton();
342 - if ( !$incManager->parserOutputIsStabilized() ) {
 341+ if ( !FRInclusionManager::singleton()->parserOutputIsStabilized() ) {
343342 return true; // trigger for stable version parsing only
344343 }
345344 # Normalize NS_MEDIA to NS_FILE
@@ -367,8 +366,7 @@
368367 if ( !( $parser instanceof Parser ) || $nt->getNamespace() != NS_FILE ) {
369368 return true; // nothing to do
370369 }
371 - $incManager = FRInclusionManager::singleton();
372 - if ( !$incManager->parserOutputIsStabilized() ) {
 370+ if ( !FRInclusionManager::singleton()->parserOutputIsStabilized() ) {
373371 return true; // trigger for stable version parsing only
374372 }
375373 # Get version, update fr_fileSHA1Keys...

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84097* fp_reviewed is not currently used (redundant to fp_pending_since). Re-purpo...aaron12:39, 16 March 2011

Status & tagging log