Prevent the following strict-standards warnings - i.e. when running with error_loggin...
[lhc/web/wiklou.git] / includes / Image.php
index c03466b..5e85602 100644 (file)
@@ -58,7 +58,7 @@ class Image
         * @param string $name name of the image, used to create a title object using Title::makeTitleSafe
         * @public
         */
-       function newFromName( $name ) {
+       public static function newFromName( $name ) {
                $title = Title::makeTitleSafe( NS_IMAGE, $name );
                if ( is_object( $title ) ) {
                        return new Image( $title );
@@ -1702,7 +1702,7 @@ class Image
                }
                $linkCache =& LinkCache::singleton();
 
-               extract( $db->tableNames( 'page', 'imagelinks' ) );
+               list( $page, $imagelinks ) = $db->tableNamesN( 'page', 'imagelinks' );
                $encName = $db->addQuotes( $this->name );
                $sql = "SELECT page_namespace,page_title,page_id FROM $page,$imagelinks WHERE page_id=il_from AND il_to=$encName $options";
                $res = $db->query( $sql, __METHOD__ );