Commit graph

43 commits

Author SHA1 Message Date
Joakim Saario
9c6c13b78a
style: Run pre-commit 2022-08-22 22:40:45 +02:00
Vladimir Panteleev
e3ca3c96e5 Add "Enable notifications" checkbox in "Add Comment" form
Currently, it is a little to easy to forget to enable notifications
for a package after leaving a comment, thus never being notified of a
reply. Even though the "Enable notifications" link is on the same
page, it is not part of the flow for posting a new comment, and so,
easy to miss.

Most web forums and comment systems include a checkbox to enable
notifications when posting for the first time in a thread. This patch
implements this in aurweb, as well.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-04-28 08:58:29 -04:00
Johannes Löthberg
3578e77ad4 Allow listing all comments from a user
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-08-06 06:03:58 +02:00
Mark Weiman
f15c700ad2 Add capability for co-maintainers to disown packages
Implements FS#53832.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2018-02-24 14:57:31 +01:00
Lukas Fleischer
6892ec7791 Call check_sid() from a central location
Instead of calling check_sid() from every single PHP script representing
a web page, add the call to aur.inc.php which is sourced by all of them.

Also, remove set_lang() calls from the scripts since these are also
already included in aur.inc.php.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-27 09:22:53 +02:00
Lukas Fleischer
1af5ba64e7 pkgbase.php: Fix PHP notice
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-28 19:29:36 +01:00
Lukas Fleischer
cc84e0b7fd pkgbase.php: Squelch PHP warning
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-28 07:14:21 +01:00
Lukas Fleischer
e724b123ec pkgbase.php: Add default title
Instead of triggering a PHP warning and using an empty title if no
package base is specified, use a default title.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 22:01:34 +01:00
Marcel Korpel
bd85441cf6 Add comment undeletion functionality
Only Developers and Trusted Users can undelete comments.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-23 11:50:03 +01:00
Mark Weiman
7d4c0c9ffa Implement capability to pin comments above others
Adds capability to pin comments before others.

Implements FS#10863.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-12 15:09:47 +01:00
Lukas Fleischer
9c70e10aeb Check comment length in the backend
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-21 22:32:29 +02:00
Lukas Fleischer
4fe513d838 Do not redirect to details page after deletion
When deleting a package base from the package base deletion form, do not
try to redirect to the package base details page afterwards. Instead,
jump to the package overview.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:57:44 +02:00
Lukas Fleischer
396e50bdc8 Require comments when flagging packages out-of-date
Implements FS#42827.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:26 +02:00
Marcel Korpel
095986b449 Do not allow empty comments
Fixes FS#45870.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-17 04:20:45 +02:00
Marcel Korpel
f2ff9782a5 Jump to latest comments after adding a comment
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
19aff5f958 Jump to comment after editing
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
e331ce273c Support comment editing in the backend
Create two new actions, do_AddComment and do_EditComment. When editing
or deleting a comment, a timestamp is added.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
92e19e95f3 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>
2015-08-08 12:59:23 +02:00
Lukas Fleischer
5fb7a74e23 Replace categories with keywords
Remove package base categories. Instead, users can now specify up to
twenty custom keywords that are taken into consideration when searching.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:55 +02:00
Lukas Fleischer
ef142b2312 pkgbase.php: Escape error messages
Fixes FS#45284.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-10 08:54:51 +02:00
Lukas Fleischer
5c64ae1a0e Drop suffixes from confirm parameters
Remove the _delete and _disown suffixes from HTTP POST confirmation
parameters.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 09:05:05 +02:00
Lukas Fleischer
0b8c11a37a Move package disowning to a separate page
The disown link in the package actions box leads to a new page
(pkgdisown.php) that can be used to confirm package disowning.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:13:43 +02:00
Lukas Fleischer
cc1e8aed30 Rename the AUR software to aurweb
Rename the project to help differentiate between the software providing
access to the Arch User Repository and the collection of source packages
itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-02-04 09:50:01 +01:00
Lukas Fleischer
fc23a9bd50 Add support for package base co-maintainers
This allows for having multiple co-maintainers for AUR packages.
Co-maintainers have push access to the package base Git repository but
are not allowed to change the package base category, disown the package
or modify the list of co-maintainers. The primary maintainer of an AUR
package can edit the list of co-maintainers from the Package Actions
box.

Implements FS#17911.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-01-07 12:21:21 +01:00
Lukas Fleischer
b56dceaa8a Redirect to requests page after accepting deletions
Fixes FS#43100.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:58:40 +01:00
Lukas Fleischer
48ae736068 Prevent merging a package base with itself
Instead of deleting the package, show an error message if a user tries
to merge a package base with itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:28 +02:00
Lukas Fleischer
03c6304e19 Rework permission handling
Add a new function has_credential() that checks whether the currently
logged in user is allowed to perform a given action. Moving all
permission handling to this central place makes adding new user groups
and adjusting permissions much more convenient.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:56:57 +02:00
Lukas Fleischer
b113764b0b Sanitize merge base name in pkgreq_file()
Move the check introduced in 06b7099 (Validate package base name when
filing requests, 2014-07-02) from pkgbase.php to pkgreq_file().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:25:37 +02:00
Lukas Fleischer
4645bcbacb Allow for adding a comment when closing a request
This allows Trusted Users to optionally add a comment when closing a
request. The comment is included in the notification email that is sent
to the requests mailing list.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:50 +02:00
Lukas Fleischer
8a465182ba Allow for selecting a reason when closing a request
When closing a package request, Trusted Users can now pick a reason
("Accepted" or "Rejected"). This allows for marking a request as
accepted, even if the corresponding package base has already been
deleted.

Also, the notification email now always explicitly states whether a
request has been accepted or closed in the message body.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 11:10:37 +02:00
Lukas Fleischer
64c4e51698 pkgbase.php: Highlight error messages
Make sure that error messages above the package list are actually
visible to the user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:23:25 +02:00
Lukas Fleischer
06b7099357 Validate package base name when filing requests
Make sure that the package base to merge into does not contain any
invalid characters.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-02 08:22:51 +02:00
Lukas Fleischer
0d513e1468 Be explicit about accepted requests in emails
When sending notification emails after closing a request, be explicit
about whether the request has been accepted or not.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-01 20:06:41 +02:00
Lukas Fleischer
74a82bb2fb Rename package request functions to pkgreq_*()
Since these functions now reside in a separate module, use the module
name as function name prefix.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-30 08:49:46 +02:00
Lukas Fleischer
91e6b5cb2f Add support for merge requests
This adds a new "Merge" category to the list of available request types
and also adds a new "Merge into" field that is hidden via JavaScript
when "Deletion" or "Orphan" is selected.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:38:02 +02:00
Lukas Fleischer
959c61a77d Add an accept button to the package request list
This button allows for accepting a request, disowning the affected
package or redirecting to the package deletion page. The request is
closed automatically when the action has been performed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:36:15 +02:00
Lukas Fleischer
fc1db28c9b Allow for closing package requests
This allows Trusted Users to close package requests via the request
list. Also, entries are now sorted such that open requests are shown
before closed requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:34:31 +02:00
Lukas Fleischer
48cc8207bf Add support for filing package requests
Add a new entry to the package actions box that allows for filing
deletion and orphan requests. When choosing that action, the user is
redirected to a new page that allows for selecting a request type and
entering a comment. When submitting the request, a new entry in the
request database is created and an email is sent to a configurable
mailing list (defaults to aur-general).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-25 11:31:11 +02:00
Lukas Fleischer
206678dfb7 pkgbase.php: Append query string when redirecting
Add the query string when redirecting to the package details page. This
fixes the target of the "All comments" link of non-split packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 17:45:21 +02:00
Lukas Fleischer
6ed9da2c3e Do not show package base page of non-split packages
When trying to access the package base page of non-split packages,
redirect to the package details page since the package base page doesn't
contain any additional information in that case.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 16:32:20 +02:00
Lukas Fleischer
676595f9bf Prefix package functions with pkg_/pkgbase_
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 15:55:31 +02:00
Lukas Fleischer
f461344211 Move package actions to package bases
Package actions now operate on package bases instead of packages. Move
all actions to the correct locations.

This also fixes some issues with comment notifications.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 13:54:06 +02:00
Lukas Fleischer
f7d13b5b36 Add package base detail pages
This adds package base details pages, similar to the package details
pages. Each package base details page contains general information
(package base name, category, submitter, maintainer, ...) and links to
all the corresponding packages. As on the package details pages,
comments and links to several package actions are also provided.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-04-05 12:21:36 +02:00