aboutsummaryrefslogtreecommitdiff
path: root/mod/livestream/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/livestream/actions')
-rwxr-xr-xmod/livestream/actions/delete.php15
-rwxr-xr-xmod/livestream/actions/new.php23
2 files changed, 38 insertions, 0 deletions
diff --git a/mod/livestream/actions/delete.php b/mod/livestream/actions/delete.php
new file mode 100755
index 000000000..bd4757f55
--- /dev/null
+++ b/mod/livestream/actions/delete.php
@@ -0,0 +1,15 @@
+<?php
+ require_once "{$CONFIG->pluginspath}livestream/libraries.php";
+
+ // get object guid from URL
+ $object_guid = get_input('stream_id');
+ $container_name = livestream_get_container_name($object_guid);
+
+ if(livestream_delete($object_guid)){
+ forward('livestream/'.$container_name);
+ }else{
+ elgg_echo ("livestream:internal_error");
+
+ }
+
+?>
diff --git a/mod/livestream/actions/new.php b/mod/livestream/actions/new.php
new file mode 100755
index 000000000..0deb95275
--- /dev/null
+++ b/mod/livestream/actions/new.php
@@ -0,0 +1,23 @@
+<?php
+ require_once "{$CONFIG->pluginspath}livestream/libraries.php";
+
+ $params = Array();
+ $params['title'] = get_input('title', '');
+ $params['mediatype'] = get_input('mediatype', '');
+ $params['src'] = get_input('src', '');
+ $params['width'] = get_input('width', '');
+ $params['height'] = get_input('height', '');
+
+ $params['owner_guid'] = page_owner();
+ $params['container_guid'] = get_input('container_guid', '');
+
+ $myObject = livestream_addnew($params);
+
+ if($myObject){
+ $container = livestream_get_container($myObject);
+ forward('livestream/'.$container->username);
+ }else{
+ elgg_echo ("livestream:internal_error");
+ }
+
+?>