r36104 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36103‎ | r36104 | r36105 >
Date:20:45, 9 June 2008
Author:aaron
Status:old
Tags:
Comment:
Check isLocal()
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticle.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php
@@ -795,7 +795,7 @@
796796 */
797797 public function addToFileHistLine( $historyList, $file, &$s, &$css ) {
798798 # Non-content pages cannot be validated. Stable version must exist.
799 - if( !$this->isReviewable() || !$this->getStableRev() )
 799+ if( !$this->isReviewable() || !$this->getStableRev() || !$file->isLocal() )
800800 return true;
801801 # Quality level for old versions selected all at once.
802802 if( !$file->isOld() ) {
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -2067,9 +2067,11 @@
20682068 }
20692069
20702070 static function addToFileHistQuery( $file, &$tables, &$fields, &$conds, &$opts, &$join_conds ) {
2071 - $tables[] = 'flaggedrevs';
2072 - $fields[] = 'fr_quality';
2073 - $join_conds['flaggedrevs'] = array( 'LEFT JOIN', 'oi_sha1 = fr_img_sha1 AND oi_timestamp = fr_img_timestamp' );
 2071+ if( $file->isLocal() ) {
 2072+ $tables[] = 'flaggedrevs';
 2073+ $fields[] = 'fr_quality';
 2074+ $join_conds['flaggedrevs'] = array( 'LEFT JOIN', 'oi_sha1 = fr_img_sha1 AND oi_timestamp = fr_img_timestamp' );
 2075+ }
20742076 return true;
20752077 }
20762078

Status & tagging log