Commit 69dfc6e3 authored by Matthias Larisch's avatar Matthias Larisch Committed by Matthias Larisch

further checks in pictureResize

parent 3fe0af2e
......@@ -682,13 +682,15 @@ class XhrMethods
$resize = json_decode($data['resize'], true);
if (is_array($resize)) {
if (is_array($resize) && count($resize) < 5) {
foreach ($resize as $r) {
$r = (int)$r;
copy(ROOT_DIR . 'images/' . $id . '/' . $img, ROOT_DIR . 'images/' . $id . '/' . $r . '_' . $img);
$image = new fImage(ROOT_DIR . 'images/' . $id . '/' . $r . '_' . $img);
$image->resize($r, 0);
$image->saveChanges();
if ($r < 1000) {
$r = (int)$r;
copy(ROOT_DIR . 'images/' . $id . '/' . $img, ROOT_DIR . 'images/' . $id . '/' . $r . '_' . $img);
$image = new fImage(ROOT_DIR . 'images/' . $id . '/' . $r . '_' . $img);
$image->resize($r, 0);
$image->saveChanges();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment