gunnar: server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin Sieve.php, 1.4, 1.5
cvs at kolab.org
cvs at kolab.org
Tue Apr 6 10:56:34 CEST 2010
Author: gunnar
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin
In directory doto:/tmp/cvs-serv24415/kolab-webadmin/lib/KolabAdmin
Modified Files:
Sieve.php
Log Message:
Add the vacation segment.
Index: Sieve.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin/Sieve.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Sieve.php 1 Apr 2010 15:10:33 -0000 1.4
+++ Sieve.php 6 Apr 2010 08:56:32 -0000 1.5
@@ -33,7 +33,9 @@
const OLD_SCRIPT_DELIVERY = 'kolab-deliver.siv';
- const OLD_SCRIPT_FORWARD = 'kolab-forward.siv';
+ const OLD_SCRIPT_FORWARD = 'kolab-forward.siv';
+
+ const OLD_SCRIPT_VACATION = 'kolab-vacation.siv';
/**
@@ -83,6 +85,14 @@
$this->_segments['forward']->setActive();
}
}
+ if (in_array(self::OLD_SCRIPT_VACATION, $scripts)) {
+ $this->_segments['vacation'] = new KolabAdmin_Sieve_Segment_Vacation(
+ $this->_sieve->getScript(self::OLD_SCRIPT_VACATION)
+ );
+ if ($this->_sieve->getActive() == self::OLD_SCRIPT_VACATION) {
+ $this->_segments['vacation']->setActive();
+ }
+ }
}
}
if (!isset($this->_segments['delivery'])) {
@@ -91,6 +101,9 @@
if (!isset($this->_segments['forward'])) {
$this->_segments['forward'] = new KolabAdmin_Sieve_Segment_Forward();
}
+ if (!isset($this->_segments['vacation'])) {
+ $this->_segments['vacation'] = new KolabAdmin_Sieve_Segment_Vacation();
+ }
}
}
@@ -104,7 +117,7 @@
$type = strtolower($id[1]);
$class = 'KolabAdmin_Sieve_Segment_' . ucfirst($type);
$segments[$type] = new $class($match[0]);
- if ($id[2] == 'ENABLED') {
+ if (isset($id[2]) && $id[2] == 'ENABLED') {
$segments[$type]->setActive();
}
} else {
@@ -124,5 +137,11 @@
{
$this->_init();
return $this->_segments['forward'];
+ }
+
+ public function fetchVacationSegment()
+ {
+ $this->_init();
+ return $this->_segments['vacation'];
}
}
More information about the commits
mailing list