From 905cd1da5bd8c794e7f62217a1e4ab2b0e3a2123 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 15 Jun 2015 13:04:16 +0200 Subject: do not allow/show acl button on photo edit if not owner --- mod/photos.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/photos.php b/mod/photos.php index 296aab67f..e88d1497e 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -539,7 +539,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 +557,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 +900,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']); -- cgit v1.2.3 From 93f48cd8bb93bb3f8d2ef0ce90b3d1b75fc97859 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 16 Jun 2015 12:18:50 +0200 Subject: make photo upload work for remote channels with perms --- mod/photos.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/photos.php b/mod/photos.php index e88d1497e..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); } -- cgit v1.2.3 From 24befa2197d3dfc9ebeac10b307eaddcc7dd5cf1 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Tue, 16 Jun 2015 13:24:10 +0200 Subject: Small fix in siteinfo --- mod/siteinfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 904228f13..c5a1cf12b 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -164,7 +164,7 @@ function siteinfo_content(&$a) { '$visit' => t('Please visit redmatrix.me to learn more about $Projectname.'), '$bug_text' => t('Bug reports and issues: please visit'), '$bug_link_url' => 'https://github.com/redmatrix/redmatrix/issues', - '$bug_link_text' => '$projectname issues', + '$bug_link_text' => t('$projectname issues'), '$contact' => t('Suggestions, praise, etc. - please email "redmatrix" at librelist - dot com'), '$donate' => $donate, '$adminlabel' => t('Site Administrators'), -- cgit v1.2.3