From c3800968f7903193481e9ecce416913adc84f3fe Mon Sep 17 00:00:00 2001 From: PaulBender Date: Wed, 28 May 2014 19:46:40 -0400 Subject: [PATCH] Working on #556 Report Center Added plugin hooks in report.php --- report.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/report.php b/report.php index 11e14256de..93ed8ed811 100644 --- a/report.php +++ b/report.php @@ -22,6 +22,8 @@ error_no_permission(); } +$plugins->run_hooks("report_start"); + $report = array(); $verified = false; $report_type = 'post'; @@ -125,7 +127,7 @@ } } -// Plugin hook? +$plugins->run_hooks("report_type"); // Check for an existing report if(!empty($report_type_db)) @@ -151,6 +153,8 @@ { verify_post_check($mybb->get_input('my_post_key')); + $plugins->run_hooks("report_do_report_start"); + // Is this an existing report or a new offender? if(!empty($report)) { @@ -158,6 +162,8 @@ $report['reporters'][] = $mybb->user['uid']; update_report($report); + $plugins->run_hooks("report_do_report_end"); + eval("\$report_thanks = \"".$templates->get("report_thanks")."\";"); echo $report_thanks; exit; @@ -191,6 +197,8 @@ $new_report['reason'] = $reason; add_report($new_report, $report_type); + $plugins->run_hooks("report_do_report_end"); + eval("\$report_thanks = \"".$templates->get("report_thanks")."\";"); echo $report_thanks; exit; @@ -239,6 +247,8 @@ exit; } + $plugins->run_hooks("report_end"); + eval("\$report = \"".$templates->get("report", 1, 0)."\";"); echo $report; exit;