diff options
author | callumacrae <callum@lynxphp.com> | 2013-07-12 21:52:10 -0400 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2013-11-19 07:32:49 -0800 |
commit | 0faafce4ce254ff282de801901372f67ca4f4415 (patch) | |
tree | e67a2f8b89a6057d88c03e0df045ee558de9c44e /phpBB/posting.php | |
parent | 46994e8dfbb3a50aeeb5b02cf850f8a7630b9e95 (diff) | |
download | forums-0faafce4ce254ff282de801901372f67ca4f4415.tar forums-0faafce4ce254ff282de801901372f67ca4f4415.tar.gz forums-0faafce4ce254ff282de801901372f67ca4f4415.tar.bz2 forums-0faafce4ce254ff282de801901372f67ca4f4415.tar.xz forums-0faafce4ce254ff282de801901372f67ca4f4415.zip |
[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
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 5db36007c2..6e9cc1aa94 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -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 |