summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-16 13:29:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-16 13:29:19 +0000
commit2ff8d37f7c51c03e37638c37e030e060d2c34669 (patch)
treec72f5c3597f86bd98cde9765692820dc4af7b89e /perl-install/standalone
parente78fb4780e2059e155ec011dbefe71dd665cf7be (diff)
downloaddrakx-backup-do-not-use-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar
drakx-backup-do-not-use-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar.gz
drakx-backup-do-not-use-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar.bz2
drakx-backup-do-not-use-2ff8d37f7c51c03e37638c37e030e060d2c34669.tar.xz
drakx-backup-do-not-use-2ff8d37f7c51c03e37638c37e030e060d2c34669.zip
replace occurences of "$foo ? $foo : $bar" with "$foo || $bar"
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakconnect4
-rwxr-xr-xperl-install/standalone/drakperm2
-rwxr-xr-xperl-install/standalone/net_monitor6
3 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index afea1894f..504bf7add 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -85,7 +85,7 @@ $hbox1->pack_start(new Gtk2::Label(N("Profile: ")),0,0,0);
my $combo1 = new Gtk2::Combo;
$combo1->set_popdown_strings(network::netconnect::get_profiles());
my $old_profile = $netcnx->{PROFILE};
-$combo1->entry->set_text($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
+$combo1->entry->set_text($netcnx->{PROFILE} || "default");
$combo1->entry->set_editable(0);
$hbox1->pack_start($combo1,0,0,0);
my $button_del = new Gtk2::Button(N("Del profile..."));
@@ -339,7 +339,7 @@ sub build_list {
}
sub apply {
- $old_profile = $netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default";
+ $old_profile = $netcnx->{PROFILE} || "default";
network::netconnect::save_conf($netcnx, $netc, $intf);
$netcnx->{type} eq 'modem' and network::modem::ppp_configure($in, $netcnx->{$netcnx->{type}}, '');
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index f2b79be3e..8d33efd33 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -335,7 +335,7 @@ sub row_setting_dialog {
#$group = ($group_read->get_active ? 4 : 0)+($group_write->get_active ? 2 : 0)+($group_execute->get_active ? 1 : 0);
#$other = ($other_read->get_active ? 4 : 0)+($other_write->get_active ? 2 : 0)+($other_execute->get_active ? 1 : 0);
my $s = ($sticky->get_active ? 1 : 0) + ($suid->get_active ? 4 : 0) + ($gid->get_active ? 2 : 0);
- $Perm_list->set_text($row,3, ($s ? $s : '') . $user . $group . $other);
+ $Perm_list->set_text($row,3, ($s || '') . $user . $group . $other);
$dlg->destroy;
$modified++;
});
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index beead5730..bd3a9ea9e 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -73,7 +73,7 @@ network::netconnect::load_conf($netcnx, $netc, $intf);
network::netconnect::read_net_conf('', $netcnx, $netc);
my $combo1 = new Gtk::Combo;
$combo1->set_popdown_strings(network::netconnect::get_profiles());
-$combo1->entry->set_text($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
+$combo1->entry->set_text($netcnx->{PROFILE} || "default");
$combo1->entry->set_editable(0);
MDK::Common::Globals::init(
in => $in,
@@ -358,8 +358,8 @@ sub update {
};
my @intfs = get_val(); # get values from /proc file system
- if ($combo1->entry->get_text ne ($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default")) {
- $combo1->entry->set_text($netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
+ if ($combo1->entry->get_text ne ($netcnx->{PROFILE} || "default")) {
+ $combo1->entry->set_text($netcnx->{PROFILE} || "default");
}
foreach (@intfs) {
my $intf = $_;