|
|
|
@ -125,7 +125,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
|
|
|
|
|
return $this->sieve->error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function vacation_rule()
|
|
|
|
|
protected function vacation_rule()
|
|
|
|
|
{
|
|
|
|
|
if ($this->script_name === false || $this->script_name === null || !$this->sieve->load($this->script_name)) {
|
|
|
|
|
return;
|
|
|
|
@ -164,7 +164,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
|
|
|
|
|
$this->vacation['list'] = $list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function vacation_post()
|
|
|
|
|
protected function vacation_post()
|
|
|
|
|
{
|
|
|
|
|
if (empty($_POST)) {
|
|
|
|
|
return;
|
|
|
|
@ -388,7 +388,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$interval_txt = $interval->show(self::vacation_interval($this->vacation));
|
|
|
|
|
$interval_txt = $interval->show(self::vacation_interval($this->vacation, $this->exts));
|
|
|
|
|
if ($seconds_extension) {
|
|
|
|
|
$interval_select = new html_select(array('name' => 'vacation_interval_type'));
|
|
|
|
|
$interval_select->add($this->plugin->gettext('days'), 'days');
|
|
|
|
@ -521,7 +521,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
|
|
|
|
|
return $out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function build_regexp_tests($date_from, $date_to, &$error)
|
|
|
|
|
protected static function build_regexp_tests($date_from, $date_to, &$error)
|
|
|
|
|
{
|
|
|
|
|
$tests = array();
|
|
|
|
|
$dt_from = rcube_utils::anytodatetime($date_from);
|
|
|
|
@ -562,7 +562,7 @@ class rcube_sieve_vacation extends rcube_sieve_engine
|
|
|
|
|
return $tests;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function parse_regexp_tests($tests)
|
|
|
|
|
protected static function parse_regexp_tests($tests)
|
|
|
|
|
{
|
|
|
|
|
$rx_from = '/^\(([0-9]{2}).*\)\s([A-Za-z]+)\s([0-9]{4})/';
|
|
|
|
|
$rx_to = '/^\(.*([0-9]{2})\)\s([A-Za-z]+)\s([0-9]{4})/';
|
|
|
|
@ -588,10 +588,10 @@ class rcube_sieve_vacation extends rcube_sieve_engine
|
|
|
|
|
/**
|
|
|
|
|
* Get current vacation interval
|
|
|
|
|
*/
|
|
|
|
|
public static function vacation_interval(&$vacation)
|
|
|
|
|
public static function vacation_interval(&$vacation, $extensions = array())
|
|
|
|
|
{
|
|
|
|
|
$rcube = rcube::get_instance();
|
|
|
|
|
$seconds_extension = in_array('vacation-seconds', $this->exts);
|
|
|
|
|
$seconds_extension = in_array('vacation-seconds', $extensions);
|
|
|
|
|
|
|
|
|
|
if (isset($vacation['seconds'])) {
|
|
|
|
|
$interval = $vacation['seconds'];
|
|
|
|
|