Support legacy bbox param on /history as well

Fixes #586
This commit is contained in:
John Firebaugh 2013-12-02 10:54:16 -08:00
parent 69fdcfd163
commit d95361bcb9
3 changed files with 4 additions and 4 deletions

View file

@ -44,10 +44,10 @@ OSM.History = function(map) {
} }
function loadData() { function loadData() {
var data = {}; var data = {list: '1'};
if (window.location.pathname === '/history') { if (window.location.pathname === '/history') {
data = {bbox: map.getBounds().wrap().toBBoxString()}; data.bbox = map.getBounds().wrap().toBBoxString();
} }
$.ajax({ $.ajax({

View file

@ -268,7 +268,7 @@ class ChangesetController < ApplicationController
return return
end end
if request.format == :html and !params[:bbox] if request.format == :html and !params[:list]
require_oauth require_oauth
render :action => :history, :layout => map_layout render :action => :history, :layout => map_layout
else else

View file

@ -1721,7 +1721,7 @@ EOF
assert_template "changeset/history" assert_template "changeset/history"
assert_select "h2", :text => "Changesets", :count => 1 assert_select "h2", :text => "Changesets", :count => 1
get :list, {:format => "html", :bbox => '-180,-90,90,180'} get :list, {:format => "html", :list => '1', :bbox => '-180,-90,90,180'}
assert_response :success assert_response :success
assert_template "list" assert_template "list"