2012-03-14 03:46:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function filerm_content(&$a) {
|
|
|
|
|
|
|
|
if(! local_user()) {
|
|
|
|
killme();
|
|
|
|
}
|
|
|
|
|
2012-03-31 22:25:17 +00:00
|
|
|
$term = unxmlify(trim($_GET['term']));
|
2012-05-04 13:42:56 +00:00
|
|
|
$cat = unxmlify(trim($_GET['cat']));
|
|
|
|
|
|
|
|
$category = (($cat) ? true : false);
|
|
|
|
if($category)
|
|
|
|
$term = $cat;
|
|
|
|
|
2012-03-31 22:25:17 +00:00
|
|
|
$item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
|
2012-03-14 03:46:37 +00:00
|
|
|
|
|
|
|
logger('filerm: tag ' . $term . ' item ' . $item_id);
|
|
|
|
|
|
|
|
if($item_id && strlen($term))
|
2012-05-04 13:42:56 +00:00
|
|
|
file_tag_unsave_file(local_user(),$item_id,$term, $category);
|
2012-03-14 03:46:37 +00:00
|
|
|
|
|
|
|
if(x($_SESSION,'return_url'))
|
|
|
|
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
|
|
|
|
|
|
|
|
killme();
|
|
|
|
}
|