summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-10-19 16:01:13 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-10-19 16:01:13 +0200
commitd29f7810808bc364afc665471f7d1a5d7b6bb01c (patch)
tree378d1edd9c2864b99c50b57f46707afb792bc781
parentada51d1d0eac8a1c4448a664c42e8712bce9e650 (diff)
Let plugins state a validation error message
-rw-r--r--program/lib/Roundcube/rcube_addressbook.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php
index b245ea69d..f57a30eb9 100644
--- a/program/lib/Roundcube/rcube_addressbook.php
+++ b/program/lib/Roundcube/rcube_addressbook.php
@@ -230,6 +230,10 @@ abstract class rcube_addressbook
'valid' => $valid,
));
+ if ($valid && !$plugin['valid']) {
+ $this->set_error(self::ERROR_VALIDATE, $plugin['error']);
+ }
+
if (is_array($plugin['record'])) {
$save_data = $plugin['record'];
}