diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-17 18:26:56 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-17 18:26:56 -0700 |
commit | 2963be60e53916c9c6d579745695a54800876f82 (patch) | |
tree | 87acafa554c318466f10eda49594224b3e454ffc /mod | |
parent | 6ab20eb1b50da91ba35911fea8b09f2ef8e461fd (diff) | |
download | volse-hubzilla-2963be60e53916c9c6d579745695a54800876f82.tar.gz volse-hubzilla-2963be60e53916c9c6d579745695a54800876f82.tar.bz2 volse-hubzilla-2963be60e53916c9c6d579745695a54800876f82.zip |
more photos work
Diffstat (limited to 'mod')
-rw-r--r-- | mod/photos.php | 12 | ||||
-rw-r--r-- | mod/wall_attach.php | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/mod/photos.php b/mod/photos.php index dee027cf9..c65c87c27 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -563,14 +563,20 @@ function photos_content(&$a) { $albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer'])); + $def_album = get_pconfig($a->data['channel']['channel_id'],'system','photo_path'); + if($def_album) { + $selname = filepath_macro($def_album); + $albums['album'][] = array('text' => $selname); + } + $tpl = get_markup_template('photos_upload.tpl'); $upload_form = replace_macros($tpl,array( '$pagename' => t('Upload Photos'), '$sessid' => session_id(), '$usage' => $usage_message, '$nickname' => $a->data['channel']['channel_address'], - '$newalbum_label' => t('Enter a new album name'), - '$newalbum_placeholder' => t('or select an existing one (doubleclick)'), + '$newalbum_label' => t('Enter an album name'), + '$newalbum_placeholder' => t('or select an existing album (doubleclick)'), '$visible' => array('visible', t('Create a status post for this upload'), 0, '', array(t('No'), t('Yes'))), '$albums' => $albums['albums'], '$selname' => $selname, @@ -899,7 +905,7 @@ function photos_content(&$a) { } } - if((local_channel()) && (local_user() == $link_item['uid'])) { + if((local_channel()) && (local_channel() == $link_item['uid'])) { q("UPDATE `item` SET item_unseen = 0 WHERE parent = %d and uid = %d and item_unseen = 1", intval($link_item['parent']), intval(local_channel()) diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 9ce16d190..4e30556b6 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -38,7 +38,10 @@ function wall_attach_post(&$a) { // } // } - $r = attach_store($channel,(($observer) ? $observer['xchan_hash'] : ''),'', array('source' => 'editor', 'visible' => 0, 'contact_allow' => array($channel['channel_hash']))); + $def_album = get_pconfig($channel['channel_id'],'system','photo_path'); + $def_attach = get_pconfig($channel['channel_id'],'system','attach_path'); + + $r = attach_store($channel,(($observer) ? $observer['xchan_hash'] : ''),'', array('source' => 'editor', 'visible' => 0, 'album' => $def_album, 'directory' => $def_attach, 'allow_cid' => '<' . $channel['channel_hash'] . '>')); if(! $r['success']) { notice( $r['message'] . EOL); |