summaryrefslogtreecommitdiff
path: root/modules/image_block
diff options
context:
space:
mode:
Diffstat (limited to 'modules/image_block')
-rw-r--r--modules/image_block/helpers/image_block_block.php4
-rw-r--r--modules/image_block/helpers/image_block_installer.php14
-rw-r--r--modules/image_block/module.info2
3 files changed, 15 insertions, 5 deletions
diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php
index 0a53672c..44e63a29 100644
--- a/modules/image_block/helpers/image_block_block.php
+++ b/modules/image_block/helpers/image_block_block.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
@@ -44,7 +44,7 @@ class image_block_block_Core {
if ($items) {
$block = new Block();
$block->css_id = "g-image-block";
- $block->title = t("Random image");
+ $block->title = t2("Random image", "Random images", $image_count);
$block->content = new View("image_block_block.html");
$block->content->items = $items;
}
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);
+ }
}
}
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