]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Redirect /?query= to /search?query=
[rails.git] / app / controllers / site_controller.rb
index eb8749f6f659da21af7c69252c570728fbd829c0..5c391d7b228359ca6041f8c26d9b5f86c9dc35bb 100644 (file)
@@ -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