mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/11672] Removed unnecessary text from alerts.
Messages like "Return to forum last visited" are entirely unnecessary when using AJAX to delete a post, so this commit removes them. PHPBB3-11672
This commit is contained in:
@@ -386,8 +386,12 @@ if ($mode == 'bump')
|
||||
$meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
|
||||
meta_refresh(3, $meta_url);
|
||||
|
||||
$message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
$message = $user->lang['TOPIC_BUMPED'];
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('VIEW_MESSAGE', '<a href="' . $meta_url . '">', '</a>');
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
}
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
@@ -1616,7 +1620,7 @@ function upload_popup($forum_style = 0)
|
||||
*/
|
||||
function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_soft = false, $soft_delete_reason = '')
|
||||
{
|
||||
global $user, $db, $auth, $config;
|
||||
global $user, $db, $auth, $config, $request;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$perm_check = ($is_soft) ? 'softdelete' : 'delete';
|
||||
@@ -1662,11 +1666,18 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof
|
||||
add_log('mod', $forum_id, $topic_id, (($is_soft) ? 'LOG_SOFTDELETE_POST' : 'LOG_DELETE_POST'), $post_data['post_subject'], $post_username);
|
||||
|
||||
$meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id";
|
||||
$message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
|
||||
$message = $user->lang['POST_DELETED'];
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>');
|
||||
}
|
||||
}
|
||||
|
||||
meta_refresh(3, $meta_info);
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
if (!$request->is_ajax())
|
||||
{
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) . '">', '</a>');
|
||||
}
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user