From 22e1073307f77dd8de81690a057e4bd580a0b39f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 7 Apr 2016 10:47:45 +0200 Subject: [PATCH] Fix "PHP Fatal error: Call to undefined method kolab_format_task::to_libcal()" (T1176) --- plugins/libkolab/lib/kolab_format_event.php | 23 ------------------- plugins/libkolab/lib/kolab_format_xcal.php | 25 ++++++++++++++++++++- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/plugins/libkolab/lib/kolab_format_event.php b/plugins/libkolab/lib/kolab_format_event.php index a7cf2d42..16500246 100644 --- a/plugins/libkolab/lib/kolab_format_event.php +++ b/plugins/libkolab/lib/kolab_format_event.php @@ -49,29 +49,6 @@ class kolab_format_event extends kolab_format_xcal $this->_scheduling_properties = self::$scheduling_properties; } - /** - * Clones into an instance of libcalendaring's extended EventCal class - * - * @return mixed EventCal object or false on failure - */ - public function to_libcal() - { - static $error_logged = false; - - if (class_exists('kolabcalendaring')) { - return new EventCal($this->obj); - } - else if (!$error_logged) { - $error_logged = true; - rcube::raise_error(array( - 'code' => 900, 'type' => 'php', - 'message' => "required kolabcalendaring module not found" - ), true); - } - - return false; - } - /** * Set event properties to the kolabformat object * diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php index a9dd70c8..69a273a2 100644 --- a/plugins/libkolab/lib/kolab_format_xcal.php +++ b/plugins/libkolab/lib/kolab_format_xcal.php @@ -711,4 +711,27 @@ abstract class kolab_format_xcal extends kolab_format return $reschedule; } -} \ No newline at end of file + + /** + * Clones into an instance of libcalendaring's extended EventCal class + * + * @return mixed EventCal object or false on failure + */ + public function to_libcal() + { + static $error_logged = false; + + if (class_exists('kolabcalendaring')) { + return new EventCal($this->obj); + } + else if (!$error_logged) { + $error_logged = true; + rcube::raise_error(array( + 'code' => 900, + 'message' => "required kolabcalendaring module not found" + ), true); + } + + return false; + } +}