Explorar o código

re-arrange the close and "disregard" buttons

Signed-off-by: Suki <[email protected]>
Suki %!s(int64=11) %!d(string=hai) anos
pai
achega
755741ca99
Modificáronse 2 ficheiros con 5 adicións e 5 borrados
  1. 3 3
      Sources/ReportedPosts.php
  2. 2 2
      Themes/default/ReportedPosts.template.php

+ 3 - 3
Sources/ReportedPosts.php

@@ -78,6 +78,9 @@ function ShowReports()
 {
 	global $context, $txt, $scripturl;
 
+	// Showing closed or open ones? regardless, turn this to an integer for better handling.
+	$context['view_closed'] = (int) isset($_GET['closed']);
+
 	// Put the open and closed options into tabs, because we can...
 	$context[$context['moderation_menu_name']]['tab_data'] = array(
 		'title' => $txt['mc_reported_posts'],
@@ -89,9 +92,6 @@ function ShowReports()
 		),
 	);
 
-	// Showing closed or open ones? regardless, turn this to an integer for better handling.
-	$context['view_closed'] = (int) isset($_GET['closed']);
-
 	// Call the right template.
 	$context['sub_template'] = 'reported_posts';
 	$context['start'] = (int) isset($_GET['start']) ? $_GET['start'] : 0;

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

@@ -63,8 +63,8 @@ function template_reported_posts()
 				<br>
 				<ul class="quickbuttons">
 					<li><a href="', $report['report_href'], '">', $details_button, '</a></li>
-					<li><a href="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=disregard' : '', ';ignore=', (int) !$report['ignore'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" ', !$report['ignore'] ? 'onclick="return confirm(\'' . $txt['mc_reportedp_ignore_confirm'] . '\');"' : '', '>', $report['ignore'] ? $unignore_button : $ignore_button, '</a></li>
-					<li><a href="', $scripturl, '?action=moderate;area=reports', $context['view_closed'] ? ';sa=disregard' : '', ';close=', (int) !$report['closed'], ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a></li>';
+					<li><a href="', $scripturl, '?action=moderate;area=reports;sa=disregard', !$report['ignore'] ? ';ignore' : '', ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '" ', !$report['ignore'] ? 'onclick="return confirm(\'' . $txt['mc_reportedp_ignore_confirm'] . '\');"' : '', '>', $report['ignore'] ? $unignore_button : $ignore_button, '</a></li>
+					<li><a href="', $scripturl, '?action=moderate;area=reports;sa=handle', !$report['closed'] ? ';close' : '', ';rid=', $report['id'], ';start=', $context['start'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a></li>';
 
 		// Delete message button.
 		if (!$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])))