diff options
Diffstat (limited to 'modules/image_block/helpers/image_block_installer.php')
-rw-r--r-- | modules/image_block/helpers/image_block_installer.php | 14 |
1 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..1b41bc0e 100644 --- a/modules/image_block/helpers/image_block_installer.php +++ b/modules/image_block/helpers/image_block_installer.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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); + } } } |