From 4e8cf4634404ed80dfa8dcb9fb56a577897b9da1 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Fri, 5 Nov 2021 19:19:53 +0100 Subject: [PATCH] issue: edit links for beheer admins --- widget/reply.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/widget/reply.php b/widget/reply.php index 7e7d327..da993c9 100644 --- a/widget/reply.php +++ b/widget/reply.php @@ -34,13 +34,16 @@ $imagecount = 0; while ($row = $query->fetch()) { $rowuser = new User("profile/{$row->author}"); printf('
  • ', $row->id); + printf('%s', $rowuser->html); $rowdate = showdate(preg_split('/\D/', $row->created)); if ($User->admin('beheer') and $row->updated) { $rowdate = "$rowdate " . showdate(preg_split('/\D/', $row->updated)); } - printf('%s %s', - $rowuser->html, $rowdate - ); + printf(' %s', $rowdate); + if ($User->admin('beheer') and $User->admin('user') || $User->login === $row->author) { + printf(' %s', + "/{$Page->link}/{$row->id}", 'reactie aanpassen', "\u{270D}"); + } if ($html = $row->message) { $html = preg_replace('/(?<= 2 ? 'loading="lazy" ' : '', $html, -1, $found); -- 2.30.0