diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-11-09 12:47:50 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-11-09 12:47:50 +0100 |
commit | 520ffdf368bee84549a0b284bd2df4da1d633a8f (patch) | |
tree | 0db82e3948bd4b5bdd309a73d40ce5880d5af859 /phpBB/install/database_update.php | |
parent | c054757f3caad66152eaafe09f2c98abcb9ef0e2 (diff) | |
download | forums-520ffdf368bee84549a0b284bd2df4da1d633a8f.tar forums-520ffdf368bee84549a0b284bd2df4da1d633a8f.tar.gz forums-520ffdf368bee84549a0b284bd2df4da1d633a8f.tar.bz2 forums-520ffdf368bee84549a0b284bd2df4da1d633a8f.tar.xz forums-520ffdf368bee84549a0b284bd2df4da1d633a8f.zip |
[ticket/10897] Make sure the user we're fetching is a bot.
PHPBB3-10897
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r-- | phpBB/install/database_update.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 154fc313a0..bd12a90288 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2132,8 +2132,9 @@ function change_database_data(&$no_updates, $version) foreach ($bots_to_update as $bot_name => $bot_agent) { $sql = 'SELECT user_id - FROM ' . USERS_TABLE . " - WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'"; + FROM ' . USERS_TABLE . ' + WHERE user_type = ' . USER_IGNORE . " + AND username_clean = '" . $db->sql_escape(utf8_clean_string($bot_name)) . "'"; $result = $db->sql_query($sql); $bot_user_id = (int) $db->sql_fetchfield('user_id'); $db->sql_freeresult($result); |