stable too
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@733 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
a5f7b400f0
commit
57a6c39f2a
@ -72,7 +72,12 @@ class PixelFileHandler extends Extension {
|
||||
}
|
||||
|
||||
private function check_contents($file) {
|
||||
return (file_exists($file) && !is_null(getimagesize($file)));
|
||||
$valid = Array(IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG);
|
||||
if(!file_exists($file)) return false;
|
||||
$info = getimagesize($file);
|
||||
if(is_null($info)) return false;
|
||||
if(array_contains($valid, $info[2])) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private function create_thumb($hash) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user