diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_graphics.php | 6 | ||||
-rw-r--r-- | modules/gallery/helpers/graphics.php | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php index e63b9336..17de4930 100644 --- a/modules/gallery/helpers/gallery_graphics.php +++ b/modules/gallery/helpers/gallery_graphics.php @@ -46,10 +46,10 @@ class gallery_graphics_Core { * @param string $output_file * @param array $options */ - static function resize($input_file, $output_file, $options) { + static function resize($input_file, $output_file, $options, $item) { graphics::init_toolkit(); - module::event("graphics_resize", $input_file, $output_file, $options); + module::event("graphics_resize", $input_file, $output_file, $options, $item); if (@filesize($input_file) == 0) { throw new Exception("@todo EMPTY_INPUT_FILE"); @@ -69,7 +69,7 @@ class gallery_graphics_Core { $image->save($output_file); } - module::event("graphics_resize_completed", $input_file, $output_file, $options); + module::event("graphics_resize_completed", $input_file, $output_file, $options, $item); } /** diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 834211bf..04501132 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -169,9 +169,7 @@ class graphics_Core { } foreach (self::_get_rules($target) as $rule) { - $options = unserialize($rule->args); - $options["parent_id"] = $item->parent_id; - $args = array($working_file, $output_file, $options); + $args = array($working_file, $output_file, unserialize($rule->args), $item); call_user_func_array($rule->operation, $args); $working_file = $output_file; } |