aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/thumbnail.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/admin/thumbnail.php b/admin/thumbnail.php
index 75ecc60eb..d2269762f 100644
--- a/admin/thumbnail.php
+++ b/admin/thumbnail.php
@@ -47,17 +47,20 @@ function get_images_without_thumbnail( $dir )
{
while ( $file = readdir( $opendir ) )
{
- $path = $dir.'/'.$file;
- if ( is_image( $path, true ) )
+ if (preg_match('/^[a-zA-Z0-9-_.]+$/', $file))
{
- if ( !TN_exists( $dir, $file ) )
+ $path = $dir.'/'.$file;
+ if ( is_image( $path, true ) )
{
- $image_infos = getimagesize( $path );
- $size = floor( filesize( $path ) / 1024 ). ' KB';
- array_push( $images, array( 'name' => $file,
- 'width' => $image_infos[0],
- 'height' => $image_infos[1],
- 'size' => $size ) );
+ if ( !TN_exists( $dir, $file ) )
+ {
+ $image_infos = getimagesize( $path );
+ $size = floor( filesize( $path ) / 1024 ). ' KB';
+ array_push( $images, array( 'name' => $file,
+ 'width' => $image_infos[0],
+ 'height' => $image_infos[1],
+ 'size' => $size ) );
+ }
}
}
}
@@ -427,4 +430,4 @@ else
}
//----------------------------------------------------------- sending html code
$vtp->Parse( $handle , 'sub', $sub );
-?> \ No newline at end of file
+?>