diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-16 16:54:51 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-06-16 16:54:51 +0000 |
commit | b0c3e3958220c04cbb4f25f0c24b53b65a34e360 (patch) | |
tree | 6c23cb4352a297b4dade2b3a1aa6706b89a53c82 /phpBB/includes/acp/acp_bots.php | |
parent | a3c9182e0f9efeb193f5ef682d1945382f234eb3 (diff) | |
download | forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.gz forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.bz2 forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.tar.xz forums-b0c3e3958220c04cbb4f25f0c24b53b65a34e360.zip |
- removed db cache (might re-appear, but for now we do not see the need for it)
- all changes to styles/subsilver/template are purely cosmetic (no functional changes)
- cosmetics
- bugfixes
- add index to modules table
- use modules ordering code for forums too
git-svn-id: file:///svn/phpbb/trunk@6073 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_bots.php')
-rw-r--r-- | phpBB/includes/acp/acp_bots.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php index 407bf554a5..a57283e3ea 100644 --- a/phpBB/includes/acp/acp_bots.php +++ b/phpBB/includes/acp/acp_bots.php @@ -111,6 +111,8 @@ class acp_bots case 'edit': case 'add': + include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); + $bot_row = array( 'bot_name' => request_var('bot_name', '', true), 'bot_agent' => request_var('bot_agent', ''), @@ -160,25 +162,18 @@ class acp_bots trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action")); } - $sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + $user_id = user_add(array( + 'user_type' => (int) USER_IGNORE, 'group_id' => (int) $group_row['group_id'], 'username' => (string) $bot_row['bot_name'], - 'user_type' => (int) USER_IGNORE, + 'user_regdate' => time(), + 'user_password' => '', 'user_colour' => (string) $group_row['group_colour'], + 'user_email' => '', 'user_lang' => (string) $bot_row['bot_lang'], 'user_style' => (int) $bot_row['bot_style'], 'user_options' => 0) ); - $db->sql_query($sql); - - $user_id = $db->sql_nextid(); - - // Add to Bots usergroup - $sql = 'INSERT INTO ' . USER_GROUP_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'user_id' => $user_id, - 'group_id' => $group_row['group_id']) - ); - $db->sql_query($sql); $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'user_id' => (int) $user_id, @@ -225,7 +220,7 @@ class acp_bots $db->sql_transaction('commit'); $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 . "&id=$bot_id&action=$action")); } |