X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/048f7fca8c985a8c9c138d8fc0041db5231b0fc0..f0b5776389bff72fd88cc3e628945fd6c0554f1e:/app/controllers/amf_controller.rb?ds=sidebyside diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index 541926c74..7b2cba701 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -484,7 +484,9 @@ def readwayquery(id) " FROM current_way_segments,current_segments,current_nodes AS n1,current_nodes AS n2 "+ " WHERE current_way_segments.id=#{id} "+ " AND segment_id=current_segments.id "+ + " AND current_segments.visible=1 "+ " AND n1.id=node_a and n2.id=node_b "+ + " AND n1.visible=1 AND n2.visible=1 "+ " ORDER BY sequence_id" end @@ -553,9 +555,9 @@ end def getuserid(token) token=sqlescape(token) if (token=~/^(.+)\+(.+)$/) then - return ActiveRecord::Base.connection.select_value("SELECT id FROM users WHERE active=1 AND timeout>NOW() AND email='#{$1}' AND pass_crypt=MD5('#{$2}')") + return ActiveRecord::Base.connection.select_value("SELECT id FROM users WHERE active=1 AND email='#{$1}' AND pass_crypt=MD5('#{$2}')") else - return ActiveRecord::Base.connection.select_value("SELECT id FROM users WHERE active=1 AND timeout>NOW() AND token='#{token}'") + return ActiveRecord::Base.connection.select_value("SELECT id FROM users WHERE active=1 AND token='#{token}'") end end