added warning if local address is already in use
This commit is contained in:
parent
48cbd62917
commit
014c4e53e4
|
@ -1,4 +1,10 @@
|
||||||
04.07.2006 1.0.3
|
??? 1.0.4
|
||||||
|
- added Russian translation
|
||||||
|
- inetLocalMailRecipient: print warning if local address is already in use
|
||||||
|
- fixed bugs:
|
||||||
|
|
||||||
|
|
||||||
|
05.07.2006 1.0.3
|
||||||
- fixed bugs:
|
- fixed bugs:
|
||||||
-> Kolab: fixed problem with message about missing password
|
-> Kolab: fixed problem with message about missing password
|
||||||
-> Unix groups: fixed auto GID
|
-> Unix groups: fixed auto GID
|
||||||
|
|
|
@ -221,6 +221,16 @@ class inetLocalMailRecipient extends baseModule {
|
||||||
if (isset($post['localAdr']) && ($post['localAdr'] != "")) {
|
if (isset($post['localAdr']) && ($post['localAdr'] != "")) {
|
||||||
// check if address has correct format
|
// check if address has correct format
|
||||||
if (get_preg($post['localAdr'], 'mailLocalAddress')) {
|
if (get_preg($post['localAdr'], 'mailLocalAddress')) {
|
||||||
|
// check if new address is not already in database
|
||||||
|
$data = $_SESSION['cache']->get_cache('mailLocalAddress', 'inetLocalMailRecipient', 'user');
|
||||||
|
$keys = array_keys($data);
|
||||||
|
for ($i = 0; $i < sizeof($keys); $i++) {
|
||||||
|
$adrList = $data[$keys[$i]];
|
||||||
|
if (in_array_ignore_case($post['localAdr'], $adrList)) {
|
||||||
|
$errors['localAdr'][] = array('WARN', _('This mail address is already in use:') . " " . $post['localAdr'], $keys[$i]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->attributes['mailLocalAddress'][] = $post['localAdr'];
|
$this->attributes['mailLocalAddress'][] = $post['localAdr'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue