Fix "PHP Fatal error: Call to undefined method kolab_format_task::to_libcal()" (T1176)

This commit is contained in:
Aleksander Machniak 2016-04-07 10:47:45 +02:00
parent 27b1fd0e8c
commit 22e1073307
2 changed files with 24 additions and 24 deletions

View file

@ -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
*

View file

@ -711,4 +711,27 @@ abstract class kolab_format_xcal extends kolab_format
return $reschedule;
}
}
/**
* 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;
}
}