Changeset 3747 for trunk/upload.php


Ignore:
Timestamp:
Aug 17, 2009, 6:21:09 PM (15 years ago)
Author:
Eric
Message:

PHP 5.3 compatibility - Deprecated functions were replace as follows :
ereg() -> preg_match()
ereg_replace() -> preg_replace()
eregi() -> preg_match() with the 'i' modifier
eregi_replace() -> preg_replace() with the 'i' modifier
set_magic_quotes_runtime() -> No more usefull. Fixed it by adding "@" prefix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upload.php

    r3282 r3747  
    5858  $result = array();
    5959  $result['error'] = array();
    60   //echo $_FILES['picture']['name']."<br>".$temp_name;
     60  //echo $_FILES['picture']['name']."<br />".$temp_name;
    6161  $extension = get_extension( $_FILES['picture']['name'] );
    6262  if (!in_array($extension, $conf['picture_ext']))
     
    189189    array_push( $error, l10n('upload_filenotfound') );
    190190  }
    191   if ( !ereg( "([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)",
     191  if ( !preg_match( '/([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)/',
    192192             $_POST['mail_address'] ) )
    193193  {
Note: See TracChangeset for help on using the changeset viewer.