summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-27 17:25:31 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-27 17:25:31 +0000
commit5ef344820697f8a6e07359bf9b29b969c7ce37b0 (patch)
tree834ffbed760287a4e45efbe0bae6c86a00715baf
parent4a5d39de7070bcfa6410ded1c642ceafd30d14b4 (diff)
downloadmgaonline-5ef344820697f8a6e07359bf9b29b969c7ce37b0.tar
mgaonline-5ef344820697f8a6e07359bf9b29b969c7ce37b0.tar.gz
mgaonline-5ef344820697f8a6e07359bf9b29b969c7ce37b0.tar.bz2
mgaonline-5ef344820697f8a6e07359bf9b29b969c7ce37b0.tar.xz
mgaonline-5ef344820697f8a6e07359bf9b29b969c7ce37b0.zip
(is_extmaint_supported) factorize test for extended maintenance and
alter it btw
-rwxr-xr-xmdkapplet6
-rw-r--r--mdkonline.pm5
2 files changed, 8 insertions, 3 deletions
diff --git a/mdkapplet b/mdkapplet
index 5a056b7b..eb7c2eab 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -461,7 +461,7 @@ sub refresh_no_more_supported_msg() {
my $msg;
# is extended maintenance available?
- if ($extended_maintenance_url) {
+ if (is_extmaint_supported()) {
if ($no_more_supported eq 'none') {
$msg = N("You should get extended maintenance.");
} else {
@@ -481,13 +481,13 @@ sub no_more_supported_choice() {
local $mdkapplet_gui::width = 580;
my $w = new_portable_dialog(N("Your distribution is no longer supported"));
my ($b1, $b2, $b3);
- my $choice = $extended_maintenance_url ? 'extended' : ($no_more_supported ne 'none' ? 'upgrade' : undef);
+ my $choice = is_extmaint_supported() ? 'extended' : ($no_more_supported ne 'none' ? 'upgrade' : undef);
my @widgets = (
get_banner(),
gtknew('Label_Left',
text => get_obsolete_message() . "\n", @common),
- if_($extended_maintenance_url,
+ if_(is_extmaint_supported(),
$b1 = gtknew('RadioButton',
text => N("Purchase a maintenance extension for this version (%s) and keep it running until.", $product_id->{version}),
toggled => sub {
diff --git a/mdkonline.pm b/mdkonline.pm
index 7ade89e9..6378ccca 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -41,6 +41,7 @@ our @EXPORT = qw(find_current_distro
get_urpmi_options
is_it_2008_0
is_enterprise_media_supported
+ is_extmaint_supported
is_restricted_media_supported
translate_product
xml2perl
@@ -73,6 +74,10 @@ sub is_it_2008_0() {
$product_id->{version} eq '2008.0';
}
+sub is_extmaint_supported() {
+ $product_id->{support} eq 'extended'
+}
+
sub is_enterprise_media_supported() {
return if is_it_2008_0();
to_bool($product_id->{type} eq 'Enterprise' && $product_id->{product} eq 'Server');