changeset 149:fc2654064339

quotedb: Show quote addition date.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 27 May 2014 07:12:01 +0300
parents 2f0c823386b0
children 52350ed97775
files quotedb.tcl
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/quotedb.tcl	Tue May 27 07:11:29 2014 +0300
+++ b/quotedb.tcl	Tue May 27 07:12:01 2014 +0300
@@ -368,7 +368,7 @@
 proc qdb_get {ucmd utable unick uchan uindex upublic} {
   global quotedb
 
-  set usql "SELECT total(${utable}_votes.vote) AS uvote, ${utable}.id AS quoteID, ${utable}.utext AS utext, ${utable}.user AS uuser FROM ${utable} LEFT JOIN ${utable}_votes ON ${utable}_votes.urlid = ${utable}.id"
+  set usql "SELECT total(${utable}_votes.vote) AS uvote, ${utable}.id AS quoteID, ${utable}.utext AS utext, ${utable}.utime AS utime, ${utable}.user AS uuser FROM ${utable} LEFT JOIN ${utable}_votes ON ${utable}_votes.urlid = ${utable}.id"
   if {$uindex >= 0} {
     append usql " WHERE ${utable}.id=$uindex GROUP BY ${utable}.id"
     qdb_log "$unick searched $utable #$uindex"
@@ -378,7 +378,7 @@
   }
 
   quotedb eval $usql {
-    set qtmp [qdb_split "#${quoteID}: $utext ($uuser, $uvote)" 450]
+    set qtmp [qdb_split "#${quoteID}: $utext ($uuser@[qdb_ctime $utime], $uvote)" 450]
     foreach qstr $qtmp {
       qdb_msg $upublic $unick $uchan $qstr
     }