diff options
author | Marcel Korpel <marcel.korpel@gmail.com> | 2015-07-10 18:47:31 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-08-08 12:59:23 +0200 |
commit | 92e19e95f3c07745e7ba7c6e358921b7789f8abe (patch) | |
tree | 33b79d9247d96e25fdbb5cfd960808a7cf67dc5f /web/html/commentedit.php | |
parent | 8375d212106918b602911f6286d2e4fd172d446e (diff) | |
download | aurweb-92e19e95f3c07745e7ba7c6e358921b7789f8abe.tar.xz |
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>
Diffstat (limited to 'web/html/commentedit.php')
-rw-r--r-- | web/html/commentedit.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/web/html/commentedit.php b/web/html/commentedit.php new file mode 100644 index 0000000..83d86dd --- /dev/null +++ b/web/html/commentedit.php @@ -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); |