Просмотр исходного кода

Only show the buttons on active reports

Signed-off-by: Suki <[email protected]>
Suki 10 лет назад
Родитель
Сommit
88e6f4a834
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Themes/default/ModerationCenter.template.php

+ 2 - 2
Themes/default/ModerationCenter.template.php

@@ -237,12 +237,12 @@ function template_reported_posts()
 					<li><a href="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=closed' : '', ';close=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a></li>';
 
 		// Delete message button.
-		if (allowedTo('remove_any', $report['topic']['id_board']))
+		if (!$report['closed'] && allowedTo('remove_any', $report['topic']['id_board']))
 			echo '
 					<li><a href="', $scripturl, '?action=deletemsg;topic=', $report['topic']['id'] ,'.0;msg=', $report['topic']['id_msg'] ,';', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'' , $txt['mc_reportedp_delete_confirm'] , '\');">', $delete_button, '</a></li>';
 
 		// Ban this user button.
-		if (allowedTo('manage_bans', $report['topic']['id_board']))
+		if (!$report['closed'] && allowedTo('manage_bans', $report['topic']['id_board']))
 			echo '
 					<li><a href="', $scripturl, '?action=admin;area=ban;sa=add;u=', $report['author']['id'] ,';', $context['session_var'], '=', $context['session_id'], '">', $ban_button, '</a></li>';