git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
widget/reply: redirect to created comment
[minimedit.git]
/
widget
/
reply.php
diff --git
a/widget/reply.php
b/widget/reply.php
index 1f6d0e2ff0352f709ff0223fdd455c1d3962eded..0935567e82ecb51ba2aeb4ff0a6717b50e313abe 100644
(file)
--- a/
widget/reply.php
+++ b/
widget/reply.php
@@
-61,9
+61,8
@@
if ($_POST) {
}
}
}
}
- if ($Page->api) {
- abort("/{$Page->link}", '200 reply success');
- }
+ $target = "/{$Page->link}/$newcomment#$newcomment";
+ abort($target, ($Page->api ? 200 : 303) . ' reply success');
$_POST['reply'] = NULL;
}
catch (Exception $e) {
$_POST['reply'] = NULL;
}
catch (Exception $e) {
@@
-81,7
+80,7
@@
print '<ul class="replies">';
while ($row = $query->fetch()) {
$rowuser = new User("profile/{$row->author}");
while ($row = $query->fetch()) {
$rowuser = new User("profile/{$row->author}");
- print
'<li>'
;
+ print
f('<li id="%d">', $row->id)
;
printf('<strong>%s</strong> <small class=date>%s</small>',
$rowuser->html, showdate(preg_split('/\D/', $row->created))
);
printf('<strong>%s</strong> <small class=date>%s</small>',
$rowuser->html, showdate(preg_split('/\D/', $row->created))
);