From 2c2af65b6a95e20ba9ca49139683d2d150edb1b6 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sat, 17 May 2003 11:42:03 +0000 Subject: *** empty log message *** git-svn-id: http://piwigo.org/svn/trunk@13 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'admin/include') diff --git a/admin/include/functions.php b/admin/include/functions.php index 2b4ee9d3e..0828f0e06 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -19,9 +19,7 @@ $tab_ext_create_TN = array ( 'jpg', 'png' ); function is_image( $filename, $create_thumbnail = false ) { - global $tab_ext_create_TN, $conf; - - $is_image = false; + global $conf; if ( is_file ( $filename ) ) { @@ -34,7 +32,7 @@ function is_image( $filename, $create_thumbnail = false ) if ( in_array( get_extension( $filename ), $conf['picture_ext'] ) and ( $size[2] == 1 or $size[2] == 2 or $size[2] == 3 ) ) { - $is_image = true; + return true; } } else @@ -42,11 +40,11 @@ function is_image( $filename, $create_thumbnail = false ) if ( in_array( get_extension( $filename ), $tab_ext_create_TN ) and ( $size[2] == 2 or $size[2] == 3 ) ) { - $is_image = true; + return true; } } } - return $is_image; + return false; } function TN_exists( $dir, $file ) -- cgit v1.2.3