Libcalendaring fixes for use in automated testing out of Roundcube
This commit is contained in:
parent
2c58d048c0
commit
4f32668567
1 changed files with 21 additions and 7 deletions
|
@ -68,16 +68,19 @@ class libcalendaring extends rcube_plugin
|
||||||
*/
|
*/
|
||||||
public static function get_instance()
|
public static function get_instance()
|
||||||
{
|
{
|
||||||
|
if (!self::$instance) {
|
||||||
|
self::$instance = new libcalendaring(rcube::get_instance()->plugins);
|
||||||
|
self::$instance->init_instance();
|
||||||
|
}
|
||||||
|
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required plugin startup method
|
* Initializes class properties
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init_instance()
|
||||||
{
|
{
|
||||||
self::$instance = $this;
|
|
||||||
|
|
||||||
$this->rc = rcube::get_instance();
|
$this->rc = rcube::get_instance();
|
||||||
|
|
||||||
// set user's timezone
|
// set user's timezone
|
||||||
|
@ -95,6 +98,17 @@ class libcalendaring extends rcube_plugin
|
||||||
$this->timezone_offset = $this->gmt_offset / 3600 - $this->dst_active;
|
$this->timezone_offset = $this->gmt_offset / 3600 - $this->dst_active;
|
||||||
|
|
||||||
$this->add_texts('localization/', false);
|
$this->add_texts('localization/', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Required plugin startup method
|
||||||
|
*/
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
self::$instance = $this;
|
||||||
|
|
||||||
|
$this->rc = rcube::get_instance();
|
||||||
|
$this->init_instance();
|
||||||
|
|
||||||
// include client scripts and styles
|
// include client scripts and styles
|
||||||
if ($this->rc->output) {
|
if ($this->rc->output) {
|
||||||
|
@ -132,7 +146,7 @@ class libcalendaring extends rcube_plugin
|
||||||
public static function get_ical()
|
public static function get_ical()
|
||||||
{
|
{
|
||||||
$self = self::get_instance();
|
$self = self::get_instance();
|
||||||
require_once($self->home . '/libvcalendar.php');
|
require_once __DIR__ . '/libvcalendar.php';
|
||||||
return new libvcalendar();
|
return new libvcalendar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +156,7 @@ class libcalendaring extends rcube_plugin
|
||||||
public static function get_itip($domain = 'libcalendaring')
|
public static function get_itip($domain = 'libcalendaring')
|
||||||
{
|
{
|
||||||
$self = self::get_instance();
|
$self = self::get_instance();
|
||||||
require_once($self->home . '/lib/libcalendaring_itip.php');
|
require_once __DIR__ . '/lib/libcalendaring_itip.php';
|
||||||
return new libcalendaring_itip($self, $domain);
|
return new libcalendaring_itip($self, $domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +166,7 @@ class libcalendaring extends rcube_plugin
|
||||||
public static function get_recurrence()
|
public static function get_recurrence()
|
||||||
{
|
{
|
||||||
$self = self::get_instance();
|
$self = self::get_instance();
|
||||||
require_once($self->home . '/lib/libcalendaring_recurrence.php');
|
require_once __DIR__ . '/lib/libcalendaring_recurrence.php';
|
||||||
return new libcalendaring_recurrence($self);
|
return new libcalendaring_recurrence($self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue