diff options
Diffstat (limited to 'admin')
-rw-r--r-- | admin/include/functions.php | 10 |
1 files changed, 4 insertions, 6 deletions
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 ) |