Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -795,10 +795,11 @@ |
796 | 796 | */ |
797 | 797 | public function addToFileHistLine( $historyList, $file, &$s, &$css ) { |
798 | 798 | # Non-content pages cannot be validated. Stable version must exist. |
799 | | - if( !$this->isReviewable() || !$this->getStableRev() || !$file->isLocal() ) |
| 799 | + if( !$this->isReviewable() || !$this->getStableRev() ) |
800 | 800 | return true; |
801 | 801 | # Quality level for old versions selected all at once. |
802 | | - if( !$file->isOld() ) { |
| 802 | + # Commons queries cannot be done all at once... |
| 803 | + if( !$file->isOld() || !$file->isLocal() ) { |
803 | 804 | $quality = wfGetDB(DB_SLAVE)->selectField( 'flaggedrevs', 'fr_quality', |
804 | 805 | array( 'fr_img_sha1' => $file->getSha1(), 'fr_img_timestamp' => $file->getTimestamp() ), |
805 | 806 | __METHOD__ ); |