r68145 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68144‎ | r68145 | r68146 >
Date:05:15, 17 June 2010
Author:aaron
Status:ok
Tags:
Comment:
tiny cleanups
Modified paths:
  • /trunk/extensions/FlaggedRevs/FRCacheUpdate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FRCacheUpdate.php
@@ -8,7 +8,7 @@
99 public $mTitle, $mTable;
1010 public $mRowsPerJob, $mRowsPerQuery;
1111
12 - public function __construct( $titleTo ) {
 12+ public function __construct( Title $titleTo ) {
1313 global $wgUpdateRowsPerJob, $wgUpdateRowsPerQuery;
1414 $this->mTitle = $titleTo;
1515 $this->mTable = 'flaggedrevs_tracking';
@@ -22,12 +22,14 @@
2323 $wgFlaggedRevsCacheUpdates = array(); // temp var
2424 }
2525 $key = $this->mTitle->getPrefixedDBKey();
26 - if ( isset( $wgFlaggedRevsCacheUpdates[$key] ) )
 26+ if ( isset( $wgFlaggedRevsCacheUpdates[$key] ) ) {
2727 return; // No duplicates...
 28+ }
2829 # Fetch the IDs
2930 $dbr = wfGetDB( DB_SLAVE );
3031 $res = $dbr->select( $this->mTable, $this->getFromField(),
3132 $this->getToCondition(), __METHOD__ );
 33+ # Check if there is anything to do...
3234 if ( $dbr->numRows( $res ) > 0 ) {
3335 # Do it right now?
3436 if ( $dbr->numRows( $res ) <= $this->mRowsPerJob ) {
@@ -86,7 +88,7 @@
8789 return array( 'ftr_namespace' => $this->mTitle->getNamespace(),
8890 'ftr_title' => $this->mTitle->getDBkey() );
8991 }
90 -
 92+
9193 /**
9294 * Invalidate a set of IDs, right now
9395 */
@@ -164,7 +166,6 @@
165167 if ( $this->end ) {
166168 $conds[] = "$fromField <= {$this->end}";
167169 }
168 -
169170 # Run query to get page Ids
170171 $dbr = wfGetDB( DB_SLAVE );
171172 $res = $dbr->select( $this->table, $fromField, $conds, __METHOD__ );

Status & tagging log