diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-23 04:46:13 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-23 04:46:13 +0000 |
commit | 360fbda04c8882efa053171ffb07fd76efaac940 (patch) | |
tree | eac271f877f4972cb50560e5ef67b88fc43e6006 /core/helpers | |
parent | 14da6b65b7954663455f0f0e31720959e3215bb3 (diff) |
Only clear the dirty bit if we updated the specific target.
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/graphics.php | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php index b38515fb..708b7bce 100644 --- a/core/helpers/graphics.php +++ b/core/helpers/graphics.php @@ -74,7 +74,7 @@ class graphics_Core { if ($item->thumb_dirty) { $ops["thumb"] = $item->thumb_path(); } - if ($item->resize_dirty) { + if ($item->resize_dirty && $item->type != "album") { $ops["resize"] = $item->resize_path(); } @@ -93,15 +93,19 @@ class graphics_Core { } } - $dims = getimagesize($item->thumb_path()); - $item->thumb_width = $dims[0]; - $item->thumb_height = $dims[1]; - $item->thumb_dirty = 0; + if (!empty($ops["thumb"])) { + $dims = getimagesize($item->thumb_path()); + $item->thumb_width = $dims[0]; + $item->thumb_height = $dims[1]; + $item->thumb_dirty = 0; + } - $dims = getimagesize($item->resize_path()); - $item->resize_width = $dims[0]; - $item->resize_height = $dims[1]; - $item->resize_dirty = 0; + if (!empty($ops["resize"])) { + $dims = getimagesize($item->resize_path()); + $item->resize_width = $dims[0]; + $item->resize_height = $dims[1]; + $item->resize_dirty = 0; + } $item->save(); } |