From c6ff685e804a63ada0036712455ddbefe09a1a86 Mon Sep 17 00:00:00 2001 From: monica Date: Mon, 12 Jan 2015 14:58:07 +0000 Subject: [PATCH] Use preg_match instead of deprecatted eregi. git-svn-id: http://voip.null.ro/svn/ansql/trunk@134 dbfed7de-b0aa-0410-b6a1-c7e608b77fc9 --- lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib.php b/lib.php index 5d324d8..4662b6c 100644 --- a/lib.php +++ b/lib.php @@ -661,15 +661,15 @@ function check_valid_mail($mail) if (!$mail) return true; - $pattern = '^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$' ; - return eregi($pattern, $mail); + $pattern = '/^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i'; + return preg_match($pattern,$mail); } /** * Prints hidden type inputs used in page: module, method, action and additional parameters if set * @param $action String contains the name of action in the page * @param $additional Array contains the parameters and their values to be set as input hidden - * @empty_page_param Bool default to false + * @param $empty_page_param Bool. If true it will set 'method' and 'module' hidden fields to existing value if they don't appear in $additional. Defaults to false */ function addHidden($action=NULL, $additional = array(), $empty_page_params=false) {