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" ';
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(
'$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')
));