summaryrefslogtreecommitdiff
path: root/modules/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery')
-rw-r--r--modules/gallery/controllers/quick.php2
-rw-r--r--modules/gallery/helpers/gallery_graphics.php12
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/gallery/controllers/quick.php b/modules/gallery/controllers/quick.php
index 17abc39f..da4768fd 100644
--- a/modules/gallery/controllers/quick.php
+++ b/modules/gallery/controllers/quick.php
@@ -38,7 +38,7 @@ class Quick_Controller extends Controller {
if ($degrees) {
$tmpfile = tempnam(TMPPATH, "rotate") . "." .
pathinfo($item->file_path(), PATHINFO_EXTENSION);
- gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees));
+ gallery_graphics::rotate($item->file_path(), $tmpfile, array("degrees" => $degrees), $item);
$item->set_data_file($tmpfile);
$item->save();
unlink($tmpfile);
diff --git a/modules/gallery/helpers/gallery_graphics.php b/modules/gallery/helpers/gallery_graphics.php
index 17de4930..1f47a65c 100644
--- a/modules/gallery/helpers/gallery_graphics.php
+++ b/modules/gallery/helpers/gallery_graphics.php
@@ -25,17 +25,17 @@ class gallery_graphics_Core {
* @param string $output_file
* @param array $options
*/
- static function rotate($input_file, $output_file, $options) {
+ static function rotate($input_file, $output_file, $options, $item) {
graphics::init_toolkit();
- module::event("graphics_rotate", $input_file, $output_file, $options);
+ module::event("graphics_rotate", $input_file, $output_file, $options, $item);
Image::factory($input_file)
->quality(module::get_var("gallery", "image_quality"))
->rotate($options["degrees"])
->save($output_file);
- module::event("graphics_rotate_completed", $input_file, $output_file, $options);
+ module::event("graphics_rotate_completed", $input_file, $output_file, $options, $item);
}
/**
@@ -87,11 +87,11 @@ class gallery_graphics_Core {
* @param string $output_file
* @param array $options
*/
- static function composite($input_file, $output_file, $options) {
+ static function composite($input_file, $output_file, $options, $item) {
try {
graphics::init_toolkit();
- module::event("graphics_composite", $input_file, $output_file, $options);
+ module::event("graphics_composite", $input_file, $output_file, $options, $item);
list ($width, $height) = getimagesize($input_file);
list ($w_width, $w_height) = getimagesize($options["file"]);
@@ -121,7 +121,7 @@ class gallery_graphics_Core {
->quality(module::get_var("gallery", "image_quality"))
->save($output_file);
- module::event("graphics_composite_completed", $input_file, $output_file, $options);
+ module::event("graphics_composite_completed", $input_file, $output_file, $options, $item);
} catch (ErrorException $e) {
Kohana_Log::add("error", $e->get_message());
}