Skip to content

Commit

Permalink
Use preg_match instead of deprecatted eregi.
Browse files Browse the repository at this point in the history
git-svn-id: http://voip.null.ro/svn/ansql/trunk@134 dbfed7de-b0aa-0410-b6a1-c7e608b77fc9
  • Loading branch information
monica committed Jan 12, 2015
1 parent 4e7d4fd commit c6ff685
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit c6ff685

Please sign in to comment.