git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
28665e9
)
issue: edit links for beheer admins
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 5 Nov 2021 18:19:53 +0000
(19:19 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 5 Nov 2021 18:23:21 +0000
(19:23 +0100)
widget/reply.php
patch
|
blob
|
history
diff --git
a/widget/reply.php
b/widget/reply.php
index 7e7d327f3c2728d13a2cbc449a7d0a964f3c2060..da993c92f5c3541d131911e3d89f2e23db02b5e9 100644
(file)
--- 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('<li id="%d">', $row->id);
while ($row = $query->fetch()) {
$rowuser = new User("profile/{$row->author}");
printf('<li id="%d">', $row->id);
+ printf('<strong>%s</strong>', $rowuser->html);
$rowdate = showdate(preg_split('/\D/', $row->created));
if ($User->admin('beheer') and $row->updated) {
$rowdate = "<s>$rowdate</s> " . showdate(preg_split('/\D/', $row->updated));
}
$rowdate = showdate(preg_split('/\D/', $row->created));
if ($User->admin('beheer') and $row->updated) {
$rowdate = "<s>$rowdate</s> " . showdate(preg_split('/\D/', $row->updated));
}
- printf('<strong>%s</strong> <small class=date>%s</small>',
- $rowuser->html, $rowdate
- );
+ printf(' <small class=date>%s</small>', $rowdate);
+ if ($User->admin('beheer') and $User->admin('user') || $User->login === $row->author) {
+ printf(' <a href="%s" title="%s" class=icon>%s</a>',
+ "/{$Page->link}/{$row->id}", 'reactie aanpassen', "\u{270D}");
+ }
if ($html = $row->message) {
$html = preg_replace('/(?<=<img )/',
$imagecount > 2 ? 'loading="lazy" ' : '', $html, -1, $found);
if ($html = $row->message) {
$html = preg_replace('/(?<=<img )/',
$imagecount > 2 ? 'loading="lazy" ' : '', $html, -1, $found);