From bc8c2c57880523472b30f475d566a8133e2d2e20 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Sat, 21 May 2011 14:04:51 -0400 Subject: [PATCH] - Fix s/pattern/prefix/ in clear_cache() --- program/include/rcube_ldap.php | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php index d9f5a10..f166fd2 100644 --- a/program/include/rcube_ldap.php +++ b/program/include/rcube_ldap.php @@ -610,6 +610,26 @@ /** + * Check the given data before saving. + * If input not valid, the message to display can be fetched using get_error() + * + * @param array Assoziative array with data to save + * @return boolean True if input is valid, False if not. + */ + public function validate($save_data) + { + // check for name input + if (empty($save_data['name'])) { + $this->set_error('warning', 'nonamewarning'); + return false; + } + + // validate e-mail addresses + return parent::validate($save_data); + } + + + /** * Create a new contact record * * @param array Hash array with save data -- Gitblit v1.9.1