as that causes nil to become "" hence defeating the conditional default.
<% end %>
<% if @user.home_lat.nil? or @user.home_lon.nil? %>
<% end %>
<% if @user.home_lat.nil? or @user.home_lon.nil? %>
- <% lon = h(params['lon']) || '-0.1' %>
- <% lat = h(params['lat']) || '51.5' %>
- <% zoom = h(params['zoom']) || '4' %>
+ <% lon = h(params['lon'] || '-0.1') %>
+ <% lat = h(params['lat'] || '51.5') %>
+ <% zoom = h(params['zoom'] || '4') %>
<% else %>
<% lon = @user.home_lon %>
<% lat = @user.home_lat %>
<% else %>
<% lon = @user.home_lon %>
<% lat = @user.home_lat %>
<% if params['mlon'] and params['mlat'] %>
<% lon = h(params['mlon']) %>
<% lat = h(params['mlat']) %>
<% if params['mlon'] and params['mlat'] %>
<% lon = h(params['mlon']) %>
<% lat = h(params['mlat']) %>
-<% zoom = h(params['zoom']) || '12' %>
+<% zoom = h(params['zoom'] || '12') %>
<% elsif @user and params['lon'].nil? and params['lat'].nil? %>
<% lon = @user.home_lon %>
<% lat = @user.home_lat %>
<% zoom = '12' %>
<%else%>
<% elsif @user and params['lon'].nil? and params['lat'].nil? %>
<% lon = @user.home_lon %>
<% lat = @user.home_lat %>
<% zoom = '12' %>
<%else%>
-<% lon = h(params['lon']) || '-0.1' %>
-<% lat = h(params['lat']) || '51.5' %>
-<% zoom = h(params['zoom']) || '12' %>
+<% lon = h(params['lon'] || '-0.1') %>
+<% lat = h(params['lat'] || '51.5') %>
+<% zoom = h(params['zoom'] || '12') %>
<% end %>
<div id="map">You need a Flash player to use Potlatch, the
<% end %>
<div id="map">You need a Flash player to use Potlatch, the
<% if params['lon'] and params['lat'] %>
<% lon = h(params['lon']) %>
<% lat = h(params['lat']) %>
<% if params['lon'] and params['lat'] %>
<% lon = h(params['lon']) %>
<% lat = h(params['lat']) %>
-<% zoom = h(params['zoom']) || '5' %>
+<% zoom = h(params['zoom'] || '5') %>
<% layers = h(params['layers']) %>
<% elsif params['mlon'] and params['mlat'] %>
<% lon = h(params['mlon']) %>
<% lat = h(params['mlat']) %>
<% layers = h(params['layers']) %>
<% elsif params['mlon'] and params['mlat'] %>
<% lon = h(params['mlon']) %>
<% lat = h(params['mlat']) %>
-<% zoom = h(params['zoom']) || '12' %>
+<% zoom = h(params['zoom'] || '12') %>
<% layers = h(params['layers']) %>
<% elsif cookies.key?("location") %>
<% lon,lat,zoom,layers = cookies["location"].value.first.split(",") %>
<% layers = h(params['layers']) %>
<% elsif cookies.key?("location") %>
<% lon,lat,zoom,layers = cookies["location"].value.first.split(",") %>
<% else %>
<% lon = '-0.1' %>
<% lat = '51.5' %>
<% else %>
<% lon = '-0.1' %>
<% lat = '51.5' %>
-<% zoom = h(params['zoom']) || '5' %>
+<% zoom = h(params['zoom'] || '5') %>
<% layers = h(params['layers']) %>
<% end %>
<% end %>
<% layers = h(params['layers']) %>
<% end %>
<% end %>
</script>
<% if @user.home_lat.nil? or @user.home_lon.nil? %>
</script>
<% if @user.home_lat.nil? or @user.home_lon.nil? %>
- <% lon = h(params['lon']) || '-0.1' %>
- <% lat = h(params['lat']) || '51.5' %>
- <% zoom = h(params['zoom']) || '4' %>
+ <% lon = h(params['lon'] || '-0.1') %>
+ <% lat = h(params['lat'] || '51.5') %>
+ <% zoom = h(params['zoom'] || '4') %>
<% else %>
<% marker = true %>
<% mlon = @user.home_lon %>
<% else %>
<% marker = true %>
<% mlon = @user.home_lon %>