aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-04-29 20:22:38 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-04-29 20:22:38 +0000
commit202861eec9ca571cfae48002f2e0524986ae69bf (patch)
treea74672ab8976081f8a8ed74fc3d1654ad7cb3aec /phpBB
parent290187c6c79d069ea669384c515ba38965ff1002 (diff)
downloadforums-202861eec9ca571cfae48002f2e0524986ae69bf.tar
forums-202861eec9ca571cfae48002f2e0524986ae69bf.tar.gz
forums-202861eec9ca571cfae48002f2e0524986ae69bf.tar.bz2
forums-202861eec9ca571cfae48002f2e0524986ae69bf.tar.xz
forums-202861eec9ca571cfae48002f2e0524986ae69bf.zip
#10255
git-svn-id: file:///svn/phpbb/trunk@7427 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/acp/auth.php17
-rw-r--r--phpBB/includes/auth.php4
2 files changed, 15 insertions, 6 deletions
diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php
index ce6a08bf0b..4dfa617caf 100644
--- a/phpBB/includes/acp/auth.php
+++ b/phpBB/includes/acp/auth.php
@@ -969,10 +969,19 @@ class auth_admin extends auth
if ($permission_type !== false)
{
// Get permission type
- $sql = 'SELECT auth_option, auth_option_id
- FROM ' . ACL_OPTIONS_TABLE . "
- WHERE auth_option LIKE '" . $db->sql_escape(str_replace('_', "\_", $permission_type)) . "%'";
- $sql .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : '';
+ if ($db->sql_layer == 'sqlite')
+ {
+ $sql = 'SELECT auth_option, auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option LIKE '" . $db->sql_escape($permission_type) . "%'";
+ }
+ else
+ {
+ $sql = 'SELECT auth_option, auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option LIKE '" . $db->sql_escape(str_replace('_', "\_", $permission_type)) . "%'";
+ $sql .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : '';
+ }
$result = $db->sql_query($sql);
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php
index 3d508a23ce..de1b669eba 100644
--- a/phpBB/includes/auth.php
+++ b/phpBB/includes/auth.php
@@ -842,7 +842,7 @@ class auth
{
if (strpos($auth_options, '%') !== false)
{
- if (strpos($auth_options, '_') !== false)
+ if (strpos($auth_options, '_') !== false && $db->sql_layer !== 'sqlite')
{
$sql_opts = "AND $key LIKE '" . $db->sql_escape(str_replace('_', "\_", $auth_options)) . "'";
$sql_opts .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\' " : '';
@@ -881,7 +881,7 @@ class auth
{
if (strpos($option, '%') !== false)
{
- if (strpos($option, '_') !== false)
+ if (strpos($option, '_') !== false && $db->sql_layer !== 'sqlite')
{
$_sql = $key . " LIKE '" . $db->sql_escape(str_replace('_', "\_", $option)) . "'";
$_sql .= ($db->sql_layer == 'mssql' || $db->sql_layer == 'mssql_odbc') ? " ESCAPE '\\'" : '';