diff options
author | Sebastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-02-27 21:24:41 +0100 |
---|---|---|
committer | Sebastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-02-27 21:24:41 +0100 |
commit | 9e8209064db1e06b99b98ff3309d368d110b22b3 (patch) | |
tree | 5d3262391d480422ef18446f6621abd1f091b19b | |
parent | ab7ac1870ec34b65a5b13100983510e8857e1df2 (diff) | |
download | Shaarli-9e8209064db1e06b99b98ff3309d368d110b22b3.tar.gz Shaarli-9e8209064db1e06b99b98ff3309d368d110b22b3.tar.zst Shaarli-9e8209064db1e06b99b98ff3309d368d110b22b3.zip |
Corrected thumbnail creation.
Because some systems do not allow file overwriting when doing a
rename().
-rw-r--r-- | index.php | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2336,6 +2336,7 @@ function resizeImage($filepath) | |||
2336 | imagejpeg($im2, $tempname, 90); | 2336 | imagejpeg($im2, $tempname, 90); |
2337 | imagedestroy($im); | 2337 | imagedestroy($im); |
2338 | imagedestroy($im2); | 2338 | imagedestroy($im2); |
2339 | unlink($filepath); | ||
2339 | rename($tempname,$filepath); // Overwrite original picture with thumbnail. | 2340 | rename($tempname,$filepath); // Overwrite original picture with thumbnail. |
2340 | return true; | 2341 | return true; |
2341 | } | 2342 | } |