From c17cb25960cc0b0b935b3d53b7d4658984be4ed4 Mon Sep 17 00:00:00 2001 From: Powen Tan Date: Tue, 7 Oct 2014 01:26:03 +0800 Subject: [PATCH] Fix the issue that search function will return all photos --- php/modules/misc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/modules/misc.php b/php/modules/misc.php index 74d434a..8a2d8c8 100755 --- a/php/modules/misc.php +++ b/php/modules/misc.php @@ -16,7 +16,7 @@ function search($database, $settings, $term) { $return['albums'] = ''; // Photos - $query = Database::prepare($database, "SELECT id, title, tags, public, star, album, thumbUrl FROM ? WHERE title LIKE '%?%' OR description LIKE '%%' OR tags LIKE '%?%'", array(LYCHEE_TABLE_PHOTOS, $term, $term, $term)); + $query = Database::prepare($database, "SELECT id, title, tags, public, star, album, thumbUrl FROM ? WHERE title LIKE '%?%' OR description LIKE '%?%' OR tags LIKE '%?%'", array(LYCHEE_TABLE_PHOTOS, $term, $term, $term)); $result = $database->query($query); while($row = $result->fetch_assoc()) { $return['photos'][$row['id']] = $row;