gunnar: server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin/Sieve/Segment Forward.php, 1.1, 1.2 Vacation.php, 1.2, 1.3
cvs at kolab.org
cvs at kolab.org
Tue Apr 6 19:47:36 CEST 2010
Author: gunnar
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin/Sieve/Segment
In directory doto:/tmp/cvs-serv7711/kolab-webadmin/lib/KolabAdmin/Sieve/Segment
Modified Files:
Forward.php Vacation.php
Log Message:
Fix some minor sieve script issues.
Index: Forward.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin/Sieve/Segment/Forward.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Forward.php 1 Apr 2010 15:10:33 -0000 1.1
+++ Forward.php 6 Apr 2010 17:47:34 -0000 1.2
@@ -57,8 +57,10 @@
*/
public function __construct($script = '')
{
- $this->template = 'if allof (%s)' . "\r\n" .
- 'redirect "%s";%s' . "\r\n";
+ $this->template = 'if allof (%s' . "\r\n" .
+ ') {' . "\r\n" .
+ 'redirect "%s";%s' . "\r\n" .
+ '}' . "\r\n";
parent::__construct($script);
}
@@ -113,7 +115,7 @@
throw new Exception('Please enter a valid e-mail address!');
}
return array(
- ($this->isActive()) ? 'true, ## forward enabled' : 'false, ## forward disabled',
+ ($this->isActive()) ? 'true ## forward enabled' : 'false ## forward disabled',
$address,
($this->getKeepOnServer()) ? ' keep;' : ''
);
Index: Vacation.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/lib/KolabAdmin/Sieve/Segment/Vacation.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Vacation.php 6 Apr 2010 10:14:19 -0000 1.2
+++ Vacation.php 6 Apr 2010 17:47:34 -0000 1.3
@@ -83,7 +83,7 @@
$this->_response = '';
$this->template = 'if allof (%s' . "\r\n" .
- '%s' . "\r\n" .
+ '%s,' . "\r\n" .
'%s) {' . "\r\n" .
'vacation :addresses [ %s ] :days %s text:' . "\r\n" .
'%s' . "\r\n" .
@@ -151,6 +151,10 @@
*/
public function setResendAfter($days)
{
+ //@todo: Should be placed into a validate method.
+ if ($this->_resend_after < 1) {
+ throw new Exception(_('Days must be at least one'));
+ }
$this->_resend_after = $days;
}
@@ -230,12 +234,12 @@
if (!empty($domain)) {
$domain = 'address :domain :contains "From" "' . $domain . '"';
} else {
- $domain = '';
+ $domain = 'true';
}
if (!$this->getReactToSpam()) {
$react_to_spam = 'not header :contains "X-Spam-Flag" "YES"';
} else {
- $react_to_spam = '';
+ $react_to_spam = 'true';
}
return array(
($this->isActive()) ? 'true, ## vacation enabled' : 'false, ## vacation disabled',
More information about the commits
mailing list