- waycreated=revdates[0]
- revdates.uniq!
- revdates.sort!
-
- # Remove any dates (from nodes) before first revision date of way
- revdates.delete_if { |d| d<waycreated }
- # Remove any elements where 2 seconds doesn't elapse before next one
- revdates.delete_if { |d| revdates.include?(d+1) or revdates.include?(d+2) }
-
-RAILS_DEFAULT_LOGGER.info("** revision dates: #{revdates.inspect}")
-RAILS_DEFAULT_LOGGER.info("** range: #{revdates[-1]-revdates[0]}")
-
- history = Way.find(wayid).old_ways.reverse.collect do |old_way|
- user_object = old_way.changeset.user
- user = user_object.data_public? ? user_object.display_name : 'anonymous'
- uid = user_object.data_public? ? user_object.id : 0
- [old_way.version, old_way.timestamp.strftime("%d %b %Y, %H:%M"), old_way.visible ? 1 : 0, user, uid]
- end
-
- return ['way',wayid,history]
- rescue ActiveRecord::RecordNotFound
- return ['way', wayid, []]