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:
Marcel Korpel 2015-07-10 18:47:31 +02:00 committed by Lukas Fleischer
parent 8375d21210
commit 92e19e95f3
11 changed files with 139 additions and 9 deletions

21
web/html/commentedit.php Normal file
View 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);