aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_bots.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-08-13 12:14:07 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-08-13 12:14:07 +0000
commite9188d4e05eeadfd9246d9dc44160736f6fa64d6 (patch)
tree7fcdcc5cd7c7e90e2ae4f8abc309fc74101b025b /phpBB/includes/acp/acp_bots.php
parent11f05e3513f4133cce57d4177f9616c1ef32cd34 (diff)
downloadforums-e9188d4e05eeadfd9246d9dc44160736f6fa64d6.tar
forums-e9188d4e05eeadfd9246d9dc44160736f6fa64d6.tar.gz
forums-e9188d4e05eeadfd9246d9dc44160736f6fa64d6.tar.bz2
forums-e9188d4e05eeadfd9246d9dc44160736f6fa64d6.tar.xz
forums-e9188d4e05eeadfd9246d9dc44160736f6fa64d6.zip
Some changes... non-invasive...
git-svn-id: file:///svn/phpbb/trunk@8025 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_bots.php')
-rw-r--r--phpBB/includes/acp/acp_bots.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index dbee5f6eed..93108c7fec 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -279,7 +279,7 @@ class acp_bots
$cache->destroy('_bots');
add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
- trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action . "&amp;id=$bot_id&amp;action=$action"));
+ trigger_error($user->lang['BOT_' . $log] . adm_back_link($this->u_action));
}
}
@@ -376,14 +376,19 @@ class acp_bots
$db->sql_freeresult($result);
}
+ /**
+ * Validate bot name against username table
+ */
function validate_botname($newname, $oldname = false)
{
global $db;
+
if ($oldname && utf8_clean_string($newname) === $oldname)
{
return true;
}
- // Admins might want to use names otherwise forbidden, thus we only check for duplicates.
+
+ // Admins might want to use names otherwise forbidden, thus we only check for duplicates.
$sql = 'SELECT username
FROM ' . USERS_TABLE . "
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($newname)) . "'";
@@ -391,14 +396,7 @@ class acp_bots
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if ($row)
- {
- return false;
- }
- else
- {
- return true;
- }
+ return ($row) ? false : true;
}
}