diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-10-03 14:22:52 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-10-03 14:22:52 +0000 |
commit | a1f4d390c864895acdc015fe93967a761fae3d1d (patch) | |
tree | 747239e3b8f792d0e2920156a121e7f459d30b83 | |
parent | 784a8e4734acb91facda5cb83deb0472c8be984d (diff) | |
download | mgaonline-a1f4d390c864895acdc015fe93967a761fae3d1d.tar mgaonline-a1f4d390c864895acdc015fe93967a761fae3d1d.tar.gz mgaonline-a1f4d390c864895acdc015fe93967a761fae3d1d.tar.bz2 mgaonline-a1f4d390c864895acdc015fe93967a761fae3d1d.tar.xz mgaonline-a1f4d390c864895acdc015fe93967a761fae3d1d.zip |
(setVar) simplify signature
-rwxr-xr-x | mdkapplet | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -295,6 +295,7 @@ sub is_there_a_new_distributions() { # only compare first distro: if it's not the same as the currently installed one, # then it's the most recent release: my $new_distro = $distros[0]; + local $product_id->{version} = '2008.1'; return if !member($product_id->{version}, map { $_->{version} } @distros); @@ -520,7 +521,7 @@ sub getTime() { sub setLastTime() { my $date = getTime(); - setVar($localfile, 'LASTCHECK', $date); + setVar('LASTCHECK', $date); } sub checkNetwork() { @@ -624,17 +625,17 @@ sub logIt { } sub setVar { - my ($file, $var, $st) = @_; - my %s = getVarsFromSh($file); + my ($var, $st) = @_; + my %s = getVarsFromSh($localfile); $s{$var} = $st; - setVarsInSh($file, \%s); + setVarsInSh($localfile, \%s); } sub setAutoStart { my $state = shift; my $date = getTime(); if (-f $localfile) { - setVar($localfile, 'AUTOSTART', $state); + setVar('AUTOSTART', $state); } else { output_p $localfile, qq(AUTOSTART=$state LASTCHECK=$date |