From 80792d4fb156e8c9a06760361bbb66b5a7c1db59 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 13 Dec 2008 05:01:12 +0000 Subject: Set the resize and thumbnail maximum dimension into the module vars table --- core/helpers/photo.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/helpers/photo.php') diff --git a/core/helpers/photo.php b/core/helpers/photo.php index 8f204714..2edd8a4f 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -77,10 +77,12 @@ class photo_Core { $photo->add_to_parent($parent); copy($filename, $photo->file_path()); - // @todo: parameterize these dimensions // This saves the photo a second time, which is unfortunate but difficult to avoid. - $result = $photo->set_thumbnail($filename, 200, 200) - ->set_resize($filename, 640, 640) + $thumbnail_size = module::get_var("core", "thumbnail_size"); + $resize_size = module::get_var("core", "resize_size"); + + $result = $photo->set_thumbnail($filename, $thumbnail_size, $thumbnail_size) + ->set_resize($filename, $resize_size, $resize_size) ->save(); module::event("photo_created", $photo); -- cgit v1.2.3