4 use Friendica\Core\Logger;
5 use Friendica\Model\FileTag;
6 use Friendica\Util\XML;
8 function filerm_content(App $a)
15 $term = XML::unescape(trim(defaults($_GET, 'term', '')));
16 $cat = XML::unescape(trim(defaults($_GET, 'cat', '')));
18 $category = (($cat) ? true : false);
25 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
27 Logger::log('filerm: tag ' . $term . ' item ' . $item_id . ' category ' . ($category ? 'true' : 'false'));
29 if ($item_id && strlen($term)) {
30 if (FileTag::unsaveFile(local_user(), $item_id, $term, $category)) {
35 info('Item was not deleted');
38 $a->internalRedirect('/network?f=&file=' . rawurlencode($term));