Merge branch 'master' into openstreetbugs
authorTom Hughes <tom@compton.nu>
Mon, 7 Jun 2010 21:26:33 +0000 (22:26 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 7 Jun 2010 21:26:33 +0000 (22:26 +0100)
Conflicts:
app/controllers/browse_controller.rb

1  2 
app/controllers/browse_controller.rb
config/environment.rb
config/locales/en.yml

index d9b18769c37b934d8f77038c5884ee23418c9fe3,9aec1060a19b3c836e455c0abcc0dd36c79ec8cc..2962c6836a9a1a4f7e202c728a226e9a3f150ae0
@@@ -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
    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
 +
 +  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
  end
diff --combined config/environment.rb
index 23d46c5d46336998158c1c3e5d8429c5c0b0cc1f,0a67be745582228590a6461f86282118558e8d5d..53dfabb6a94ebcc44107853bdd5727d925ddf0f5
@@@ -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 93f114df429d44471213139ce406dad9fb1fbeac,e4b0ee21489ad5ea23b910a1e7ccf2ead7cdb22c..2e57df0e5d25800aac45d7bf1599d5490b9a79f5
@@@ -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}}"
        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
        suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} of {{parentname}})"
        suffix_suburb: "{{suffix}}, {{parentname}}"
      search_osm_nominatim:
+       prefix_format: "{{name}}"
        prefix:
          amenity:
            airport: "Airport"
        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: |
            Statistics Canada).</li>
            <li><strong>New Zealand</strong>: Contains data sourced from
            Land Information New Zealand. Crown Copyright reserved.</li>
+           <li><strong>Poland</strong>: Contains data from <a
+           href="http://ump.waw.pl/">UMP-pcPL maps</a>. Copyright
+           UMP-pcPL contributors.</li>
            <li><strong>United Kingdom</strong>: Contains Ordnance
            Survey data &copy; Crown copyright and database right
            2010.</li>
        lost password link: "Lost your password?"
        login_button: "Login"
        account not active: "Sorry, your account is not active yet.<br />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.<br />Please contact the <a href="mailto:webmaster@openstreetmap.org">webmaster</a> if you wish to discuss this.
+       account suspended: Sorry, your account has been suspended due to suspicious activity.<br />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"
        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"
      suspended:
        title: Account Suspended
        heading: Account Suspended
+       webmaster: webmaster
        body: |
          <p>
            Sorry, your account has been automatically suspended due to
          </p>
          <p>
            This decision will be reviewed by an administrator shortly, or
-           you may contact the <a href="mailto:{{webmaster}}">webmaster</a> if
-           you wish to discuss this.
+           you may contact the {{webmaster}} if you wish to discuss this.
          </p>
    user_role:
      filter:
        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: