aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_users.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-06-23 12:16:20 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-06-23 12:16:20 +0000
commit318418b0f266998895f88e9fcbcd3873a518c4b5 (patch)
tree7fb1714171d4744d4df35138da1a3e799f28db90 /phpBB/includes/acp/acp_users.php
parent1e2db705ca061228ddedd312e00d99cfce2a2ae6 (diff)
downloadforums-318418b0f266998895f88e9fcbcd3873a518c4b5.tar
forums-318418b0f266998895f88e9fcbcd3873a518c4b5.tar.gz
forums-318418b0f266998895f88e9fcbcd3873a518c4b5.tar.bz2
forums-318418b0f266998895f88e9fcbcd3873a518c4b5.tar.xz
forums-318418b0f266998895f88e9fcbcd3873a518c4b5.zip
new wrapper for LIKE expressions to streamline the fixes. We actually need to adjust them for different DBMS as well as SQLite2 not supporting escaping characters in LIKE statements (which is a reason why we think about dropping sqlite support completely).
git-svn-id: file:///svn/phpbb/trunk@7788 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_users.php')
-rw-r--r--phpBB/includes/acp/acp_users.php24
1 files changed, 6 insertions, 18 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 122d1d9e35..0f7190d952 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1830,15 +1830,9 @@ class acp_users
{
// Select auth options
$sql = 'SELECT auth_option, is_local, is_global
- FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option LIKE '%" . $db->sql_escape('\_') . "'";
-
- if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
- {
- $sql .= " ESCAPE '\\' ";
- }
-
- $sql .= 'AND is_global = 1
+ FROM ' . ACL_OPTIONS_TABLE . '
+ WHERE auth_option ' . $db->sql_like_expression('%_') . '
+ AND is_global = 1
ORDER BY auth_option';
$result = $db->sql_query($sql);
@@ -1857,15 +1851,9 @@ class acp_users
{
$sql = 'SELECT auth_option, is_local, is_global
FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option LIKE '%" . $db->sql_escape('\_') . "'";
-
- if ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc')
- {
- $sql .= " ESCAPE '\\' ";
- }
-
- $sql .= 'AND is_local = 1
- ORDER BY is_global DESC, auth_option';
+ WHERE auth_option " . $db->sql_like_expression('%_') . "
+ AND is_local = 1
+ ORDER BY is_global DESC, auth_option";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))