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