aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-27 21:24:41 +0100
committerSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-27 21:24:41 +0100
commit9e8209064db1e06b99b98ff3309d368d110b22b3 (patch)
tree5d3262391d480422ef18446f6621abd1f091b19b /index.php
parentab7ac1870ec34b65a5b13100983510e8857e1df2 (diff)
downloadShaarli-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().
Diffstat (limited to 'index.php')
-rw-r--r--index.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.php b/index.php
index 1ac5187b..4068272c 100644
--- a/index.php
+++ b/index.php
@@ -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}