-
- # - delete any otherwise unused nodes
-
- createuniquenodes(way,db_uqn,[])
-
- # unless (preserve.empty?) then
- # ActiveRecord::Base.connection.execute("DELETE FROM #{db_uqn} WHERE node_id IN ("+preserve.join(',')+")")
- # end
-
- sql=<<-EOF
- INSERT INTO nodes (id,latitude,longitude,timestamp,user_id,visible,tile)
- SELECT DISTINCT cn.id,cn.latitude,cn.longitude,#{db_now},#{uid},0,cn.tile
- FROM current_nodes AS cn,#{db_uqn}
- WHERE cn.id=node_id
- EOF
- ActiveRecord::Base.connection.insert(sql)
-
- sql=<<-EOF
- UPDATE current_nodes AS cn, #{db_uqn}
- SET cn.timestamp=#{db_now},cn.visible=0,cn.user_id=#{uid}
- WHERE cn.id=node_id
- EOF
- ActiveRecord::Base.connection.update(sql)
-
- deleteuniquenoderelations(db_uqn,uid,db_now)
+ createuniquenodes(way,db_uqn,[])
+ deleteuniquenoderelations(db_uqn,uid,db_now)
+ deleteitemrelations(way_id,'way',uid,db_now)