Update time when inserting, store time in insert.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 17 Oct 2010 16:26:48 +0000 (18:26 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 17 Oct 2010 16:26:48 +0000 (18:26 +0200)
src/main/java/net/pterodactylus/sone/core/SoneInserter.java
src/main/resources/templates/insert/sone.xml

index ac2cb3f..259667b 100644 (file)
@@ -99,6 +99,7 @@ public class SoneInserter extends AbstractService {
                        synchronized (sone) {
                                modificationCounter = sone.getModificationCounter();
                                if (modificationCounter > 0) {
+                                       sone.setTime(System.currentTimeMillis());
                                        insertInformation = new InsertInformation(sone.getRequestUri(), sone.getInsertUri());
                                }
                        }
index 704c415..2469e49 100644 (file)
@@ -3,6 +3,7 @@
 
        <id><% currentSone.id></id>
        <name><% currentSone.name|xml></name>
+       <time><% currentSone.time></time>
 
        <profile>
                <first-name><% currentSone.profile.firstName|xml></first-name>