ref: refs/heads/master
commit f92a0f5492d357cf90788434660f49c1c38d3031
Author: Josef Reidinger
Date: Tue Aug 4 10:20:44 2009 +0200
use or for default empty hash
---
plugins/systemtime/lib/systemtime.rb | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/plugins/systemtime/lib/systemtime.rb b/plugins/systemtime/lib/systemtime.rb
index 2c3fdd0..32166e0 100644
--- a/plugins/systemtime/lib/systemtime.rb
+++ b/plugins/systemtime/lib/systemtime.rb
@@ -1,26 +1,26 @@
# Systemtime
def fill_proxy_with_time(proxy,params)
- proxy.date = params[:date][:date]
- proxy.time = params[:currenttime]
- proxy.timezones = [] #not needed anymore
- proxy.utcstatus = ""
- proxy.timezone = ""
+ proxy.date = params[:date][:date]
+ proxy.time = params[:currenttime]
+ proxy.timezones = [] #not needed anymore
+ proxy.utcstatus = ""
+ proxy.timezone = ""
end
def fill_proxy_with_timezone(proxy,params,timezones)
- region = timezones.find { |reg| reg.name == params[:region] }
- region = {} unless region
+ region = timezones.find { |reg| reg.name == params[:region] } || Hash.new
- tmz = region.entries.find { |e| e.name == params[:timezone]}
- proxy.timezone = tmz.id if tmz
+ tmz = region.entries.find { |e| e.name == params[:timezone]}
+ proxy.timezone = tmz.id if tmz
- if (proxy.utcstatus != "UTConly")
- proxy.utcstatus = params[:utc] == "true" ? "UTC" : "localtime"
- end
- proxy.time = ""
- proxy.date = ""
- proxy.timezones = [] #not needed anymore
+ if (proxy.utcstatus != "UTConly")
+ proxy.utcstatus = params[:utc] == "true" ? "UTC" : "localtime"
+ end
+
+ proxy.time = ""
+ proxy.date = ""
+ proxy.timezones = [] #not needed anymore
end
\ No newline at end of file
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org