2012-03-14 03:46:37 +00:00
|
|
|
<?php
|
|
|
|
|
2017-04-30 04:07:00 +00:00
|
|
|
use Friendica\App;
|
2017-08-26 06:04:21 +00:00
|
|
|
use Friendica\Core\System;
|
2017-04-30 04:07:00 +00:00
|
|
|
|
2017-01-09 12:12:54 +00:00
|
|
|
function filerm_content(App $a) {
|
2012-03-14 03:46:37 +00:00
|
|
|
|
2016-12-20 10:56:34 +00:00
|
|
|
if (! local_user()) {
|
2012-03-14 03:46:37 +00:00
|
|
|
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);
|
2016-12-20 20:15:53 +00:00
|
|
|
if ($category) {
|
2012-05-04 13:42:56 +00:00
|
|
|
$term = $cat;
|
2016-12-20 20:15:53 +00:00
|
|
|
}
|
2012-05-04 13:42:56 +00:00
|
|
|
|
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);
|
|
|
|
|
2016-12-20 20:15:53 +00:00
|
|
|
if ($item_id && strlen($term)) {
|
2012-05-04 13:42:56 +00:00
|
|
|
file_tag_unsave_file(local_user(),$item_id,$term, $category);
|
2016-12-20 20:15:53 +00:00
|
|
|
}
|
2012-03-14 03:46:37 +00:00
|
|
|
|
2018-10-13 18:02:04 +00:00
|
|
|
//$a->redirect('network');
|
2014-03-16 16:16:01 +00:00
|
|
|
|
2012-03-14 03:46:37 +00:00
|
|
|
killme();
|
|
|
|
}
|