aboutsummaryrefslogtreecommitdiffstats
path: root/mod/filer.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-09 22:08:25 -0700
committerfriendica <info@friendica.com>2012-07-09 22:08:25 -0700
commit4b066e04f619c2c6f8d383daee9ceab49f39acdc (patch)
treec9f3376ffce342333b60d848430ee13b3329d903 /mod/filer.php
parent8855cb9c286eb66ad96b3388d85ccc57434a6db3 (diff)
downloadvolse-hubzilla-4b066e04f619c2c6f8d383daee9ceab49f39acdc.tar.gz
volse-hubzilla-4b066e04f619c2c6f8d383daee9ceab49f39acdc.tar.bz2
volse-hubzilla-4b066e04f619c2c6f8d383daee9ceab49f39acdc.zip
making tags work
Diffstat (limited to 'mod/filer.php')
-rw-r--r--mod/filer.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/mod/filer.php b/mod/filer.php
index c0cca9e6d..adc6245e1 100644
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -18,12 +18,18 @@ function filer_content(&$a) {
if($item_id && strlen($term)){
// file item
- file_tag_save_file(local_user(),$item_id,$term);
- } else {
- // return filer dialog
- $filetags = get_pconfig(local_user(),'system','filetags');
- $filetags = file_tag_file_to_list($filetags,'file');
- $filetags = explode(",", $filetags);
+ store_item_tag(local_user(),$item_id,TERM_OBJ_POST,TERM_FILE,$term,'');
+ }
+ else {
+ $filetags = array();
+ $r = q("select distinct(term) from term where uid = %d and type = %d order by term asc",
+ intval(local_user()),
+ intval(TERM_FILE)
+ );
+ if(count($r)) {
+ foreach($r as $rr)
+ $filetags[] = $rr['term'];
+ }
$tpl = get_markup_template("filer_dialog.tpl");
$o = replace_macros($tpl, array(
'$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')),