summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
authorcolings <colings@example.com>2011-02-21 15:40:58 -0600
committercolings <colings@example.com>2011-02-21 15:40:58 -0600
commit68edb2454dcd2044a82d8e8f8a1b96330e6d3b8c (patch)
treec84ce5f072c72b995696dbd0ee8563ca6ac36a3c /modules/gallery
parentd759d47ef99ebde158620f43ab46a83f445d9e53 (diff)
Added 'item' to parameters passed to graphics rules
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/helpers/gallery_graphics.php6
-rw-r--r--modules/gallery/helpers/graphics.php4
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;
}