6 use Friendica\Core\L10n;
7 use Friendica\Core\PConfig;
9 require_once 'include/security.php';
10 require_once 'include/items.php';
12 function filer_content(App $a)
18 $term = unxmlify(trim($_GET['term']));
19 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
21 logger('filer: tag ' . $term . ' item ' . $item_id);
23 if ($item_id && strlen($term)) {
25 file_tag_save_file(local_user(), $item_id, $term);
27 // return filer dialog
28 $filetags = PConfig::get(local_user(), 'system', 'filetags');
29 $filetags = file_tag_file_to_list($filetags, 'file');
30 $filetags = explode(",", $filetags);
32 $tpl = get_markup_template("filer_dialog.tpl");
33 $o = replace_macros($tpl, [
34 '$field' => ['term', L10n::t("Save to Folder:"), '', '', $filetags, L10n::t('- select -')],
35 '$submit' => L10n::t('Save'),