aboutsummaryrefslogtreecommitdiff
path: root/mod/activity/opendd.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/activity/opendd.php')
-rw-r--r--mod/activity/opendd.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/mod/activity/opendd.php b/mod/activity/opendd.php
new file mode 100644
index 000000000..9c008d472
--- /dev/null
+++ b/mod/activity/opendd.php
@@ -0,0 +1,35 @@
+<?php
+ /**
+ * Elgg activity plugin opendd export of a given statement.
+ *
+ * @package ElggActivity
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ $id = (int)get_input('statement_id');
+ $type = sanitise_string(get_input('statement_type'));
+ $metaname = sanitise_string(get_input('metaname'));
+
+ $statement = construct_riverstatement_from_log(
+ get_log_entry($id)
+ );
+
+ global $CONFIG;
+
+ switch ($type)
+ {
+ case 'statement' : $result = activity_export_statement($statement, $id);
+ foreach ($result as $r) $body .= "$r";
+ break;
+ case 'metadata' :
+
+ $md = activity_export_field_from_statement($statement, $id, $metaname);
+ $body .= "$md";
+ break;
+ }
+
+ page_draw('',$body);
+?> \ No newline at end of file