aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/filerm.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/mod/filerm.php b/mod/filerm.php
new file mode 100644
index 000000000..66b684dc9
--- /dev/null
+++ b/mod/filerm.php
@@ -0,0 +1,21 @@
+<?php
+
+function filerm_content(&$a) {
+
+ if(! local_user()) {
+ killme();
+ }
+
+ $term = notags(trim($_GET['term']));
+ $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0);
+
+ logger('filerm: tag ' . $term . ' item ' . $item_id);
+
+ if($item_id && strlen($term))
+ file_tag_unsave_file(local_user(),$item_id,$term);
+
+ if(x($_SESSION,'return_url'))
+ goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+
+ killme();
+}