diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-23 12:16:20 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-06-23 12:16:20 +0000 |
commit | 318418b0f266998895f88e9fcbcd3873a518c4b5 (patch) | |
tree | 7fb1714171d4744d4df35138da1a3e799f28db90 /phpBB/includes/acp/acp_permission_roles.php | |
parent | 1e2db705ca061228ddedd312e00d99cfce2a2ae6 (diff) | |
download | forums-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_permission_roles.php')
-rw-r--r-- | phpBB/includes/acp/acp_permission_roles.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php index 4728168a82..d3df765e6e 100644 --- a/phpBB/includes/acp/acp_permission_roles.php +++ b/phpBB/includes/acp/acp_permission_roles.php @@ -239,7 +239,7 @@ class acp_permission_roles { $sql = 'SELECT auth_option_id, auth_option FROM ' . ACL_OPTIONS_TABLE . " - WHERE auth_option LIKE '{$permission_type}%' + WHERE auth_option " . $db->sql_like_expression($permission_type . '%') . " AND auth_option <> '{$permission_type}' ORDER BY auth_option_id"; $result = $db->sql_query($sql); @@ -305,7 +305,7 @@ class acp_permission_roles // We need to fill the auth options array with ACL_NO options ;) $sql = 'SELECT auth_option_id, auth_option FROM ' . ACL_OPTIONS_TABLE . " - WHERE auth_option LIKE '{$permission_type}%' + WHERE auth_option " . $db->sql_like_expression($permission_type . '%') . " AND auth_option <> '{$permission_type}' ORDER BY auth_option_id"; $result = $db->sql_query($sql); @@ -490,7 +490,7 @@ class acp_permission_roles // Get complete auth array $sql = 'SELECT auth_option, auth_option_id FROM ' . ACL_OPTIONS_TABLE . " - WHERE auth_option LIKE '" . $db->sql_escape($permission_type) . "%'"; + WHERE auth_option " . $db->sql_like_expression($permission_type . '%'); $result = $db->sql_query($sql); $auth_settings = array(); |