From 3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 13 Jun 2006 00:13:34 +0000 Subject: Bug 330487: Automatic Update Notification for Bugzilla - Patch by Frédéric Buclin r=mkanat a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Config/Common.pm | 16 +++++++++++++++- Bugzilla/Config/Core.pm | 9 +++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'Bugzilla/Config') diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index 817e7b5be..521542707 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -64,7 +64,7 @@ use base qw(Exporter); check_sslbase check_priority check_severity check_platform check_opsys check_shadowdb check_urlbase check_webdotbase check_netmask check_user_verify_class check_image_converter - check_languages check_mail_delivery_method + check_languages check_mail_delivery_method check_notification ); # Checking functions for the various values @@ -303,6 +303,20 @@ sub check_mail_delivery_method { return ""; } +sub check_notification { + my $option = shift; + my @current_version = + ($Bugzilla::Config::VERSION =~ m/^(\d+)\.(\d+)(?:(rc|\.)(\d+))?\+?$/); + if ($current_version[1] % 2 && $option eq 'stable_branch_release') { + return "You are currently running a development snapshot, and so your " . + "installation is not based on a branch. If you want to be notified " . + "about the next stable release, you should select " . + "'latest_stable_release' instead"; + } + return ""; +} + + # OK, here are the parameter definitions themselves. # # Each definition is a hash with keys: diff --git a/Bugzilla/Config/Core.pm b/Bugzilla/Config/Core.pm index 738c28fe2..3e1c66623 100644 --- a/Bugzilla/Config/Core.pm +++ b/Bugzilla/Config/Core.pm @@ -103,6 +103,15 @@ sub get_param_list { name => 'shutdownhtml', type => 'l', default => '' + }, + + { + name => 'upgrade_notification', + type => 's', + choices => ['development_snapshot', 'latest_stable_release', + 'stable_branch_release', 'disabled'], + default => 'latest_stable_release', + checker => \&check_notification } ); return @param_list; } -- cgit v1.2.3-24-g4f1b