diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions_content.php | 15 | ||||
| -rw-r--r-- | phpBB/includes/functions_user.php | 26 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 6 | 
3 files changed, 37 insertions, 10 deletions
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_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)  | 
