diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/constants.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_content.php | 15 | ||||
-rw-r--r-- | phpBB/includes/functions_display.php | 7 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 26 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 6 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 |
6 files changed, 46 insertions, 13 deletions
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 70ceed1036..d80f348ac5 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -28,7 +28,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -@define('PHPBB_VERSION', '3.2.5-dev'); +@define('PHPBB_VERSION', '3.2.6-dev'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 8284aab6a4..a15a03f966 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -1762,13 +1762,14 @@ class bitfield /** * Formats the quote according to the given BBCode status setting * - * @param bool $bbcode_status The status of the BBCode setting - * @param array $quote_attributes The attributes of the quoted post - * @param phpbb\textformatter\utils $text_formatter_utils Text formatter utilities - * @param parse_message $message_parser Message parser class - * @param string $message_link Link of the original quoted post + * @param phpbb\language\language $language Language class + * @param parse_message $message_parser Message parser class + * @param phpbb\textformatter\utils_interface $text_formatter_utils Text formatter utilities + * @param bool $bbcode_status The status of the BBCode setting + * @param array $quote_attributes The attributes of the quoted post + * @param string $message_link Link of the original quoted post */ -function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_utils, $message_parser, $message_link = '') +function phpbb_format_quote($language, $message_parser, $text_formatter_utils, $bbcode_status, $quote_attributes, $message_link = '') { if ($bbcode_status) { @@ -1794,7 +1795,7 @@ function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_u $message = $quote_string . $message; $message = str_replace("\n", "\n" . $quote_string, $message); - $message_parser->message = $quote_attributes['author'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n"; + $message_parser->message = $quote_attributes['author'] . " " . $language->lang('WROTE') . ":\n" . $message . "\n"; } if ($message_link) diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 4c1a90d5b5..792467019f 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1241,6 +1241,7 @@ function display_user_activity(&$userdata_ary) } $userdata = $userdata_ary; + $show_user_activity = true; /** * Alter list of forums and topics to display as active * @@ -1248,9 +1249,11 @@ function display_user_activity(&$userdata_ary) * @var array userdata User's data * @var array active_f_row List of active forums * @var array active_t_row List of active posts + * @var bool show_user_activity Show user forum and topic activity * @since 3.1.0-RC3 + * @changed 3.2.5-RC1 Added show_user_activity into event */ - $vars = array('userdata', 'active_f_row', 'active_t_row'); + $vars = array('userdata', 'active_f_row', 'active_t_row', 'show_user_activity'); extract($phpbb_dispatcher->trigger_event('core.display_user_activity_modify_actives', compact($vars))); $userdata_ary = $userdata; unset($userdata); @@ -1287,7 +1290,7 @@ function display_user_activity(&$userdata_ary) 'ACTIVE_TOPIC_PCT' => sprintf($l_active_pct, $active_t_pct), 'U_ACTIVE_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $active_f_id), 'U_ACTIVE_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $active_t_id), - 'S_SHOW_ACTIVITY' => true) + 'S_SHOW_ACTIVITY' => $show_user_activity) ); } diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index d019b867fa..26bb987561 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -666,8 +666,29 @@ function user_delete($mode, $user_ids, $retain_username = true) delete_posts('poster_id', $user_ids); } - $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE, $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), $phpbb_container->getParameter('tables.auth_provider_oauth_states'), $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc')); - + $table_ary = [ + USERS_TABLE, + USER_GROUP_TABLE, + TOPICS_WATCH_TABLE, + FORUMS_WATCH_TABLE, + ACL_USERS_TABLE, + TOPICS_TRACK_TABLE, + TOPICS_POSTED_TABLE, + FORUMS_TRACK_TABLE, + PROFILE_FIELDS_DATA_TABLE, + MODERATOR_CACHE_TABLE, + DRAFTS_TABLE, + BOOKMARKS_TABLE, + SESSIONS_KEYS_TABLE, + PRIVMSGS_FOLDER_TABLE, + PRIVMSGS_RULES_TABLE, + $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), + $phpbb_container->getParameter('tables.auth_provider_oauth_states'), + $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc') + ]; + + // Ignore errors on deleting from non-existent tables, e.g. when migrating + $db->sql_return_on_error(true); // Delete the miscellaneous (non-post) data for the user foreach ($table_ary as $table) { @@ -675,6 +696,7 @@ function user_delete($mode, $user_ids, $retain_username = true) WHERE " . $user_id_sql; $db->sql_query($sql); } + $db->sql_return_on_error(); $cache->destroy('sql', MODERATOR_CACHE_TABLE); diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index bc59d8ca86..b1b039add1 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -986,7 +986,11 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $quote_attributes['post_id'] = $post['msg_id']; } - phpbb_format_quote($bbcode_status, $quote_attributes, $phpbb_container->get('text_formatter.utils'), $message_parser, $message_link); + /** @var \phpbb\language\language $language */ + $language = $phpbb_container->get('language'); + /** @var \phpbb\textformatter\utils_interface $text_formatter_utils */ + $text_formatter_utils = $phpbb_container->get('text_formatter.utils'); + phpbb_format_quote($language, $message_parser, $text_formatter_utils, $bbcode_status, $quote_attributes, $message_link); } if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !$preview && !$refresh) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 5d7e32c8f3..7c0091ef47 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -296,7 +296,9 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) * @var array cp_row Array with senders custom profile field data * @var array msg_data Template array with message data * @var array user_info User data of the sender + * @var array attachments Attachments data * @since 3.2.2-RC1 + * @changed 3.2.5-RC1 Added attachments */ $vars = array( 'id', @@ -308,6 +310,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'cp_row', 'msg_data', 'user_info', + 'attachments', ); extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_message', compact($vars))); |