- history = Node.find(nodeid).old_nodes.reverse.collect do |old_node|
- user = old_node.user.data_public? ? old_node.user.display_name : 'anonymous'
- uid = old_node.user.data_public? ? old_node.user.id : 0
- [old_node.timestamp.to_i, old_node.timestamp.strftime("%d %b %Y, %H:%M"), old_node.visible ? 1 : 0, user, uid]
- end
+ begin
+ history = Node.find(nodeid).old_nodes.reverse.collect do |old_node|
+ user_object = old_node.changeset.user
+ user = user_object.data_public? ? user_object.display_name : 'anonymous'
+ uid = user_object.data_public? ? user_object.id : 0
+ [old_node.version, old_node.timestamp.strftime("%d %b %Y, %H:%M"), old_node.visible ? 1 : 0, user, uid]
+ end