aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/actions/delete.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-04 15:29:16 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-04 15:29:16 +0000
commitcb29f5f73e530b776002077f7c9afa45e094ff1c (patch)
treef458143d78c2f1942566b07239a65e47fd142925 /mod/reportedcontent/actions/delete.php
parent053480d718c7613d4b778350b757b9e35f9d8f54 (diff)
downloadelgg-cb29f5f73e530b776002077f7c9afa45e094ff1c.tar.gz
elgg-cb29f5f73e530b776002077f7c9afa45e094ff1c.tar.bz2
Added plugin hook triggers to reportedcontent plugin. Fixes #725
git-svn-id: https://code.elgg.org/elgg/trunk@2646 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/actions/delete.php')
-rw-r--r--mod/reportedcontent/actions/delete.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod/reportedcontent/actions/delete.php b/mod/reportedcontent/actions/delete.php
index 87ac0e40f..a4090fb19 100644
--- a/mod/reportedcontent/actions/delete.php
+++ b/mod/reportedcontent/actions/delete.php
@@ -21,6 +21,10 @@
if ($reported->getSubtype() == "reported_content" && $reported->canEdit()) {
// Delete it!
+ if (!trigger_plugin_hook('reportedcontent:delete', $entity->type, array('entity'=>$entity), true)) {
+ register_error(elgg_echo("reportedcontent:notdeleted"));
+ forward("pg/reportedcontent/");
+ }
$rowsaffected = $reported->delete();
if ($rowsaffected > 0) {
// Success message