mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add comment edit icon and form
Show an icon next to the comment deletion icon, which leads to a comment edit form. Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
8375d21210
commit
92e19e95f3
11 changed files with 139 additions and 9 deletions
21
web/html/commentedit.php
Normal file
21
web/html/commentedit.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
|
||||
|
||||
include_once("aur.inc.php");
|
||||
include_once("pkgbasefuncs.inc.php");
|
||||
|
||||
set_lang();
|
||||
check_sid();
|
||||
|
||||
$comment_id = intval($_REQUEST['comment_id']);
|
||||
list($user_id, $comment) = comment_by_id($comment_id);
|
||||
|
||||
if (!isset($base_id) || !has_credential(CRED_COMMENT_EDIT, array($user_id)) || is_null($comment)) {
|
||||
header('Location: /');
|
||||
exit();
|
||||
}
|
||||
|
||||
html_header(__("Edit comment"));
|
||||
include('pkg_comment_form.php');
|
||||
html_footer(AURWEB_VERSION);
|
Loading…
Add table
Add a link
Reference in a new issue