X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FIntel.pm;h=990b2225e9f07fef9b1afc0ff028b1150f5f955a;hb=88534ccb5763a823eec9147f63c732588e275e6a;hp=bafea58ea8be45ad64da1f5450990e5b3193ad52;hpb=d732ab55a069cbe8da434f4ad5464d0947a46421;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Intel.pm b/lib/NDWeb/Controller/Intel.pm index bafea58..990b222 100644 --- a/lib/NDWeb/Controller/Intel.pm +++ b/lib/NDWeb/Controller/Intel.pm @@ -103,6 +103,17 @@ ORDER BY tick DESC, mission $query->execute($id,$ticks); $c->stash(outgoing => $query->fetchall_arrayref({}) ); + $query = $dbh->prepare(q{ +SELECT tag, array_to_string(array_agg(username),', ') AS nicks, to_char(max(time),'YYYY-MM-DD HH24:MI') AS time +FROM planet_tags pt + JOIN users u USING (uid) +WHERE pt.pid = $1 +GROUP BY tag +ORDER BY time DESC + }); + $query->execute($id); + $c->stash(tags => $query->fetchall_arrayref({}) ); + } sub channels : Local {