From 2070c96dd1910cd16c36277b3ee3198a5f8eafbd Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 17 Oct 2015 08:46:45 +0200 Subject: [PATCH] Changing the acl does not work when editing posts - so it is disabled for events. --- mod/events.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mod/events.php b/mod/events.php index f2891a38d5..653ae489b8 100644 --- a/mod/events.php +++ b/mod/events.php @@ -509,7 +509,7 @@ function events_content(&$a) { else $sh_checked = (($orig_event['allow_cid'] === '<' . local_user() . '>' && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ' ); - if($cid) + if($cid OR ($mode !== 'new')) $sh_checked .= ' disabled="disabled" '; @@ -540,6 +540,9 @@ function events_content(&$a) { require_once('include/acl_selectors.php'); + if ($mode === 'new') + $acl = (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user))); + $tpl = get_markup_template('event_form.tpl'); $o .= replace_macros($tpl,array( @@ -567,7 +570,7 @@ function events_content(&$a) { '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, '$preview' => t('Preview'), - '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user))), + '$acl' => $acl, '$submit' => t('Submit') )); -- 2.39.5