aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-02-20 02:16:41 +0100
committerJoas Schilling <nickvergessen@gmx.de>2012-02-20 02:18:48 +0100
commitef154b78a169402e7f968cd2189b69b041a73543 (patch)
tree11f55dc17b068bcd2a62a062b5fc904358e43b60 /phpBB/includes/search
parentafcf9cbc8617462853d3b42e4dfc9f1f46051e79 (diff)
downloadforums-ef154b78a169402e7f968cd2189b69b041a73543.tar
forums-ef154b78a169402e7f968cd2189b69b041a73543.tar.gz
forums-ef154b78a169402e7f968cd2189b69b041a73543.tar.bz2
forums-ef154b78a169402e7f968cd2189b69b041a73543.tar.xz
forums-ef154b78a169402e7f968cd2189b69b041a73543.zip
[ticket/10630] Use sql_like_expression() method instead of hardcoded LIKE '%x%'
PHPBB3-10630
Diffstat (limited to 'phpBB/includes/search')
-rw-r--r--phpBB/includes/search/search.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/search/search.php b/phpBB/includes/search/search.php
index 2f20d11495..df7c8a0892 100644
--- a/phpBB/includes/search/search.php
+++ b/phpBB/includes/search/search.php
@@ -295,7 +295,7 @@ class search_backend
$sql_where = '';
foreach ($authors as $author)
{
- $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors LIKE \'% ' . (int) $author . ' %\'';
+ $sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->any_char . ' ' . (int) $author . ' ' . $db->any_char);
}
$sql = 'SELECT search_key