2012-03-14 04:46:37 +01:00
|
|
|
<?php
|
|
|
|
|
2016-12-20 10:58:55 +01:00
|
|
|
function filerm_content(App &$a) {
|
2012-03-14 04:46:37 +01:00
|
|
|
|
2016-12-20 11:56:34 +01:00
|
|
|
if (! local_user()) {
|
2012-03-14 04:46:37 +01:00
|
|
|
killme();
|
|
|
|
}
|
|
|
|
|
2012-04-01 00:25:17 +02:00
|
|
|
$term = unxmlify(trim($_GET['term']));
|
2012-05-04 15:42:56 +02:00
|
|
|
$cat = unxmlify(trim($_GET['cat']));
|
|
|
|
|
|
|
|
$category = (($cat) ? true : false);
|
|
|
|
if($category)
|
|
|
|
$term = $cat;
|
|
|
|
|
2012-04-01 00:25:17 +02:00
|
|
|
$item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
|
2012-03-14 04:46:37 +01:00
|
|
|
|
|
|
|
logger('filerm: tag ' . $term . ' item ' . $item_id);
|
|
|
|
|
|
|
|
if($item_id && strlen($term))
|
2012-05-04 15:42:56 +02:00
|
|
|
file_tag_unsave_file(local_user(),$item_id,$term, $category);
|
2012-03-14 04:46:37 +01:00
|
|
|
|
|
|
|
if(x($_SESSION,'return_url'))
|
2016-12-20 12:45:16 +01:00
|
|
|
goaway(App::get_baseurl() . '/' . $_SESSION['return_url']);
|
2014-03-16 17:16:01 +01:00
|
|
|
|
2012-03-14 04:46:37 +01:00
|
|
|
killme();
|
|
|
|
}
|