diff options
Diffstat (limited to 'Zotlabs/Module/Cdav.php')
-rw-r--r-- | Zotlabs/Module/Cdav.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php index 599552545..e68b2e5b4 100644 --- a/Zotlabs/Module/Cdav.php +++ b/Zotlabs/Module/Cdav.php @@ -200,7 +200,7 @@ class Cdav extends Controller { $etag = (isset($_SERVER['HTTP_IF_MATCH']) ? $_SERVER['HTTP_IF_MATCH'] : false); // delete - if($httpmethod === 'DELETE' && $cdavdata['etag'] == $etag) { + if($httpmethod === 'DELETE' && $etag && isset($cdavdata['etag']) && $cdavdata['etag'] == $etag) { Libsync::build_sync_packet($channel['channel_id'], [ $sync => [ 'action' => 'delete_card', @@ -210,7 +210,7 @@ class Cdav extends Controller { ]); } else { - if($etag && $cdavdata['etag'] !== $etag) { + if($etag && isset($cdavdata['etag']) && $cdavdata['etag'] !== $etag) { // update Libsync::build_sync_packet($channel['channel_id'], [ $sync => [ @@ -317,7 +317,7 @@ class Cdav extends Controller { $calendars = $caldavBackend->getCalendarsForUser($principalUri); //create new calendar - if($_REQUEST['{DAV:}displayname'] && $_REQUEST['create']) { + if((isset($_REQUEST['{DAV:}displayname']) && $_REQUEST['{DAV:}displayname']) && (isset($_REQUEST['create']) && $_REQUEST['create'])) { do { $duplicate = false; $calendarUri = random_string(40); @@ -352,7 +352,7 @@ class Cdav extends Controller { } //create new calendar object via ajax request - if($_REQUEST['submit'] === 'create_event' && $_REQUEST['title'] && $_REQUEST['target'] && $_REQUEST['dtstart']) { + if((isset($_REQUEST['submit']) && $_REQUEST['submit'] === 'create_event') && $_REQUEST['title'] && $_REQUEST['target'] && $_REQUEST['dtstart']) { $id = explode(':', $_REQUEST['target']); @@ -431,7 +431,7 @@ class Cdav extends Controller { } //edit calendar name and color - if($_REQUEST['{DAV:}displayname'] && $_REQUEST['edit'] && $_REQUEST['id']) { + if((isset($_REQUEST['{DAV:}displayname']) && $_REQUEST['{DAV:}displayname']) && $_REQUEST['edit'] && $_REQUEST['id']) { $id = explode(':', $_REQUEST['id']); @@ -459,7 +459,7 @@ class Cdav extends Controller { } //edit calendar object via ajax request - if($_REQUEST['submit'] === 'update_event' && $_REQUEST['uri'] && $_REQUEST['title'] && $_REQUEST['target'] && $_REQUEST['dtstart']) { + if((isset($_REQUEST['submit']) && $_REQUEST['submit'] === 'update_event') && $_REQUEST['uri'] && $_REQUEST['title'] && $_REQUEST['target'] && $_REQUEST['dtstart']) { $id = explode(':', $_REQUEST['target']); @@ -914,6 +914,7 @@ class Cdav extends Controller { head_add_js('/library/fullcalendar/packages/timegrid/main.min.js'); head_add_js('/library/fullcalendar/packages/list/main.min.js'); + $o = ''; $sources = ''; $resource_id = ''; $resource = null; @@ -921,6 +922,8 @@ class Cdav extends Controller { if(argc() == 3) $resource_id = argv(2); + $categories = ''; + if($resource_id) { $r = q("SELECT event.*, item.author_xchan, item.owner_xchan, item.plink, item.id as item_id FROM event LEFT JOIN item ON event.event_hash = item.resource_id WHERE event.uid = %d AND event.event_hash = '%s' LIMIT 1", @@ -944,7 +947,6 @@ class Cdav extends Controller { $resource = $r[0]; $catsenabled = feature_enabled(local_channel(),'categories'); - $categories = ''; if($catsenabled){ if($r[0]['term']) { $cats = get_terms_oftype($r[0]['term'], TERM_CATEGORY); |