diff options
Diffstat (limited to 'core/helpers/graphics.php')
-rw-r--r-- | core/helpers/graphics.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php index f80d88f5..f708435b 100644 --- a/core/helpers/graphics.php +++ b/core/helpers/graphics.php @@ -48,7 +48,21 @@ class graphics_Core { $rule->args = serialize($args); $rule->save(); - self::mark_dirty(true, true); + self::mark_dirty($target == "thumb", $target == "resize"); + } + + /** + * Remove any matching graphics rules + * @param string $module_name the module that added the rule + * @param string $target the target for this operation ("thumb" or "resize") + * @param string $operation the name of the operation + */ + static function remove_rule($module_name, $target, $operation) { + ORM::factory("graphics_rule") + ->where("module_name", $module_name) + ->where("target", $target) + ->where("operation", $operation) + ->delete_all(); } /** |