aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/actions
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-06 14:17:37 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-06 14:17:37 +0000
commite9f261e51adcaa80429fe14b04ee277ab3124ce9 (patch)
tree6637cbf6a3917d29adcdffb4d1e8ab562050fd61 /mod/reportedcontent/actions
parent44c6025cc9a1536a772bf74af8cc9c07b0efc8b6 (diff)
downloadelgg-e9f261e51adcaa80429fe14b04ee277ab3124ce9.tar.gz
elgg-e9f261e51adcaa80429fe14b04ee277ab3124ce9.tar.bz2
removed all main plugins from core - they now live in the plugins svn
git-svn-id: https://code.elgg.org/elgg/trunk@3422 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/actions')
-rw-r--r--mod/reportedcontent/actions/add.php49
-rw-r--r--mod/reportedcontent/actions/archive.php38
-rw-r--r--mod/reportedcontent/actions/delete.php41
3 files changed, 0 insertions, 128 deletions
diff --git a/mod/reportedcontent/actions/add.php b/mod/reportedcontent/actions/add.php
deleted file mode 100644
index de1c1d3db..000000000
--- a/mod/reportedcontent/actions/add.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
- /**
- * Elgg report action
- *
- * @package ElggReportContent
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
- $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) {
-
- $entity = new ElggObject;
- $entity->subtype = "reported_content";
- $entity->owner_guid = $_SESSION['user']->getGUID();
- $entity->title = $title;
- $entity->address = $address;
- $entity->description = $description;
- $entity->access_id = $access;
-
- if ($entity->save()) {
- if (!trigger_plugin_hook('reportedcontent:add', $reported->type, array('entity'=>$reported), true)) {
- $entity->delete();
- register_error(elgg_echo('reportedcontent:failed'));
- } else {
- system_message(elgg_echo('reportedcontent:success'));
- $entity->state = "active";
- }
- forward($address);
- } else {
- register_error(elgg_echo('reportedcontent:failed'));
- forward($address);
- }
-
- } else {
-
- register_error(elgg_echo('reportedcontent:failed'));
- forward($address);
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/actions/archive.php b/mod/reportedcontent/actions/archive.php
deleted file mode 100644
index 770b4aa62..000000000
--- a/mod/reportedcontent/actions/archive.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
- /**
- * Elgg reported content: archive action
- *
- * @package ElggReportedContent
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in and are admin
- admin_gatekeeper();
-
- // Get input data
- $guid = (int) get_input('item');
-
- // Make sure we actually have permission to edit
- $reported = get_entity($guid);
- if ($reported->getSubtype() == "reported_content" && $reported->canEdit()) {
-
- // change the state
- if (!trigger_plugin_hook('reportedcontent:archive', $reported->type, array('entity'=>$reported), true)) {
- system_message(elgg_echo("reportedcontent:notarchived"));
- forward("pg/reportedcontent/");
- }
- $reported->state = "archived";
-
- // Success message
- system_message(elgg_echo("reportedcontent:archived"));
-
- // Forward back to the reported content page
- forward("pg/reportedcontent/");
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/reportedcontent/actions/delete.php b/mod/reportedcontent/actions/delete.php
deleted file mode 100644
index 98d3263c2..000000000
--- a/mod/reportedcontent/actions/delete.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
- /**
- * Elgg reported content: delete action
- *
- * @package ElggReportedCOntent
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in and are admin
- admin_gatekeeper();
-
- // Get input data
- $guid = (int) get_input('item');
-
- // Make sure we actually have permission to edit
- $reported = get_entity($guid);
- if ($reported->getSubtype() == "reported_content" && $reported->canEdit()) {
-
- // Delete it!
- if (!trigger_plugin_hook('reportedcontent:delete', $reported->type, array('entity'=>$reported), true)) {
- register_error(elgg_echo("reportedcontent:notdeleted"));
- forward("pg/reportedcontent/");
- }
- $rowsaffected = $reported->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("reportedcontent:deleted"));
- } else {
- register_error(elgg_echo("reportedcontent:notdeleted"));
- }
-
- // Forward back to the reported content page
- forward("pg/reportedcontent/");
-
- }
-
-?> \ No newline at end of file