diff options
author | lpsolit%gmail.com <> | 2006-06-13 02:13:34 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-06-13 02:13:34 +0200 |
commit | 3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4 (patch) | |
tree | ae6ebca77c751c1ac29bede5340fa8ba308494ca /Bugzilla/Config | |
parent | e36503867847944db6ef44491f0e8343b5faa591 (diff) | |
download | bugzilla-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.gz bugzilla-3e81855fc65b49d05bf0dc0d1a1cf1b1b044f8f4.tar.xz |
Bug 330487: Automatic Update Notification for Bugzilla - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r-- | Bugzilla/Config/Common.pm | 16 | ||||
-rw-r--r-- | Bugzilla/Config/Core.pm | 9 |
2 files changed, 24 insertions, 1 deletions
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; } |