initilize $sh_disabled
This commit is contained in:
parent
67b9e57547
commit
10ba6df17f
|
@ -414,7 +414,7 @@ function events_content(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Passed parameters overrides anything found in the DB
|
// Passed parameters overrides anything found in the DB
|
||||||
if ($mode === 'edit' || $mode === 'new' || $mode === 'copy') {
|
if (in_array($mode, array('edit', 'new', 'copy'))) {
|
||||||
if (!x($orig_event)) {$orig_event = array();}
|
if (!x($orig_event)) {$orig_event = array();}
|
||||||
// In case of an error the browser is redirected back here, with these parameters filled in with the previous values
|
// In case of an error the browser is redirected back here, with these parameters filled in with the previous values
|
||||||
if (x($_REQUEST, 'nofinish')) {$orig_event['nofinish'] = $_REQUEST['nofinish'];}
|
if (x($_REQUEST, 'nofinish')) {$orig_event['nofinish'] = $_REQUEST['nofinish'];}
|
||||||
|
@ -435,9 +435,10 @@ function events_content(App $a) {
|
||||||
$cid = ((x($orig_event)) ? $orig_event['cid'] : 0);
|
$cid = ((x($orig_event)) ? $orig_event['cid'] : 0);
|
||||||
$uri = ((x($orig_event)) ? $orig_event['uri'] : '');
|
$uri = ((x($orig_event)) ? $orig_event['uri'] : '');
|
||||||
|
|
||||||
if (! x($orig_event)) {
|
$sh_disabled = '';
|
||||||
$sh_checked = '';
|
$sh_checked = '';
|
||||||
} else {
|
|
||||||
|
if (x($orig_event)) {
|
||||||
$sh_checked = (($orig_event['allow_cid'] === '<' . local_user() . '>' && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ');
|
$sh_checked = (($orig_event['allow_cid'] === '<' . local_user() . '>' && (! $orig_event['allow_gid']) && (! $orig_event['deny_cid']) && (! $orig_event['deny_gid'])) ? '' : ' checked="checked" ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +446,7 @@ function events_content(App $a) {
|
||||||
$sh_disabled = 'disabled="disabled"';
|
$sh_disabled = 'disabled="disabled"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
|
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
|
||||||
$fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
|
$fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
|
||||||
|
|
||||||
$tz = date_default_timezone_get();
|
$tz = date_default_timezone_get();
|
||||||
|
@ -481,7 +482,7 @@ function events_content(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we copy an old event, we need to remove the ID and URI
|
// If we copy an old event, we need to remove the ID and URI
|
||||||
// from the orgiginal event.
|
// from the original event.
|
||||||
if ($mode === 'copy') {
|
if ($mode === 'copy') {
|
||||||
$eid = 0;
|
$eid = 0;
|
||||||
$uri = '';
|
$uri = '';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user