diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2018-08-06 02:02:57 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2018-08-06 06:03:58 +0200 |
commit | 3578e77ad4e9258495eed7e786b7dc3aebcf1b63 (patch) | |
tree | 6261b4c66435d25ea10583c6a647d645e7182ed7 /web/html/account.php | |
parent | a7865ef5aa0309976b5dd2642210632babe106d9 (diff) | |
download | aur-3578e77ad4e9258495eed7e786b7dc3aebcf1b63.tar.gz aur-3578e77ad4e9258495eed7e786b7dc3aebcf1b63.tar.xz |
Allow listing all comments from a user
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/html/account.php')
-rw-r--r-- | web/html/account.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/web/html/account.php b/web/html/account.php index c30a89aa..9695c9b7 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -8,7 +8,7 @@ include_once('acctfuncs.inc.php'); # access Account specific functions $action = in_request("Action"); $need_userinfo = array( - "DisplayAccount", "DeleteAccount", "AccountInfo", "UpdateAccount" + "DisplayAccount", "DeleteAccount", "AccountInfo", "UpdateAccount", "ListComments" ); if (in_array($action, $need_userinfo)) { @@ -166,6 +166,24 @@ if (isset($_COOKIE["AURSID"])) { $row["Username"]); } + } elseif ($action == "ListComments") { + if (has_credential(CRED_ACCOUNT_LIST_COMMENTS)) { + # display the comment list if they're a TU/dev + + $total_comment_count = account_comments_count($row["ID"]); + list($pagination_templs, $per_page, $offset) = calculate_pagination($total_comment_count); + + $username = $row["Username"]; + $uid = $row["ID"]; + $comments = account_comments($uid, $per_page, $offset); + + $comment_section = "account"; + include('pkg_comments.php'); + + } else { + print __("You are not allowed to access this area."); + } + } else { if (has_credential(CRED_ACCOUNT_SEARCH)) { # display the search page if they're a TU/dev |