diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-27 15:24:51 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-27 15:24:51 -0700 |
| commit | 467b74c3106558d1656301b9c73236417d4421ac (patch) | |
| tree | 6f5364ef698847b04b231852bb9791010006af24 /modules/gallery/helpers/gallery_installer.php | |
| parent | 0ab73cd1adb2acac0f2b2f97acc8362083d9cdfa (diff) | |
This path requires the upgrader to be run and applies the following changes:
* moves the composite method back into core
* requires that the operation be fully qualified i.e. gallery_graphics::resize
* caches the graphics rules on each request
Diffstat (limited to 'modules/gallery/helpers/gallery_installer.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index d4aae4c3..f995b606 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -235,11 +235,11 @@ class gallery_installer { // Add rules for generating our thumbnails and resizes graphics::add_rule( - "gallery", "thumb", "resize", + "gallery", "thumb", "gallery_graphics::resize", array("width" => 200, "height" => 200, "master" => Image::AUTO), 100); graphics::add_rule( - "gallery", "resize", "resize", + "gallery", "resize", "gallery_graphics::resize", array("width" => 640, "height" => 480, "master" => Image::AUTO), 100); @@ -268,7 +268,7 @@ class gallery_installer { module::set_var("gallery", "show_credits", 1); // @todo this string needs to be picked up by l10n_scanner module::set_var("gallery", "credits", "Powered by <a href=\"%url\">Gallery %version</a>"); - module::set_version("gallery", 13); + module::set_version("gallery", 14); } static function upgrade($version) { @@ -375,6 +375,21 @@ class gallery_installer { module::set_version("gallery", $version = 13); } + if ($version == 13) { + // Add rules for generating our thumbnails and resizes + graphics::remove_rule("gallery", "thumb", "gallery_graphics::resize"); + graphics::remove_rule("gallery", "resize", "gallery_graphics::resize"); + graphics::add_rule( + "gallery", "thumb", "gallery_graphics::resize", + array("width" => 200, "height" => 200, "master" => Image::AUTO), + 100); + graphics::add_rule( + "gallery", "resize", "gallery_graphics::resize", + array("width" => 640, "height" => 480, "master" => Image::AUTO), + 100); + module::set_version("gallery", $version = 14); + } + } static function uninstall() { |
