From 632285ee0c7d9b8aa89c1197739b5a521f9c5e9c Mon Sep 17 00:00:00 2001 From: jamaa Date: Mon, 20 May 2013 22:19:34 +0200 Subject: add the image size (in pixels) to the info module adds a new variable "show_size", so had to increment the version number to 3 --- modules/info/helpers/info_installer.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/info/helpers/info_installer.php') diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 43c216dc..5a79c1cc 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,6 +25,7 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); + module::set_var("info", "show_size", 1); } static function upgrade($version) { @@ -35,6 +36,10 @@ class info_installer { module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); module::set_version("info", $version = 2); + } + else if ($version == 2) { + module::set_var("info", "show_size", 1); + module::set_version("info", $version = 3); } } } -- cgit v1.2.3 From 5d8ac644a5db74c9ca3bf563e80643233b49e28c Mon Sep 17 00:00:00 2001 From: jamaa Date: Tue, 11 Jun 2013 21:44:02 +0200 Subject: fix whitespace --- modules/info/helpers/info_installer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/info/helpers/info_installer.php') diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 5a79c1cc..f45f4a27 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,7 +25,7 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); - module::set_var("info", "show_size", 1); + module::set_var("info", "show_size", 1); } static function upgrade($version) { @@ -37,7 +37,7 @@ class info_installer { module::set_var("info", "show_captured", 1); module::set_version("info", $version = 2); } - else if ($version == 2) { + else if ($version == 2) { module::set_var("info", "show_size", 1); module::set_version("info", $version = 3); } -- cgit v1.2.3 From ad634512756b11569cb649ce4322e9ec2c59eb5f Mon Sep 17 00:00:00 2001 From: jamaa Date: Tue, 11 Jun 2013 23:06:09 +0200 Subject: fix upgrade function allow for sequential upgrades --- modules/info/helpers/info_installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/info/helpers/info_installer.php') diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index f45f4a27..2d13eec5 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -37,7 +37,7 @@ class info_installer { module::set_var("info", "show_captured", 1); module::set_version("info", $version = 2); } - else if ($version == 2) { + if ($version == 2) { module::set_var("info", "show_size", 1); module::set_version("info", $version = 3); } -- cgit v1.2.3 From 2d2503680ec3cd90d07a871a71a8e6d2f21c6c3d Mon Sep 17 00:00:00 2001 From: jamaa Date: Thu, 13 Jun 2013 00:00:13 +0200 Subject: change "size" to "dimensions" and display unit "px" --- modules/info/helpers/info_block.php | 6 +++--- modules/info/helpers/info_installer.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/info/helpers/info_installer.php') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php index f3c8cf65..238b18b5 100644 --- a/modules/info/helpers/info_block.php +++ b/modules/info/helpers/info_block.php @@ -72,10 +72,10 @@ class info_block_Core { ); } } - if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_size")) { + if (($theme->item->width && $theme->item->height) && module::get_var("info", "show_dimensions")) { $info["size"] = array( - "label" => t("Size:"), - "value" => t("%width x %height", array("width" => $theme->item->width, "height" => $theme->item->height)) + "label" => t("Dimensions:"), + "value" => t("%width x %height px", array("width" => $theme->item->width, "height" => $theme->item->height)) ); } diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 2d13eec5..2d06a0ef 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,7 +25,7 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); - module::set_var("info", "show_size", 1); + module::set_var("info", "show_dimensions", 1); } static function upgrade($version) { @@ -38,7 +38,7 @@ class info_installer { module::set_version("info", $version = 2); } if ($version == 2) { - module::set_var("info", "show_size", 1); + module::set_var("info", "show_dimensions", 1); module::set_version("info", $version = 3); } } -- cgit v1.2.3