- #@edit_pages, @edits = paginate(:changesets,
- # :include => [:user, :changeset_tags],
- # :conditions => conditions,
- # :order => "changesets.created_at DESC",
- # :per_page => 20)
- #
+ if user
+ if user.data_public? or user == @user
+ conditions = cond_merge conditions, ['user_id = ?', user.id]
+ else
+ conditions = cond_merge conditions, ['false']
+ end
+ elsif request.format == :html
+ @title = t 'user.no_such_user.title'
+ @not_found_user = params[:display_name]
+ render :template => 'user/no_such_user', :status => :not_found
+ end
+ end
+
+ if params[:bbox]
+ bbox = params[:bbox]
+ elsif params[:minlon] and params[:minlat] and params[:maxlon] and params[:maxlat]
+ bbox = params[:minlon] + ',' + params[:minlat] + ',' + params[:maxlon] + ',' + params[:maxlat]
+ end
+
+ if bbox
+ conditions = cond_merge conditions, conditions_bbox(bbox)
+ bbox = BoundingBox.from_s(bbox)
+ bbox_link = render_to_string :partial => "bbox", :object => bbox
+ end