mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 09:52:29 +02:00
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. git-svn-id: http://piwigo.org/svn/trunk@3747 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+2
-2
@@ -57,7 +57,7 @@ function validate_upload( $temp_name, $my_max_file_size,
|
||||
|
||||
$result = array();
|
||||
$result['error'] = array();
|
||||
//echo $_FILES['picture']['name']."<br>".$temp_name;
|
||||
//echo $_FILES['picture']['name']."<br />".$temp_name;
|
||||
$extension = get_extension( $_FILES['picture']['name'] );
|
||||
if (!in_array($extension, $conf['picture_ext']))
|
||||
{
|
||||
@@ -188,7 +188,7 @@ if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) )
|
||||
{
|
||||
array_push( $error, l10n('upload_filenotfound') );
|
||||
}
|
||||
if ( !ereg( "([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)",
|
||||
if ( !preg_match( '/([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)/',
|
||||
$_POST['mail_address'] ) )
|
||||
{
|
||||
array_push( $error, l10n('reg_err_mail_address') );
|
||||
|
||||
Reference in New Issue
Block a user