diff options
author | Gunnar Wrobel <wrobel@pardus.de> | 2010-04-07 03:52:27 (GMT) |
---|---|---|
committer | Gunnar Wrobel <wrobel@pardus.de> | 2010-04-07 03:52:27 (GMT) |
commit | 3c12e82b2ce89fd89a14bd60544f0563e6cb63b4 (patch) | |
tree | 4e1789314ccf3db523350371acc0028d72ff9918 /www | |
parent | 3b340a857f30affb66c216a3dac70404585a9527 (diff) | |
download | kolab-webadmin-3c12e82b2ce89fd89a14bd60544f0563e6cb63b4.tar.gz |
Add check for unknown script.
Diffstat (limited to 'www')
-rw-r--r-- | www/admin/user/deliver.php.in | 6 | ||||
-rw-r--r-- | www/admin/user/forward.php.in | 6 | ||||
-rw-r--r-- | www/admin/user/vacation.php.in | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/www/admin/user/deliver.php.in b/www/admin/user/deliver.php.in index 10e5afb..7c4f6ae 100644 --- a/www/admin/user/deliver.php.in +++ b/www/admin/user/deliver.php.in @@ -61,6 +61,12 @@ $scriptname = "kolab-deliver.siv"; } else { $messages[] = sprintf(_("Delivery to '%s' successfully deactivated"), $_REQUEST['inbox']); } + } else { + $result = $handler->checkUnknownScript(); + if ($result) { + $errors[] = sprintf(_("Warning: You currently have a sieve script named %s active for your account."), $result); + $errors[] = _("Warning: This script will be overwritten without further warnings if you press \"Update\"!"); + } } } catch (Exception $e) { $errors[] = $e->getMessage(); diff --git a/www/admin/user/forward.php.in b/www/admin/user/forward.php.in index 6d336fa..3d8bae0 100644 --- a/www/admin/user/forward.php.in +++ b/www/admin/user/forward.php.in @@ -63,6 +63,12 @@ $scriptname = "kolab-forward.siv"; } else { $messages[] = sprintf(_("Forwarding to '%s' successfully deactivated"), $_REQUEST['address']); } + } else { + $result = $handler->checkUnknownScript(); + if ($result) { + $errors[] = sprintf(_("Warning: You currently have a sieve script named %s active for your account."), $result); + $errors[] = _("Warning: This script will be overwritten without further warnings if you press \"Update\"!"); + } } } catch (Exception $e) { $errors[] = $e->getMessage(); diff --git a/www/admin/user/vacation.php.in b/www/admin/user/vacation.php.in index 69ad79d..2c95e79 100644 --- a/www/admin/user/vacation.php.in +++ b/www/admin/user/vacation.php.in @@ -58,6 +58,12 @@ $scriptname = 'kolab-vacation.siv'; $messages[] = _('Vacation message successfully deactivated'); } } else { + $result = $handler->checkUnknownScript(); + if ($result) { + $errors[] = sprintf(_("Warning: You currently have a sieve script named %s active for your account."), $result); + $errors[] = _("Warning: This script will be overwritten without further warnings if you press \"Update\"!"); + } + $addresses = $handler->fetchVacationSegment()->getRecipientAddresses(); if (empty($addresses)) { $object = $ldap->read($auth->dn()); |