Ignore:
Timestamp:
Jan 12, 2013, 3:13:08 PM (11 years ago)
Author:
mistic100
Message:
  • add webservices
  • add mail function
  • add admin list
  • add admin export function
  • try to deal with Gthumb+
  • activate multisize dropdown menu of collection page

TODO : use webservices instead of toggle_image.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/include/functions.inc.php

    r16688 r20090  
    3232}
    3333
     34function uc_check_email_validity($mail_address)
     35{
     36  if (function_exists('email_check_format'))
     37  {
     38    return email_check_format($mail_address); // Piwigo 2.5
     39  }
     40  else if (version_compare(PHP_VERSION, '5.2.0') >= 0)
     41  {
     42    return filter_var($mail_address, FILTER_VALIDATE_EMAIL)!==false;
     43  }
     44  else
     45  {
     46    $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
     47    $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
     48    $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
     49
     50    return (bool)preg_match($regex, $mail_address);
     51  }
     52}
     53
    3454?>
Note: See TracChangeset for help on using the changeset viewer.