mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-29 02:59:52 +02:00
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
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user