X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/0bb323911049e884e5c2129201ae0ebf5e88c10e..218c239a4dc23c0dbe3878109c2f844d978ec626:/widget/issue/activity.php diff --git a/widget/issue/activity.php b/widget/issue/activity.php index f09cdc7..1d1a37a 100644 --- a/widget/issue/activity.php +++ b/widget/issue/activity.php @@ -6,34 +6,54 @@ $limit = $Page->place['n'] ?? 50; $cols = 'm.*, i.subject, i.updated, i.closed'; $sql = "SELECT $cols FROM messages m JOIN issues i ON i.id = issue"; $sql .= " WHERE message IS NOT NULL"; +$sql .= " AND i.page <> 'spam'"; +$sql .= " AND m.announced"; $sql .= " ORDER BY m.created DESC LIMIT $limit"; -$sql = "SELECT * FROM ($sql) x ORDER BY updated DESC, created, id"; # grouped issues $query = $Db->query($sql); +$rows = $query->fetchall(); + +$msgformat = [ + '{(.*)(
]+>
]*><\/p>)+\z/', $row->message)) {
+ # postpone related image to the following message
+ $next->message = $row->message . $next->message;
+ continue;
+ }
+
+ if (!$prev or $prev->issue !== $row->issue or $prev->author !== $row->author
+ or !preg_match('/\A
message)) {
print '
%s\n\t", $row->message); - print ''; - if ($row->author and $rowuser = new User("profile/{$row->author}")) { - printf('%s ', $rowuser->html); - } - printf('%s', - showdate(preg_split('/\D/', $row->created)) - ); - print ""; - print "