1
0
Fork 0

clean up some regex's for i18n, and eliminate old ereg patterns.

This commit is contained in:
Friendika 2010-11-14 00:32:31 -08:00
commit 0851669b39
5 changed files with 24 additions and 14 deletions

View file

@ -17,12 +17,13 @@ function invite_post(&$a) {
$recip = trim($recip);
if(!eregi('[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\.[A-Za-z]{2,6}', $recip)) {
notice( $recip . t(' : ') . t('Not a valid email address.') . EOL);
if(! valid_email($recip)) {
notice( $recip . t(' : ') . t('Not a valid email address.') . EOL);
continue;
}
$res = mail($recip, t('Please join my network on ') . $a->config['sitename'], $message, "From: " . $a->user['email']);
$res = mail($recip, t('Please join my network on ') . $a->config['sitename'],
$message, "From: " . $a->user['email']);
if($res) {
$total ++;
}