diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 17:52:18 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 17:52:18 +0000 |
commit | e4158cbf4159183b7d9362cf30c7fd5dfb1d877a (patch) | |
tree | d4f33641da43b059e4921638907f212212b2be09 /mod/reportedcontent/actions/add.php | |
parent | d7f37fc752418661e0dadae8dfc40f07e7603740 (diff) | |
download | elgg-e4158cbf4159183b7d9362cf30c7fd5dfb1d877a.tar.gz elgg-e4158cbf4159183b7d9362cf30c7fd5dfb1d877a.tar.bz2 |
updated reported content to use elgg_view_form
git-svn-id: http://code.elgg.org/elgg/trunk@8166 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/actions/add.php')
-rw-r--r-- | mod/reportedcontent/actions/add.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/mod/reportedcontent/actions/add.php b/mod/reportedcontent/actions/add.php deleted file mode 100644 index f0a1b05c8..000000000 --- a/mod/reportedcontent/actions/add.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * Elgg report action - * - * @package ElggReportContent - */ -$title = get_input('title'); -$description = get_input('description'); -$address = get_input('address'); -$access = ACCESS_PRIVATE; //this is private and only admins can see it - -if ($title && $address) { - - $report = new ElggObject; - $report->subtype = "reported_content"; - $report->owner_guid = elgg_get_logged_in_user_guid(); - $report->title = $title; - $report->address = $address; - $report->description = $description; - $report->access_id = $access; - - if ($report->save()) { - if (!elgg_trigger_plugin_hook('reportedcontent:add', 'system', array('report' => $report), true)) { - $report->delete(); - register_error(elgg_echo('reportedcontent:failed')); - } else { - system_message(elgg_echo('reportedcontent:success')); - $report->state = "active"; - } - forward($address); - } else { - register_error(elgg_echo('reportedcontent:failed')); - forward($address); - } -} else { - - register_error(elgg_echo('reportedcontent:failed')); - forward($address); -} |