Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
EgbertW committed Jun 3, 2014
1 parent bdedcee commit 9598e7f
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions app/views/planning/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@

plugin_settings[:tracker]['Default'] = default[:tracker]['Default'] if not plugin_settings[:tracker].has_key?('Default')

# Convert tracker names to tracker IDs
k = plugin_settings[:tracker].keys
k.each do |key|
next if key == "Default"
if key.to_i == 0
then
val = plugin_settings[:tracker][key]
tracker = Tracker.where(:name => key).first
plugin_settings[:tracker].delete(key)
plugin_settings[:tracker][tracker[:id]] = val if tracker
end
end

# Remove all old configuration
plugin_settings.each do |key, value|
sym = key.to_sym
Expand All @@ -109,9 +96,9 @@
keys.each do |key|
next if key == "Default"
next if not trackers.has_key?(key)
val = plugin_settings['tracker'][key]
plugin_settings['tracker'][trackers[key]] = val
plugin_settings['tracker'].delete(key)
val = plugin_settings[:tracker][key]
plugin_settings[:tracker][trackers[key]] = val
plugin_settings[:tracker].delete(key)
end

# Provide project and date format to Javascript
Expand Down

0 comments on commit 9598e7f

Please sign in to comment.