From: Sam Reed Date: Sun, 5 Jun 2011 23:48:39 +0000 (+0000) Subject: * (bug 27595) sha1 search of list=filearchive does not work X-Git-Tag: 1.31.0-rc.0~29681 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=a8f6a731d71707224e457f5672a88fea26495469;p=lhc%2Fweb%2Fwiklou.git * (bug 27595) sha1 search of list=filearchive does not work Still disabled in misermode, but switched for LIKE rather than = --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index e085309abb..3714068556 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -104,6 +104,7 @@ production. * (bug 29237) add interwiki target url attribute to api/query/interwiki * (bug 28392) mark action=undelete×tamps as type "timestamp" * (bug 21346) Make deleted images searchable by hash (disabled in Miser Mode) +* (bug 27595) sha1 search of list=filearchive does not work === Languages updated in 1.19 === diff --git a/includes/api/ApiQueryFilearchive.php b/includes/api/ApiQueryFilearchive.php index f646a0e65b..5f4de5d3c3 100644 --- a/includes/api/ApiQueryFilearchive.php +++ b/includes/api/ApiQueryFilearchive.php @@ -100,7 +100,7 @@ class ApiQueryFilearchive extends ApiQueryBase { $sha1 = $params['sha1base36']; } if ( $sha1 ) { - $this->addWhere( 'fa_storage_key=' . $db->addQuotes( $sha1 ) ); + $this->addWhere( 'fa_storage_key ' . $db->buildLike( $sha1, $db->anyString() ) ); } }