diff options
-rw-r--r-- | phpBB/includes/acp/acp_bots.php | 22 | ||||
-rw-r--r-- | phpBB/includes/functions_posting.php | 6 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 4 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 4 | ||||
-rw-r--r-- | phpBB/language/en/posting.php | 1 | ||||
-rw-r--r-- | phpBB/memberlist.php | 2 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/memberlist_view.html | 2 |
7 files changed, 27 insertions, 14 deletions
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php index 0b1cdb122f..7e1c31dc44 100644 --- a/phpBB/includes/acp/acp_bots.php +++ b/phpBB/includes/acp/acp_bots.php @@ -206,7 +206,7 @@ class acp_bots } else if ($bot_id) { - $sql = 'SELECT user_id + $sql = 'SELECT user_id, bot_name FROM ' . BOTS_TABLE . " WHERE bot_id = $bot_id"; $result = $db->sql_query($sql); @@ -218,10 +218,18 @@ class acp_bots trigger_error($user->lang['NO_BOT'] . adm_back_link($this->u_action . "&id=$bot_id&action=$action"), E_USER_WARNING); } - $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( + $sql_ary = array( 'user_style' => (int) $bot_row['bot_style'], - 'user_lang' => (string) $bot_row['bot_lang']) - ) . " WHERE user_id = {$row['user_id']}"; + 'user_lang' => (string) $bot_row['bot_lang'], + ); + + if ($bot_row['bot_name'] !== $row['bot_name']) + { + $sql_ary['username'] = (string) $bot_row['bot_name']; + $sql_ary['username_clean'] = (string) utf8_clean_string($bot_row['bot_name']); + } + + $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE user_id = {$row['user_id']}"; $db->sql_query($sql); $sql = 'UPDATE ' . BOTS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array( @@ -232,6 +240,12 @@ class acp_bots ) . " WHERE bot_id = $bot_id"; $db->sql_query($sql); + // Updated username? + if ($bot_row['bot_name'] !== $row['bot_name']) + { + user_update_name($row['bot_name'], $bot_row['bot_name']); + } + $log = 'UPDATED'; } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 49ed4932a3..51bcf2e583 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1324,12 +1324,12 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) $db->sql_transaction('commit'); // Adjust posted info for this user by looking for a post by him/her within this topic... - if ($post_mode != 'delete_topic' && $config['load_db_track'] && $user->data['is_registered']) + if ($post_mode != 'delete_topic' && $config['load_db_track'] && $data['poster_id'] != ANONYMOUS) { $sql = 'SELECT poster_id FROM ' . POSTS_TABLE . ' WHERE topic_id = ' . $topic_id . ' - AND poster_id = ' . $user->data['user_id']; + AND poster_id = ' . $data['poster_id']; $result = $db->sql_query_limit($sql, 1); $poster_id = (int) $db->sql_fetchfield('poster_id'); $db->sql_freeresult($result); @@ -1339,7 +1339,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) { $sql = 'DELETE FROM ' . TOPICS_POSTED_TABLE . ' WHERE topic_id = ' . $topic_id . ' - AND user_id = ' . $user->data['user_id']; + AND user_id = ' . $data['poster_id']; $db->sql_query($sql); } } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 5717dbc4d2..ae52373609 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -488,7 +488,7 @@ flush(); $no_updates = true; // some code magic -if (version_compare($current_version, '3.0.b3', '<')) +if (version_compare($current_version, '3.0.b3', '<=')) { // Set group_founder_manage for administrators group $sql = 'SELECT group_id @@ -510,7 +510,7 @@ if (version_compare($current_version, '3.0.b3', '<')) $no_updates = false; } -if (version_compare($current_version, '3.0.b4', '<')) +if (version_compare($current_version, '3.0.b4', '<=')) { // Add config values set_config('script_path', '/'); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index abc6021deb..9bc38ab00e 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -471,13 +471,13 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_'; # Read Only Access (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_search', 'f_subscribe'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_search', 'f_subscribe', 'f_print'); # Limited Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg'); # Bot Access (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_print'); # On Moderation Queue (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove'); diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index a4dee8e31a..d84987a590 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -127,7 +127,6 @@ $lang = array_merge($lang, array( 'NO_POLL_TITLE' => 'You have to enter a poll title', 'NO_POST' => 'The requested post does not exist.', 'NO_POST_MODE' => 'No post mode specified', - 'NO_TOPIC_ICON' => 'None', 'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded', 'PHP_SIZE_NA' => 'The attachmentâs filesize is too large.<br />Could not determine the maximum size defined by PHP in php.ini.', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index b06fbea482..c53c9de6a3 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1388,7 +1388,7 @@ function show_profile($data) $rank_title = $rank_img = $rank_img_src = ''; get_user_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src); - + if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_email')) { $email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_email')) ? '' : 'mailto:' . $data['user_email']); diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html index d8885370a0..4c7cabc5e9 100644 --- a/phpBB/styles/subSilver/template/memberlist_view.html +++ b/phpBB/styles/subSilver/template/memberlist_view.html @@ -22,7 +22,7 @@ </tr> <!-- ENDIF --> <tr> - <td align="center"><!-- IF USER_COLOR --><b class="gen" style="color: #{USER_COLOR}"><!-- ELSE --><b class="gen"><!-- ENDIF -->{USERNAME}</b><!-- IF U_USER_ADMIN --><span class="genmed"> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]</span><!-- ENDIF --></td> + <td align="center"><!-- IF USER_COLOR --><b class="gen" style="color: {USER_COLOR}"><!-- ELSE --><b class="gen"><!-- ENDIF -->{USERNAME}</b><!-- IF U_USER_ADMIN --><span class="genmed"> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]</span><!-- ENDIF --></td> </tr> <!-- IF RANK --> <tr> |