diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-15 13:36:16 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-15 13:36:16 -0800 |
commit | 916da15cbb7f24a68be27ef4170be864d51027c4 (patch) | |
tree | d4bae77ea1290dd6f25348d488a751c2247aaab5 /modules/gallery/helpers | |
parent | 1066e64354ff44f88c7dd0de3bb3e50411458523 (diff) | |
parent | 260660b2f61e96372686eacce2ce7b66a40be4a2 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 410b6413..1e0ad28c 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -240,7 +240,7 @@ class gallery_installer { 100); graphics::add_rule( "gallery", "resize", "gallery_graphics::resize", - array("width" => 640, "height" => 480, "master" => Image::AUTO), + array("width" => 640, "height" => 640, "master" => Image::AUTO), 100); // Instantiate default themes (site and admin) @@ -440,6 +440,22 @@ class gallery_installer { module::set_var("gallery", "simultaneous_upload_limit", 5); module::set_version("gallery", $version = 21); } + + // Update the graphics rules table so that the maximum height for resizes is 640 not 480. + // Fixes ticket #671 + if ( $version == 21) { + $resize_rule = ORM::factory("graphics_rule") + ->where("id", "=", "2") + ->find(); + // make sure it hasn't been changed already + $args = unserialize($resize_rule->args); + if ($args["height"] == 480 && $args["width"] == 640) { + $args["height"] = 640; + $resize_rule->args = serialize($args); + $resize_rule->save(); + } + module::set_version("gallery", $version = 22); + } } static function uninstall() { |