diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-18 16:36:47 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-18 16:36:47 -0700 |
commit | 7e595808122c2c98e49ead0bc311e0532215eedc (patch) | |
tree | 002774abf71ed24645ccc7f2d540ed7750d27a62 /mod/photos.php | |
parent | 1a9c059062eae14a96aac40b2fb4e1efb513dccc (diff) | |
parent | ec54111e6b0000f87323b2b0a26756da3b41f146 (diff) | |
download | volse-hubzilla-7e595808122c2c98e49ead0bc311e0532215eedc.tar.gz volse-hubzilla-7e595808122c2c98e49ead0bc311e0532215eedc.tar.bz2 volse-hubzilla-7e595808122c2c98e49ead0bc311e0532215eedc.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'mod/photos.php')
-rw-r--r-- | mod/photos.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/mod/photos.php b/mod/photos.php index 296aab67f..2af90610e 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -6,6 +6,7 @@ require_once('include/acl_selectors.php'); require_once('include/bbcode.php'); require_once('include/security.php'); require_once('include/Contact.php'); +require_once('include/text.php'); function photos_init(&$a) { @@ -401,9 +402,20 @@ function photos_post(&$a) { * default post action - upload a photo */ + $channel = $a->data['channel']; + $observer = $a->data['observer']; + $_REQUEST['source'] = 'photos'; - $r = photo_upload($a->channel,$a->get_observer(), $_REQUEST); + if(!local_channel()) { + $_REQUEST['contact_allow'] = expand_acl($channel['channel_allow_cid']); + $_REQUEST['group_allow'] = expand_acl($channel['channel_allow_gid']); + $_REQUEST['contact_deny'] = expand_acl($channel['channel_deny_cid']); + $_REQUEST['group_deny'] = expand_acl($channel['channel_deny_gid']); + } + + $r = photo_upload($channel, $observer, $_REQUEST); + if(! $r['success']) { notice($r['message'] . EOL); } @@ -539,7 +551,7 @@ function photos_content(&$a) { $lockstate = (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'); } - $aclselect_e = (($_is_owner) ? populate_acl($channel_acl,false) : ''); + $aclselect = (($_is_owner) ? populate_acl($channel_acl,false) : ''); $selname = (($datum) ? hex2bin($datum) : ''); @@ -557,7 +569,7 @@ function photos_content(&$a) { '$albums' => $albums['albums'], '$selname' => $selname, '$permissions' => t('Permissions'), - '$aclselect' => $aclselect_e, + '$aclselect' => $aclselect, '$lockstate' => $lockstate, '$uploader' => $ret['addon_text'], '$default' => (($ret['default_upload']) ? true : false), @@ -900,7 +912,7 @@ function photos_content(&$a) { if($can_post) { $album_e = $ph[0]['album']; $caption_e = $ph[0]['description']; - $aclselect_e = populate_acl($ph[0]); + $aclselect_e = (($_is_owner) ? populate_acl($ph[0]) : ''); $albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer'])); $_SESSION['album_return'] = bin2hex($ph[0]['album']); |