From e31ca19a062a114ce251a9eadd183c5df8f5d024 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 26 Dec 2008 04:52:18 +0000 Subject: Added graphics::mark_all_dirty(). The watermark code now marks images as dirty if the admin changes the watermark at all. --- core/helpers/graphics.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/helpers/graphics.php') diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php index 708b7bce..c695abb2 100644 --- a/core/helpers/graphics.php +++ b/core/helpers/graphics.php @@ -122,4 +122,12 @@ class graphics_Core { ->resize($width, $height, $master) ->save($output_file); } + + /** + * Mark all thumbnails and resizes as dirty. They will have to be rebuilt. + * + */ + public static function mark_all_dirty() { + Database::instance()->query("UPDATE `items` SET `thumb_dirty` = 1, `resize_dirty` = 1"); + } } -- cgit v1.2.3