summaryrefslogtreecommitdiff
path: root/program/include/rcube_addressbook.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-04-13 08:52:02 +0000
committeralecpl <alec@alec.pl>2012-04-13 08:52:02 +0000
commit0c259682f65eaaf23ea4ccb56a706d6baf3007e4 (patch)
treef1491f39189c8a970e7612b9dcc20f9409d7361e /program/include/rcube_addressbook.php
parentce64332e7a9bf2468eabdb4b789270aebb3e7dc7 (diff)
- Merge devel-framework branch, resolved conflicts
Diffstat (limited to 'program/include/rcube_addressbook.php')
-rw-r--r--program/include/rcube_addressbook.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php
index b56b58a65..ca2f1e71c 100644
--- a/program/include/rcube_addressbook.php
+++ b/program/include/rcube_addressbook.php
@@ -211,11 +211,14 @@ abstract class rcube_addressbook
*/
public function validate(&$save_data, $autofix = false)
{
+ $rcmail = rcmail::get_instance();
+
// check validity of email addresses
foreach ($this->get_col_values('email', $save_data, true) as $email) {
if (strlen($email)) {
- if (!check_email(rcube_idn_to_ascii($email))) {
- $this->set_error(self::ERROR_VALIDATE, rcube_label(array('name' => 'emailformaterror', 'vars' => array('email' => $email))));
+ if (!$rcmail->check_email(rcube_idn_to_ascii($email))) {
+ $error = $rcmail->gettext(array('name' => 'emailformaterror', 'vars' => array('email' => $email)));
+ $this->set_error(self::ERROR_VALIDATE, $error);
return false;
}
}