(bug 973) quickie brake for images with many many uses
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 2 Dec 2004 03:04:56 +0000 (03:04 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 2 Dec 2004 03:04:56 +0000 (03:04 +0000)
includes/ImagePage.php

index dc7c67f..139f024 100644 (file)
@@ -132,7 +132,8 @@ class ImagePage extends Article {
                $imagelinks = $dbr->tableName( 'imagelinks' );
                
                $sql = "SELECT cur_namespace,cur_title FROM $imagelinks,$cur WHERE il_to=" .
-                 $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=cur_id";
+                 $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=cur_id"
+                 . " LIMIT 500"; # quickie emergency brake
                $res = $dbr->query( $sql, DB_SLAVE, "Article::imageLinks" );
 
                if ( 0 == $dbr->numRows( $res ) ) {