mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge branch '3.2.x'
This commit is contained in:
@@ -1744,13 +1744,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)
|
||||
{
|
||||
@@ -1776,7 +1777,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)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user