summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-26 16:48:32 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-26 16:48:32 +0000
commit8b33a7f92e1925573a0e42d1d520b9220161b1f8 (patch)
tree82b547dc0337fd813ece08d099520182d4b9ab67
parent913b5bed8f77fb23adf20f245542ceea967cc16c (diff)
downloadmgaonline-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-xmdkapplet6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index d9a4744d..a691be6f 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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: