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