summaryrefslogtreecommitdiffstats
path: root/dns_wizard
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-18 20:50:48 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-18 20:50:48 +0000
commit28275fce0361a2b721951131ef4a07f0ac0d22af (patch)
tree3c7e9bf13f434a673cde997d98b8683ff5e45658 /dns_wizard
parentb9626dc4aaf5dfce1b8cf01dee5facb4b5791df8 (diff)
downloaddrakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar
drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar.gz
drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar.bz2
drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.tar.xz
drakwizard-28275fce0361a2b721951131ef4a07f0ac0d22af.zip
simplify
Diffstat (limited to 'dns_wizard')
-rw-r--r--dns_wizard/Bind.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm
index 4f71f299..19513b77 100644
--- a/dns_wizard/Bind.pm
+++ b/dns_wizard/Bind.pm
@@ -112,13 +112,10 @@ $o->{pages} = {
} elsif ($o->{var}{wiz_level} == 1) {
return 'interface';
} elsif ($o->{var}{wiz_level} == 3) {
- if (-f $sys_wizard_dns) {
- return 'addhost';
- } else {
- return 'error_notmaster';
- }
+ return -f $sys_wizard_dns ? 'addhost' : 'error_notmaster';
} elsif ($o->{var}{wiz_level} == 4) {
- if (-f $sys_wizard_dns) { return 'removehost' } else { return 'error_notmaster' } }
+ return -f $sys_wizard_dns ? 'removehost' : 'error_notmaster';
+ }
},
data => [
{ label => '', val => \$o->{var}{wiz_level}, type => 'list', list => [ sort keys %level ], format => sub { $level{$_[0]} } },