"fix for bub #2579 - PHP Fatal error: Using $this when not in object context

--> get_path can NOT be static"
This commit is contained in:
Ralf Becker 2010-05-09 20:24:32 +00:00
parent 6f5cc0c387
commit 26667d4b6e

View File

@ -73,7 +73,7 @@ class calendar_groupdav extends groupdav_handler
* @param array|int $event
* @return string
*/
static function get_path($event)
function get_path($event)
{
if (is_numeric($event) && self::PATH_ATTRIBUTE == 'id')
{
@ -209,7 +209,7 @@ class calendar_groupdav extends groupdav_handler
$props[] = HTTP_WebDAV_Server::mkprop('getcontentlength', ''); // expensive to calculate and no CalDAV client uses it
}
$files[] = array(
'path' => $path.self::get_path($event),
'path' => $path.$this->get_path($event),
'props' => $props,
);
}
@ -528,7 +528,7 @@ class calendar_groupdav extends groupdav_handler
{
$path = preg_replace('|(.*)/[^/]*|', '\1/', $options['path']);
if ($this->debug) error_log(__METHOD__."(,$id,$user) cal_id=$cal_id: $retval");
header('Location: '.$this->base_uri.$path.self::get_path($cal_id));
header('Location: '.$this->base_uri.$path.$this->get_path($cal_id));
return $retval;
}
return true;