From 5aa220bcd21c6e3decd8f2b9833dc90a8ee6a274 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 24 Jun 2007 12:49:13 +0000 Subject: tweak the sql_like_expression feature a little bit to allow correct escaping git-svn-id: file:///svn/phpbb/trunk@7789 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/auth.php') diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 6601527026..76d6036c77 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -842,7 +842,7 @@ class auth { if (strpos($auth_options, '%') !== false) { - $sql_opts = "AND $key " . $db->sql_like_expression($auth_options); + $sql_opts = "AND $key " . $db->sql_like_expression(str_replace('%', $db->any_char, $auth_options)); } else { @@ -873,7 +873,7 @@ class auth { if (strpos($option, '%') !== false) { - $sql[] = $key . ' ' . $db->sql_like_expression($option); + $sql[] = $key . ' ' . $db->sql_like_expression(str_replace('%', $db->any_char, $option)); } else { -- cgit v1.2.1