diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 9b09549d0..d69e7f4c1 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -349,9 +349,10 @@ class ChangesetController < ApplicationController if params['bbox'] bbox = params['bbox'] elsif params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat'] - bbox = params['minlon'] + ',' + params['minlat'] + ',' + params['maxlon'] + ',' + params['maxlat'] + bbox = h(params['minlon']) + ',' + h(params['minlat']) + ',' + h(params['maxlon']) + ',' + h(params['maxlat']) else - redirect_to :action => 'list' + #TODO: fix bugs in location determination for history tab (and other tabs) then uncomment this redirect + #redirect_to :action => 'list' end conditions = conditions_bbox(bbox); diff --git a/app/views/changeset/list_bbox.rhtml b/app/views/changeset/list_bbox.rhtml index 4f90d185b..63e54e11d 100644 --- a/app/views/changeset/list_bbox.rhtml +++ b/app/views/changeset/list_bbox.rhtml @@ -8,7 +8,7 @@ if @bbox!=nil %>
-Changsets within the area: +Changesets within the area: (<%= format("%0.3f",lat1) -%>,<%= format("%0.3f",lon1) -%>) to (<%= format("%0.3f",lat2) -%>,<%= format("%0.3f",lon2) -%>)
@@ -32,7 +32,19 @@ Changsets within the area: <%= render :partial => 'changeset_paging_nav' %> +<% + end -<% end %> +else + #bbox is nil. happens if the user surfs to this page directly. +%> + +No area specified
+First use the view tab to pan and zoom to an area of interest, then click the history tab.
+Alternatively view all <%= link_to("recent changes", :controller => "browse", :action => "changesets") %>
+ +<% +end +%>