From a8f6a731d71707224e457f5672a88fea26495469 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 5 Jun 2011 23:48:39 +0000 Subject: [PATCH] * (bug 27595) sha1 search of list=filearchive does not work Still disabled in misermode, but switched for LIKE rather than = --- RELEASE-NOTES-1.19 | 1 + includes/api/ApiQueryFilearchive.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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() ) ); } } -- 2.20.1