Omit title for unchanged ticket and author,
causing stacked images from different messages.
Don't bother with closing <dd> for simplicity.
print '<dl class="replies">';
print '<dl class="replies">';
while ($row = $query->fetch()) {
while ($row = $query->fetch()) {
- print '<dt>';
- if ($group !== $row->issue) {
- $group = $row->issue;
- printf('<a href="/%s">%s</a>', $row->page, $row->subject);
- if ($row->closed) {
- print ' <em>(opgelost)</em>';
+ if (!$prev or $prev->issue !== $row->issue or $prev->author !== $row->author) {
+ print '<dt>';
+ if (!$prev or $prev->issue !== $row->issue) {
+ printf('<a href="/%s">%s</a>', $row->page, $row->subject);
+ if ($row->closed) {
+ print ' <em>(opgelost)</em>';
+ }
+ print '<span class="right">';
+ if ($row->author and $rowuser = new User("profile/{$row->author}")) {
+ printf('<strong>%s</strong> ', $rowuser->html);
+ }
+ printf('<small class="date">%s</small>',
+ showdate(preg_split('/\D/', $row->created))
+ );
+ print "</span>";
+ print '</dt>';
+ print '<dd>';
- print '<span class="right">';
- if ($row->author and $rowuser = new User("profile/{$row->author}")) {
- printf('<strong>%s</strong> ', $rowuser->html);
- }
- printf('<small class="date">%s</small>',
- showdate(preg_split('/\D/', $row->created))
- );
- print "</span>";
- print '</dt>';
- print '<dd>';
print preg_replace(array_keys($msgformat), array_values($msgformat), $row->message);
print preg_replace(array_keys($msgformat), array_values($msgformat), $row->message);