From: Tom Hughes Date: Thu, 11 Oct 2018 08:33:24 +0000 (+0100) Subject: Suppress changeset pagination for inactive users X-Git-Tag: live~3428 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/45c464a69a0fe8c6e68ec7257efa545f74d0297c?hp=883e5e17b98fee1d895605e78f16b2319117dd6b Suppress changeset pagination for inactive users Fixes #2024 --- diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index 89b9c6ca3..6eb967568 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -66,7 +66,7 @@ class BrowseController < ApplicationController @node_pages, @nodes = paginate(:old_nodes, :conditions => { :changeset_id => @changeset.id }, :per_page => 20, :parameter => "node_page") @way_pages, @ways = paginate(:old_ways, :conditions => { :changeset_id => @changeset.id }, :per_page => 20, :parameter => "way_page") @relation_pages, @relations = paginate(:old_relations, :conditions => { :changeset_id => @changeset.id }, :per_page => 20, :parameter => "relation_page") - if @changeset.user.data_public? + if @changeset.user.active? && @changeset.user.data_public? @next_by_user = @changeset.user.changesets.where("id > ?", @changeset.id).reorder(:id => :asc).first @prev_by_user = @changeset.user.changesets.where("id < ?", @changeset.id).reorder(:id => :desc).first end