diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-11-09 12:45:20 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-11-09 12:46:21 +0100 |
commit | c054757f3caad66152eaafe09f2c98abcb9ef0e2 (patch) | |
tree | 7710cabc2c9b6e8b1a5580418200ea4c50220b4b /phpBB/install/database_update.php | |
parent | 63c64694bc253358a50dce7dce99a7551b5e2b17 (diff) | |
download | forums-c054757f3caad66152eaafe09f2c98abcb9ef0e2.tar forums-c054757f3caad66152eaafe09f2c98abcb9ef0e2.tar.gz forums-c054757f3caad66152eaafe09f2c98abcb9ef0e2.tar.bz2 forums-c054757f3caad66152eaafe09f2c98abcb9ef0e2.tar.xz forums-c054757f3caad66152eaafe09f2c98abcb9ef0e2.zip |
[ticket/10897] Do not handle IP address. There is no need.
PHPBB3-10897
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r-- | phpBB/install/database_update.php | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 6496069658..154fc313a0 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2121,17 +2121,16 @@ function change_database_data(&$no_updates, $version) _sql($sql, $errored, $error_ary); // Update bot list + // Bot name to bot user agent map $bots_to_update = array( - 'Baidu [Spider]' => array('Baiduspider', ''), - 'Exabot [Bot]' => array('Exabot', ''), - 'Voyager [Bot]' => array('voyager/', ''), - 'W3C [Validator]' => array('W3C_Validator', ''), + 'Baidu [Spider]' => 'Baiduspider', + 'Exabot [Bot]' => 'Exabot', + 'Voyager [Bot]' => 'voyager/', + 'W3C [Validator]' => 'W3C_Validator', ); - foreach ($bots_to_update as $bot_name => $bot_array) + foreach ($bots_to_update as $bot_name => $bot_agent) { - list($bot_agent, $bot_ip) = $bot_array; - $sql = 'SELECT user_id FROM ' . USERS_TABLE . " WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'"; @@ -2141,13 +2140,8 @@ function change_database_data(&$no_updates, $version) if ($bot_user_id) { - $update_array = array( - 'bot_agent' => $bot_agent, - 'bot_ip' => $bot_ip, - ); - $sql = 'UPDATE ' . BOTS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $update_array) . " + SET bot_agent = ' . $db->sql_escape($bot_agent) . " WHERE user_id = $bot_user_id"; _sql($sql, $errored, $error_ary); } |