From 5931cc872d9ed33467712cb4a970bdbaac798ef9 Mon Sep 17 00:00:00 2001 From: mamouneyya Date: Wed, 30 Mar 2011 22:18:06 +0200 Subject: proposed fix for ticket #1664 --- modules/gallery/views/admin_maintenance.html.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/gallery/views') diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index c28def1d..230e9353 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -3,7 +3,9 @@

+

maintenance mode which prevents any non-admin from accessing your Gallery. Some of the tasks below will automatically put your Gallery in maintenance mode for you.") ?> +

  • -- cgit v1.2.3 From 916b7543d13bf33ca704dab18ba3d1eca13d9624 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 10 Apr 2011 13:46:28 -0700 Subject: Gracefully degrade in the case where the .build_number file is missing. Fixes #1673. --- modules/gallery/helpers/gallery.php | 16 +++++++++++----- modules/gallery/helpers/gallery_block.php | 1 + modules/gallery/views/upgrade_checker_block.html.php | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'modules/gallery/views') diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 1fafdef7..cbd9b33c 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -193,19 +193,25 @@ class gallery_Core { */ static function version_string() { if (gallery::RELEASE_CHANNEL == "git") { + $build_number = gallery::build_number(); return sprintf( - "%s (branch %s build %s)", gallery::VERSION, gallery::RELEASE_BRANCH, - gallery::build_number()); + "%s (branch %s, %s)", gallery::VERSION, gallery::RELEASE_BRANCH, + $build_number ? " build $build_number" : "unknown build number"); } else { return sprintf("%s (%s)", gallery::VERSION, gallery::CODE_NAME); } } /** - * Return the contents of the .build_number file, which should be a single integer. + * Return the contents of the .build_number file, which should be a single integer + * or return null if the .build_number file is missing. */ static function build_number() { - $result = parse_ini_file(DOCROOT . ".build_number"); - return $result["build_number"]; + $build_file = DOCROOT . ".build_number"; + if (file_exists($build_file)) { + $result = parse_ini_file(DOCROOT . ".build_number"); + return $result["build_number"]; + } + return null; } } \ No newline at end of file diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index b9ccf25b..0ba7c936 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -112,6 +112,7 @@ class gallery_block_Core { $block->content->version_info = upgrade_checker::version_info(); $block->content->auto_check_enabled = upgrade_checker::auto_check_enabled(); $block->content->new_version = upgrade_checker::get_upgrade_message(); + $block->content->build_number = gallery::build_number(); } return $block; } diff --git a/modules/gallery/views/upgrade_checker_block.html.php b/modules/gallery/views/upgrade_checker_block.html.php index b04887b2..c984d99f 100644 --- a/modules/gallery/views/upgrade_checker_block.html.php +++ b/modules/gallery/views/upgrade_checker_block.html.php @@ -6,8 +6,10 @@

    %code_name.", array("version" => gallery::VERSION, "code_name" => gallery::CODE_NAME)) ?> + + gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => $build_number)) ?> - gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => gallery::build_number())) ?> + gallery::VERSION, "branch" => gallery::RELEASE_BRANCH, "build_number" => $build_number)) ?>

    -- cgit v1.2.3 From 9fe20561068fec04c57f7769aaf9ca5025bdc6ac Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 21 Apr 2011 13:59:03 -0700 Subject: Use window.location = "url" instead of window.location.reload() so that we pop back up to the top of the page so that you see the status message. Fixes #1676. --- modules/gallery/views/admin_modules.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/views') diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index f4ae965c..2cc81b0d 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -6,7 +6,7 @@ dataType: "json", success: function(data) { if (data.reload) { - window.location.reload(); + window.location = ""; } else { $("body").append('
    ' + data.dialog + '
    '); $("#g-dialog").dialog({ -- cgit v1.2.3 From 1af4f99108ffe1ffc2a3ff723c68c5a12dde0223 Mon Sep 17 00:00:00 2001 From: Chris Kelly Date: Thu, 21 Apr 2011 15:57:18 -0400 Subject: Add missing CSS tag so tables get aligned. Fixes #1678. --- modules/gallery/views/admin_languages.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/views') diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index 01d1ce3f..eef087e1 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -51,7 +51,7 @@ $display_name): ?> - +
    -- cgit v1.2.3