diff options
Diffstat (limited to 'modules/image_block/helpers/image_block_installer.php')
-rw-r--r-- | modules/image_block/helpers/image_block_installer.php | 12 |
1 files changed, 11 insertions, 1 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); + } } } |