Ver código fonte

We can "un-disregard" and close a report from here too so add their respective tokens

Signed-off-by: Suki <[email protected]>
Suki 10 anos atrás
pai
commit
c44f8d3f15

+ 4 - 0
Sources/ReportedPosts.php

@@ -362,6 +362,10 @@ function ReportDetails()
 
 	createToken('mod-reportC-add');
 	createToken('mod-reportC-delete', 'get');
+
+	// We can "un-disregard" and close a report from here so add their respective tokens.
+	createToken('mod-report-ignore', 'get');
+	createToken('mod-report-closed', 'get');
 }
 
 function HandleComment()

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

@@ -207,8 +207,8 @@ function template_viewmodreport()
 		$unignore_button = create_button('ignore.png', 'mc_reportedp_unignore', 'mc_reportedp_unignore', 'class="centericon"');
 
 		echo '
-						<a href="', $scripturl, '?action=moderate;area=reports;sa=handle;ignore=', (int) !$context['report']['ignore'], ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], '" class="report_ignore" data-ignore="', !$context['report']['ignore'] ,'">', $context['report']['ignore'] ? $unignore_button : $ignore_button, '</a>
-						<a href="', $scripturl, '?action=moderate;area=reports;sa=handle;closed=', (int) !$context['report']['closed'], ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $close_button, '</a>
+						<a href="', $scripturl, '?action=moderate;area=reports;sa=handle;ignore=', (int) !$context['report']['ignore'], ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-ignore_token_var'], '=', $context['mod-report-ignore_token'], '" class="report_ignore" data-ignore="', !$context['report']['ignore'] ,'">', $context['report']['ignore'] ? $unignore_button : $ignore_button, '</a>
+						<a href="', $scripturl, '?action=moderate;area=reports;sa=handle;closed=', (int) !$context['report']['closed'], ';rid=', $context['report']['id'], ';', $context['session_var'], '=', $context['session_id'], ';', $context['mod-report-closed_token_var'], '=', $context['mod-report-closed_token'], '">', $close_button, '</a>
 					</span>
 				</h3>
 			</div>