From f14ce7e7f1f04ed6ab8edb3ce44a9fed6eaa7d6d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 2 Mar 2006 16:43:16 +0000 Subject: [PATCH] fix for - bug [ 1428589 ] RC6 - xmlrpc calendar read method returns Access Denied - not working introspection --- calendar/inc/class.bocalendar.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index 30d6505f66..94ce3db411 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -37,6 +37,7 @@ class bocalendar 'write' => True, 'search' => True, 'categories'=> True, + 'list_methods' => True, ); function bocalendar() @@ -59,7 +60,7 @@ class bocalendar */ function list_methods($_type='xmlrpc') { - switch(is_array($_type) ? $_type['type'] : $_type) + switch(is_array($_type) ? ($_type['type'] ? $_type['type'] : $_type[0]) : $_type) { case 'xmlrpc': return array( @@ -153,6 +154,9 @@ class bocalendar } else { + // for a single id the event is returned and not an array with the event + if (is_array($id)) $events = array_shift($events); + if (!$this->cal->check_perms(EGW_ACL_READ,$events,0,$this->xmlrpc_date_format)) { // xmlrpc_error does NOT return