diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-01-26 16:48:32 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-01-26 16:48:32 +0000 |
commit | 8b33a7f92e1925573a0e42d1d520b9220161b1f8 (patch) | |
tree | 82b547dc0337fd813ece08d099520182d4b9ab67 | |
parent | 913b5bed8f77fb23adf20f245542ceea967cc16c (diff) | |
download | mgaonline-8b33a7f92e1925573a0e42d1d520b9220161b1f8.tar mgaonline-8b33a7f92e1925573a0e42d1d520b9220161b1f8.tar.gz mgaonline-8b33a7f92e1925573a0e42d1d520b9220161b1f8.tar.bz2 mgaonline-8b33a7f92e1925573a0e42d1d520b9220161b1f8.tar.xz mgaonline-8b33a7f92e1925573a0e42d1d520b9220161b1f8.zip |
(is_it_2008_0) factorize test for next commit
-rwxr-xr-x | mdkapplet | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -729,6 +729,10 @@ sub setLastTime() { setVar('LASTCHECK', $date); } +sub is_it_2008_0() { + $product_id->{version} eq '2008.0'; +} + sub has_network_connection_2008() { require network::network; require network::tools; @@ -742,7 +746,7 @@ sub checkNetwork() { return if $checker_pid; require network::tools; # alternatively we could have used 2008.0's network::tools::connected() - my $has_network = $product_id->{version} eq '2008.0' ? has_network_connection_2008() + my $has_network = is_it_2008_0() ? has_network_connection_2008() : network::tools::has_network_connection(); if (!$has_network) { # do not notify if already done: |