Use common methods calendar->get_ical()->get_parser() to access Horde-based ical parser (#865)
This commit is contained in:
parent
92fc63277d
commit
5efdcbb2fb
2 changed files with 2 additions and 3 deletions
|
@ -803,7 +803,6 @@ class kolab_driver extends calendar_driver
|
||||||
*/
|
*/
|
||||||
public function get_freebusy_list($email, $start, $end)
|
public function get_freebusy_list($email, $start, $end)
|
||||||
{
|
{
|
||||||
require_once('Horde/iCalendar.php');
|
|
||||||
require_once('HTTP/Request2.php');
|
require_once('HTTP/Request2.php');
|
||||||
|
|
||||||
if (empty($email)/* || $end < time()*/)
|
if (empty($email)/* || $end < time()*/)
|
||||||
|
@ -865,7 +864,7 @@ class kolab_driver extends calendar_driver
|
||||||
|
|
||||||
// parse free-busy information using Horde classes
|
// parse free-busy information using Horde classes
|
||||||
if ($fbdata) {
|
if ($fbdata) {
|
||||||
$fbcal = new Horde_iCalendar;
|
$fbcal = $this->cal->get_ical()->get_parser();
|
||||||
$fbcal->parsevCalendar($fbdata);
|
$fbcal->parsevCalendar($fbdata);
|
||||||
if ($fb = $fbcal->findComponent('vfreebusy')) {
|
if ($fb = $fbcal->findComponent('vfreebusy')) {
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
|
@ -121,7 +121,7 @@ class calendar_ical
|
||||||
/**
|
/**
|
||||||
* Load iCal parser from the Horde lib
|
* Load iCal parser from the Horde lib
|
||||||
*/
|
*/
|
||||||
private function get_parser()
|
public function get_parser()
|
||||||
{
|
{
|
||||||
// use Horde:iCalendar to parse vcalendar file format
|
// use Horde:iCalendar to parse vcalendar file format
|
||||||
@include_once('Horde/iCalendar.php');
|
@include_once('Horde/iCalendar.php');
|
||||||
|
|
Loading…
Add table
Reference in a new issue