diff options
author | shadlaws <shad@shadlaws.com> | 2013-01-31 18:59:33 +0100 |
---|---|---|
committer | shadlaws <shad@shadlaws.com> | 2013-01-31 18:59:33 +0100 |
commit | fd8b8de2420066f907d09fd30ac75d678ef3e0ca (patch) | |
tree | 568272dd721ace10e73cca2a14545418e0ba61cd /modules/gallery | |
parent | e17c39386b9d322f9bafd8b548ec6b94a7c5f7b5 (diff) |
#1983: Remove item keys changed for/by graphics::generate from significant changes list.
There's no need to run through all of the item save/validation logic for these
entries, which are changed frequently during the course of thumb/resize generation.
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/models/item.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index f9edd3c6..f80fc53a 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -318,9 +318,11 @@ class Item_Model_Core extends ORM_MPTT { */ public function save() { $significant_changes = $this->changed; - unset($significant_changes["view_count"]); - unset($significant_changes["relative_url_cache"]); - unset($significant_changes["relative_path_cache"]); + foreach (array("view_count", "relative_url_cache", "relative_path_cache", + "resize_width", "resize_height", "resize_dirty", + "thumb_width", "thumb_height", "thumb_dirty") as $key) { + unset($significant_changes[$key]); + } if ((!empty($this->changed) && $significant_changes) || isset($this->data_file)) { $this->updated = time(); |