X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FLocalFile.php;h=96e7a7e7f964230a175f3b6bdfeb0eea5f18d47a;hb=a3d615394c9ed51dacb77b215ba30a43358cdd62;hp=8aea7abadef40298a1a1597f1e4f68af8d12dfa4;hpb=18ad4f5e13b479f4d32f825b6f23e53a3b44f3cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 8aea7abade..96e7a7e7f9 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1129,11 +1129,9 @@ class LocalFile extends File { if ( $this->historyLine == 0 ) { // called for the first time, return line from cur $this->historyRes = $dbr->select( 'image', - [ - '*', - "'' AS oi_archive_name", - '0 as oi_deleted', - 'img_sha1' + self::selectFields() + [ + 'oi_archive_name' => $dbr->addQuotes( '' ), + 'oi_deleted' => 0, ], [ 'img_name' => $this->title->getDBkey() ], $fname @@ -1145,7 +1143,9 @@ class LocalFile extends File { return false; } } elseif ( $this->historyLine == 1 ) { - $this->historyRes = $dbr->select( 'oldimage', '*', + $this->historyRes = $dbr->select( + 'oldimage', + OldLocalFile::selectFields(), [ 'oi_name' => $this->title->getDBkey() ], $fname, [ 'ORDER BY' => 'oi_timestamp DESC' ]