X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4557654ba63392f0db4aa5c002be692395eb8cee..315d1dab540ad5c11e7a22201387327525578229:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index cb57ddc3a..5c391d7b2 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,6 +1,6 @@ class SiteController < ApplicationController layout 'site' - layout 'map', :only => [:index, :export] + layout :map_layout, :only => [:index, :export] before_filter :authorize_web before_filter :set_locale @@ -41,12 +41,11 @@ class SiteController < ApplicationController editor = preferred_editor if editor == "remote" + require_oauth render :action => :index return end - @extra_body_class = "site-edit-#{editor}" - if params[:node] bbox = Node.find(params[:node]).bbox.to_unscaled @lat = bbox.centre_lat @@ -98,6 +97,8 @@ class SiteController < ApplicationController redirect_to relation_path(params[:relation]) elsif params[:note] redirect_to browse_note_path(params[:note]) + elsif params[:query] + redirect_to search_path(:query => params[:query]) end end