]> git.mxchange.org Git - friendica.git/blob - mod/filerm.php
new api for notifications
[friendica.git] / mod / filerm.php
1 <?php
2
3 if(! function_exists('filerm_content')) {
4 function filerm_content(&$a) {
5
6         if(! local_user()) {
7                 killme();
8         }
9
10         $term = unxmlify(trim($_GET['term']));
11         $cat = unxmlify(trim($_GET['cat']));
12
13         $category = (($cat) ? true : false);
14         if($category)
15                 $term = $cat;
16
17         $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
18
19         logger('filerm: tag ' . $term . ' item ' . $item_id);
20
21         if($item_id && strlen($term))
22                 file_tag_unsave_file(local_user(),$item_id,$term, $category);
23
24         if(x($_SESSION,'return_url'))
25                 goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
26
27         killme();
28 }
29 }