ref: refs/heads/network
commit 151ee333404e0f02e932450c86b77e90e7a97bdc
Author: Michal Zugec
Date: Thu Oct 1 15:09:06 2009 +0200
fixed comparing of translated hash keys
---
.../network/app/controllers/network_controller.rb | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/plugins/network/app/controllers/network_controller.rb b/plugins/network/app/controllers/network_controller.rb
index 36afecb..a20d40d 100644
--- a/plugins/network/app/controllers/network_controller.rb
+++ b/plugins/network/app/controllers/network_controller.rb
@@ -13,6 +13,8 @@ class NetworkController < ApplicationController
def initialize
end
+ NETMASK_RANGE = 0..32
+
# GET /network
def index
@@ -51,7 +53,6 @@ class NetworkController < ApplicationController
end
@ip, @netmask = ipaddr.split "/"
# when detect PREFIXLEN with leading "/"
- NETMASK_RANGE = 0..32
if ifc.bootproto == "static" && NETMASK_RANGE.include?(netmask.to_i)
@netmask = "/"+@netmask
end
@@ -63,7 +64,7 @@ class NetworkController < ApplicationController
@searchdomains = dns.searches
@default_route = rt.via
@conf_modes = {""=>"", _("static")=>"static", _("dhcp")=>"dhcp"}
- @conf_modes[@conf_mode] ||=@conf_mode
+ @conf_modes[@conf_mode] =@conf_mode unless @conf_modes.has_value? @conf_mode
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org