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