summaryrefslogtreecommitdiff
path: root/www/admin
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2009-08-27 21:33:01 (GMT)
committerMathieu Parent <math.parent@gmail.com>2009-08-27 21:33:01 (GMT)
commit768e6ff61ea9e55eb4546e6fc208fe1c16bc5e69 (patch)
tree87f8c2a2d774f79b2784551c7178e27160db37bd /www/admin
parentfe0adaab0ebb527837dbd4db53f26419baf590ee (diff)
downloadkolab-webadmin-768e6ff61ea9e55eb4546e6fc208fe1c16bc5e69.tar.gz
kolab/issue991 (Better error message when connecting to sieve fails)
Diffstat (limited to 'www/admin')
-rw-r--r--www/admin/user/deliver.php.in5
-rw-r--r--www/admin/user/forward.php.in5
-rw-r--r--www/admin/user/vacation.php.in5
3 files changed, 12 insertions, 3 deletions
diff --git a/www/admin/user/deliver.php.in b/www/admin/user/deliver.php.in
index 1bd84be..d9c44f2 100644
--- a/www/admin/user/deliver.php.in
+++ b/www/admin/user/deliver.php.in
@@ -53,8 +53,11 @@ if( !$errors ) {
$obj = $ldap->read( $auth->dn() );
$sieve =& new Net_Sieve( $auth->uid(), $auth->password(), $obj['kolabHomeServer'][0] );
+ if( $sieve->getError() ) {
+ $errors[] = _('Error while connecting to Sieve service:');
+ $errors[] = $sieve->getError();
// Update sieve script on server in case we have submit data
- if( $_REQUEST['submit'] ) {
+ } elseif( $_REQUEST['submit'] ) {
$inbox = trim($_REQUEST['inbox']);
$active = isset($_REQUEST['active']);
diff --git a/www/admin/user/forward.php.in b/www/admin/user/forward.php.in
index ba0db88..5b02070 100644
--- a/www/admin/user/forward.php.in
+++ b/www/admin/user/forward.php.in
@@ -54,8 +54,11 @@ if( !$errors ) {
$obj = $ldap->read( $auth->dn() );
$sieve =& new Net_Sieve( $auth->uid(), $auth->password(), $obj['kolabHomeServer'][0] );
+ if( $sieve->getError() ) {
+ $errors[] = _('Error while connecting to Sieve service:');
+ $errors[] = $sieve->getError();
// Update sieve script on server in case we have submit data
- if( $_REQUEST['submit'] ) {
+ } elseif( $_REQUEST['submit'] ) {
$address = trim($_REQUEST['address']);
$keep = isset($_REQUEST['keep']);
$active = isset($_REQUEST['active']);
diff --git a/www/admin/user/vacation.php.in b/www/admin/user/vacation.php.in
index 6636726..dba3d77 100644
--- a/www/admin/user/vacation.php.in
+++ b/www/admin/user/vacation.php.in
@@ -33,8 +33,11 @@ if( !$errors ) {
$sieve =& new Net_Sieve( $auth->uid(), $auth->password(), $obj['kolabHomeServer'][0] );
//$sieve->setDebug(true);
+ if( $sieve->getError() ) {
+ $errors[] = _('Error while connecting to Sieve service:');
+ $errors[] = $sieve->getError();
// Update sieve script on server in case we have submit data
- if( $_REQUEST['submit'] ) {
+ } elseif( $_REQUEST['submit'] ) {
$addresses = array_unique( array_filter( array_map( 'trim', preg_split( '/\n/', $_REQUEST['addresses'] ) ), 'strlen') );
$maildomain = trim( $_REQUEST['maildomain'] );
$reacttospam = isset( $_REQUEST['reacttospam'] );