From c6473da412d1a572ed80ec10d826239ad5ce5098 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Thu, 17 Oct 2013 20:14:14 -0700 Subject: [ticket/11672] Replace sprintf() usage with $user->lang(). PHPBB3-11672 --- phpBB/includes/functions_display.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions_display.php') diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 8829554276..140ffc42f0 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -1168,9 +1168,10 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, { $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start"); $message = $user->lang['ERR_UNWATCHING']; + if (!$request->is_ajax()) { - $message .= '

' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', ''); + $message .= '

' . $user->lang('RETURN_' . strtoupper($mode), '', ''); } trigger_error($message); } @@ -1182,9 +1183,10 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start"); $message = $user->lang['NOT_WATCHING_' . strtoupper($mode)]; + if (!$request->is_ajax()) { - $message .= '

' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', ''); + $message .= '

' . $user->lang('RETURN_' . strtoupper($mode), '', ''); } meta_refresh(3, $redirect_url); trigger_error($message); @@ -1240,9 +1242,10 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, { $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start"); $message = $user->lang['ERR_WATCHING']; + if (!$request->is_ajax()) { - $message .= '

' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', ''); + $message .= '

' . $user->lang('RETURN_' . strtoupper($mode), '', ''); } trigger_error($message); } @@ -1255,9 +1258,10 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start"); $message = $user->lang['ARE_WATCHING_' . strtoupper($mode)]; + if (!$request->is_ajax()) { - $message .= '

' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '', ''); + $message .= '

' . $user->lang('RETURN_' . strtoupper($mode), '', ''); } meta_refresh(3, $redirect_url); trigger_error($message); -- cgit v1.2.1