4 use Friendica\Core\Logger;
5 use Friendica\Core\System;
6 use Friendica\Model\FileTag;
7 use Friendica\Util\XML;
9 function filerm_content(App $a)
16 $term = XML::unescape(trim($_GET['term']));
17 $cat = XML::unescape(trim(defaults($_GET, 'cat', '')));
19 $category = (($cat) ? true : false);
26 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
28 Logger::log('filerm: tag ' . $term . ' item ' . $item_id . ' category ' . ($category ? 'true' : 'false'));
30 if ($item_id && strlen($term)) {
31 if (FileTag::unsaveFile(local_user(), $item_id, $term, $category)) {
36 info('Item was not deleted');
39 $a->internalRedirect('/network?f=&file=' . rawurlencode($term));