X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffiler.php;h=47c4aa5e4cbc6fc05139174415d2f5485a97f7fb;hb=9259feec6f4b0a24c15f971a3dc8fa54f4f08141;hp=82537848ba11f12415640b66e94df1c2ec32f28b;hpb=c32ee4d226dec11d881dd5c68eda073e87780c12;p=friendica.git diff --git a/mod/filer.php b/mod/filer.php old mode 100755 new mode 100644 index 82537848ba..47c4aa5e4c --- a/mod/filer.php +++ b/mod/filer.php @@ -5,14 +5,14 @@ require_once('include/bbcode.php'); require_once('include/items.php'); -function filer_content(&$a) { +function filer_content(App $a) { - if(! local_user()) { + if (! local_user()) { killme(); } - $term = notags(trim($_GET['term'])); - $item_id = (($a->argc > 1) ? notags(trim($a->argv[1])) : 0); + $term = unxmlify(trim($_GET['term'])); + $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); logger('filer: tag ' . $term . ' item ' . $item_id); @@ -22,13 +22,15 @@ function filer_content(&$a) { } else { // return filer dialog $filetags = get_pconfig(local_user(),'system','filetags'); - $filetags = explode("][", trim($filetags,"[]")); + $filetags = file_tag_file_to_list($filetags,'file'); + $filetags = explode(",", $filetags); + $tpl = get_markup_template("filer_dialog.tpl"); $o = replace_macros($tpl, array( - '$field' => array('term', t("File as:"), '', '', $filetags, t('- select -')), + '$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')), '$submit' => t('Save'), )); - + echo $o; } killme();