if the user didn't specify the cache id, we'll delete the image and not keep it

This commit is contained in:
Christian Haschek 2015-09-28 15:56:04 +02:00
parent 193cf828c2
commit a51de98781

View File

@ -45,9 +45,7 @@ switch ($type) {
if(!$cache)
$cache = md5(time().rand(1,2000));
$hash = $cache.'-'.preg_replace("/[^A-Za-z0-9 ]/", '', $url).'.'.$ft;
$hash = 'c'.$cache.'-'.preg_replace("/[^A-Za-z0-9 ]/", '', $url).'.'.$ft;
if(!is_dir(__DIR__.'/cache/'))
mkdir(__DIR__.'/cache/');
@ -89,6 +87,9 @@ else if($ft=='png')
imagedestroy($res);
if(!$cache)
unlink($file);
function isBase64($data)
{