+ if ($html = $row->message) {
+ $html = preg_replace('/(?<=<img )/',
+ $imagecount > 2 ? 'loading="lazy" ' : '', $html, -1, $found);
+ $imagecount += $found;
+ printf("<blockquote>\n%s</blockquote>\n", $html);
+ }
+ if ($changes = json_decode($row->journal)) {
+ print '<ul>';
+ foreach ($changes as $change) {
+ print '<li>';
+ if ($change->col == 'closed') {
+ printf('<em>%s</em>', isset($change->value) ? 'Gesloten' : 'Heropend');
+ }
+ else {
+ printf("<em>%s</em> %s",
+ $journalcol[$change->col], sprintf(
+ !isset($change->old_value) ? 'gewijzigd naar <q>%2$s</q>' :
+ (!isset($change->value) ? 'verwijderd (<s>%s</s>)' :
+ 'gewijzigd van <q>%s</q> naar <q>%s</q>'),
+ $change->old_value, $change->value
+ )
+ );
+ }
+ print "</li>\n";
+ }
+ print "</ul>\n";
+ }