aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php17
-rw-r--r--phpBB/includes/acp/acp_bots.php2
-rw-r--r--phpBB/includes/acp/acp_email.php2
3 files changed, 14 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 08b5f863e0..8e43361ba1 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -479,14 +479,21 @@ class acp_attachments
// Check New Group Name
if ($new_group_name)
{
- $sql = 'SELECT group_id
- FROM ' . EXTENSION_GROUPS_TABLE . "
- WHERE LOWER(group_name) = '" . $db->sql_escape(utf8_strtolower($new_group_name)) . "'";
+ $sql = 'SELECT group_name
+ FROM ' . EXTENSION_GROUPS_TABLE;
$result = $db->sql_query($sql);
+ $ext_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ $clean_group_name = utf8_clean_string($new_group_name);
- if ($db->sql_fetchrow($result))
+ while ($row = $db->sql_fetchrow($result))
{
- $error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $new_group_name);
+ if (utf8_clean_string($row['group_name']) === $clean_group_name)
+ {
+ $error[] = sprintf($user->lang['EXTENSION_GROUP_EXIST'], $new_group_name);
+ break;
+ }
}
$db->sql_freeresult($result);
}
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index d08cabb062..81ac239358 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -210,7 +210,7 @@ class acp_bots
{
$sql = 'SELECT group_id, group_colour
FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'BOTS'
+ WHERE group_name_clean = 'bots'
AND group_type = " . GROUP_SPECIAL;
$result = $db->sql_query($sql);
$group_row = $db->sql_fetchrow($result);
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index 125908c296..c964530c32 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -227,7 +227,7 @@ class acp_email
// Exclude bots and guests...
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
- WHERE group_name IN ('BOTS', 'GUESTS')";
+ WHERE group_name_clean IN ('bots', 'guests')";
$result = $db->sql_query($sql);
$exclude = array();