1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +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:
callumacrae
2013-07-12 21:52:10 -04:00
committed by Cesar G
parent 46994e8dfb
commit 0faafce4ce
4 changed files with 53 additions and 14 deletions

View File

@@ -1128,7 +1128,7 @@ function display_user_activity(&$userdata)
*/
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0, $item_title = '')
{
global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
global $template, $db, $user, $phpEx, $start, $phpbb_root_path, $request;
global $request;
$table_sql = ($mode == 'forum') ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;
@@ -1167,7 +1167,11 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
if ($uid != $user_id || $request->variable('unwatch', '', false, \phpbb\request\request_interface::GET) != $mode)
{
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
$message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
$message = $user->lang['ERR_UNWATCHING'];
if (!$request->is_ajax())
{
$message .= '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
}
trigger_error($message);
}
@@ -1177,8 +1181,11 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />';
$message .= sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)];
if (!$request->is_ajax())
{
$message .= '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
}
meta_refresh(3, $redirect_url);
trigger_error($message);
}
@@ -1232,7 +1239,11 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
if ($uid != $user_id || $request->variable('watch', '', false, \phpbb\request\request_interface::GET) != $mode)
{
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
$message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
$message = $user->lang['ERR_WATCHING'];
if (!$request->is_ajax())
{
$message .= '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
}
trigger_error($message);
}
@@ -1243,7 +1254,11 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
$db->sql_query($sql);
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&amp;start=$start");
$message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
$message = $user->lang['ARE_WATCHING_' . strtoupper($mode)];
if (!$request->is_ajax())
{
$message .= '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
}
meta_refresh(3, $redirect_url);
trigger_error($message);
}