summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-26 04:52:18 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-26 04:52:18 +0000
commite31ca19a062a114ce251a9eadd183c5df8f5d024 (patch)
tree2d932834502ea068a7af40044066b79dfc66c288 /core
parent11d4c2d126041fb86805aefe53f6b0fc7bea4363 (diff)
Added graphics::mark_all_dirty(). The watermark code now marks images
as dirty if the admin changes the watermark at all.
Diffstat (limited to 'core')
-rw-r--r--core/helpers/graphics.php8
1 files changed, 8 insertions, 0 deletions
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");
+ }
}