Changeset 4035


Ignore:
Timestamp:
10/14/09 17:06:36 (10 years ago)
Author:
patdenice
Message:

Replace some ereg function (depreciated) by preg_match.

Location:
branches/2.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/thumbnail.php

    r3270 r4035  
    232232   
    233233  // checking criteria 
    234   if (!ereg('^[0-9]{2,3}$', $_POST['width']) or $_POST['width'] < 10) 
     234  if (!preg_match('/^[0-9]{2,3}$/', $_POST['width']) or $_POST['width'] < 10) 
    235235  { 
    236236    array_push($page['errors'], l10n('tn_err_width').' 10'); 
    237237  } 
    238   if (!ereg('^[0-9]{2,3}$', $_POST['height']) or $_POST['height'] < 10) 
     238  if (!preg_match('/^[0-9]{2,3}$/', $_POST['height']) or $_POST['height'] < 10) 
    239239  { 
    240240    array_push($page['errors'], l10n('tn_err_height').' 10'); 
  • branches/2.0/include/functions_user.inc.php

    r3643 r4035  
    7676    array_push($errors, l10n('reg_err_login1')); 
    7777  } 
    78   if (ereg("^.* $", $login)) 
     78  if (preg_match("/^.* $/", $login)) 
    7979  { 
    8080    array_push($errors, l10n('reg_err_login2')); 
    8181  } 
    82   if (ereg("^ .*$", $login)) 
     82  if (preg_match("/^ .*$/", $login)) 
    8383  { 
    8484    array_push($errors, l10n('reg_err_login3')); 
Note: See TracChangeset for help on using the changeset viewer.