diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-12-02 08:38:16 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-12-02 08:38:16 -0800 |
commit | 6c46382fd01744c20a8fee0e4483b6f99f592740 (patch) | |
tree | 9879e345f057a564475cf66b7c84854877cb0368 /modules/image_block | |
parent | c3ef8921260db8e39b6d2a7b4708e3d19f35f8b5 (diff) |
Ok, do a real fix for #1499 by creating version 3 of the image_block
module and creating the image_count variable if it wasn't already set.
Diffstat (limited to 'modules/image_block')
-rw-r--r-- | modules/image_block/helpers/image_block_installer.php | 12 | ||||
-rw-r--r-- | modules/image_block/module.info | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/modules/image_block/helpers/image_block_installer.php b/modules/image_block/helpers/image_block_installer.php index 62c38ba4..27097216 100644 --- a/modules/image_block/helpers/image_block_installer.php +++ b/modules/image_block/helpers/image_block_installer.php @@ -21,7 +21,7 @@ class image_block_installer { static function install() { module::set_var("image_block", "image_count", "1"); - module::set_version("image_block", $version = 2); + module::set_version("image_block", $version = 3); } static function upgrade($version) { @@ -30,5 +30,15 @@ class image_block_installer { module::set_var("image_block", "image_count", "1"); module::set_version("image_block", $version = 2); } + + // Oops, there was a bug in the installer for version 2 resulting + // in some folks not getting the image_count variable set. Bump + // to version 3 and fix it. + if ($version == 2) { + if (module::get_var("image_block", "image_count", 0) === 0) { + module::set_var("image_block", "image_count", "1"); + } + module::set_version("image_block", $version = 3); + } } } diff --git a/modules/image_block/module.info b/modules/image_block/module.info index b92b83df..6836fabc 100644 --- a/modules/image_block/module.info +++ b/modules/image_block/module.info @@ -1,3 +1,3 @@ name = "Image Block" description = "Display a random image in the sidebar" -version = 2 +version = 3 |