From: Tom Hughes Date: Mon, 7 Jun 2010 21:26:33 +0000 (+0100) Subject: Merge branch 'master' into openstreetbugs X-Git-Tag: live~5052^2~207 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/50224b473bce736436d27c64bd46c1910e4d43ec?hp=-c Merge branch 'master' into openstreetbugs Conflicts: app/controllers/browse_controller.rb --- 50224b473bce736436d27c64bd46c1910e4d43ec diff --combined app/controllers/browse_controller.rb index d9b18769c,9aec1060a..2962c6836 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@@ -4,7 -4,7 +4,7 @@@ class BrowseController < ApplicationCon before_filter :authorize_web before_filter :set_locale before_filter { |c| c.check_database_readable(true) } - around_filter :timeout, :except => [:start] + around_filter :web_timeout, :except => [:start] def start end @@@ -77,29 -77,4 +77,13 @@@ rescue ActiveRecord::RecordNotFound render :action => "not_found", :status => :not_found end + + def bug + @type = "bug" + @bug = MapBug.find(params[:id]) + @next = MapBug.find(:first, :order => "id ASC", :conditions => [ "status != 'hidden' AND id > :id", { :id => @bug.id }] ) + @prev = MapBug.find(:first, :order => "id DESC", :conditions => [ "status != 'hidden' AND id < :id", { :id => @bug.id }] ) + rescue ActiveRecord::RecordNotFound + render :action => "not_found", :status => :not_found + end - - private - - def timeout - SystemTimer.timeout_after(30) do - yield - end - rescue ActionView::TemplateError => ex - if ex.original_exception.is_a?(Timeout::Error) - render :action => "timeout" - else - raise - end - rescue Timeout::Error - render :action => "timeout" - end end diff --combined config/environment.rb index 23d46c5d4,0a67be745..53dfabb6a --- a/config/environment.rb +++ b/config/environment.rb @@@ -5,7 -5,7 +5,7 @@@ ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present - RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION + RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION # Set the server URL SERVER_URL = ENV['OSM_SERVER_URL'] || 'www.openstreetmap.org' @@@ -79,8 -79,8 +79,8 @@@ Rails::Initializer.run do |config # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. config.action_controller.session = { - :session_key => '_osm_session', - :secret => 'd886369b1e709c61d1f9fcb07384a2b96373c83c01bfc98c6611a9fe2b6d0b14215bb360a0154265cccadde5489513f2f9b8d9e7b384a11924f772d2872c2a1f' + :key => '_osm_session', + :secret => 'd886369b1e709c61d1f9fcb07384a2b96373c83c01bfc98c6611a9fe2b6d0b14215bb360a0154265cccadde5489513f2f9b8d9e7b384a11924f772d2872c2a1f' } # Use the database for sessions instead of the cookie-based default, @@@ -98,5 -98,4 +98,5 @@@ # Make Active Record use UTC-base instead of local time config.active_record.default_timezone = :utc + end diff --combined config/locales/en.yml index 93f114df4,e4b0ee214..2e57df0e5 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -262,17 -262,6 +262,17 @@@ en download_xml: "Download XML" view_history: "view history" edit: "edit" + bug: + open_title: "Unresolved issue: {{bug_name}}" + closed_title: "Resolved issue: {{bug_name}}" + created_at: "Created at:" + edited_at: "Edited at:" + closed_at: "Closed at:" + opened_by: "Opened by:" + description: "Description:" + comment_by: "Comment by: " + comment: "Comment:" + date: "Date:" changeset: changeset_paging_nav: showing_page: "Showing page {{page}}" @@@ -308,6 -297,8 +308,8 @@@ description_user: "Changesets by {{user}}" description_bbox: "Changesets within {{bbox}}" description_user_bbox: "Changesets by {{user}} within {{bbox}}" + timeout: + sorry: "Sorry, the list of changesets you requested took too long to retrieve." diary_entry: new: title: New Diary Entry @@@ -425,6 -416,7 +427,7 @@@ suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} of {{parentname}})" suffix_suburb: "{{suffix}}, {{parentname}}" search_osm_nominatim: + prefix_format: "{{name}}" prefix: amenity: airport: "Airport" @@@ -956,7 -948,7 +959,7 @@@ english_link: the English original native: title: About this page - text: You are viewing the English version of the copyright page. You can go back to the {{native_link}} of this pag or you can stop reading about copyright and {{mapping_link}}. + text: You are viewing the English version of the copyright page. You can go back to the {{native_link}} of this page or you can stop reading about copyright and {{mapping_link}}. native_link: THIS_LANGUAGE_NAME_HERE version mapping_link: start mapping legal_babble: | @@@ -1050,6 -1042,9 +1053,9 @@@ Statistics Canada).
  • New Zealand: Contains data sourced from Land Information New Zealand. Crown Copyright reserved.
  • +
  • Poland: Contains data from UMP-pcPL maps. Copyright + UMP-pcPL contributors.
  • United Kingdom: Contains Ordnance Survey data © Crown copyright and database right 2010.
  • @@@ -1500,7 -1495,8 +1506,8 @@@ lost password link: "Lost your password?" login_button: "Login" account not active: "Sorry, your account is not active yet.
    Please click on the link in the account confirmation email to activate your account." - account suspended: Sorry, your account has been suspended due to suspicious activity.
    Please contact the webmaster if you wish to discuss this. + account suspended: Sorry, your account has been suspended due to suspicious activity.
    Please contact the {{webmaster}} if you wish to discuss this. + webmaster: webmaster auth failure: "Sorry, could not log in with those details." logout: title: "Logout" @@@ -1548,7 -1544,6 +1555,6 @@@ declined: "http://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined" decline: "Decline" legale_select: "Please select your country of residence:" - legale_button: "Go" legale_names: france: "France" italy: "Italy" @@@ -1684,6 -1679,7 +1690,7 @@@ suspended: title: Account Suspended heading: Account Suspended + webmaster: webmaster body: |

    Sorry, your account has been automatically suspended due to @@@ -1691,8 -1687,7 +1698,7 @@@

    This decision will be reviewed by an administrator shortly, or - you may contact the webmaster if - you wish to discuss this. + you may contact the {{webmaster}} if you wish to discuss this.

    user_role: filter: @@@ -1801,20 -1796,6 +1807,20 @@@ back: "View all blocks" revoker: "Revoker:" needs_view: "The user needs to log in before this block will be cleared." + bugs: + rss: + description_area: "A list of bugs, reported, commented on or closed in your area [({{min_lat}}|{{min_lon}}) -- ({{max_lat}}|{{max_lon}})]" + description_item: "An rss feed for bug {{id}}" + closed: "closed bug (near {{place}})" + new: "new bug (near {{place}})" + comment: "new comment (near {{place}})" + user: + title_user: "Bugs submitted or commented on by {{user}}" + heading_user: "{{user}}'s bugs" + description_user: "Bugs submitted or commented on by {{user}}" + id: "Id" + last_changed: "Last changed" + javascripts: map: base: