Commit graph

735 commits

Author SHA1 Message Date
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
e9fe1a9eb1 Add link to flag OOD comment
Implements: FS#46546

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-15 17:46:18 +01:00
Lukas Fleischer
9c98523494 Replace new package icon
Use a flat icon from the Open Iconic collection to mark new packages.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
a35dc4022a Replace RSS feed icon
Use a flat icon from the Open Iconic collection for the RSS feed.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
256a343b18 Remove old logos
Remove some very old and outdated logos. Update the RSS feed to use the
new logo.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
ff798420b5 Add the Open Iconic license
The new SVG icons used in aurweb are taken from the Open Iconic project.
Add their license to our source tree.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +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
a9048bb07f Dedupe translatable strings
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-26 17:26:13 +01:00
Eli Schwartz
ecb746971c Change "File Request" to "Submit Request"
Apparently the reference to "files" can be confusing.

Fixes FS#47167.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-25 08:06:50 +01:00
Lukas Fleischer
d52b2f50b9 Support long email addresses
According to RFC 3696 (and the associated errata), an email address can
be up to 256 characters long. Change the database field and the length
limit on all input fields accordingly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-25 10:57:46 +01:00
Lukas Fleischer
66d12f0c37 Highlight broken dependencies
If a dependency neither exists in the official repositories nor in the
AUR, make it appear bold red.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-24 18:59:04 +02:00
Lukas Fleischer
ca954fe95a Do not redirect when showing errors during flagging
Fixes FS#46545.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-22 07:17:38 +02: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
9d8345d4e0 rpc.php: Display generated documentation
Instead of hardcoding the RPC interface documentation in rpc.php,
include the HTML code of the documentation page generated by AsciiDoc.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +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
90e96e3728 Redirect to details pages after performing actions
After performing a package base action on a separate page, return to the
corresponding package base details page.

Partly fixes FS#46545.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:28:04 +02:00
Lukas Fleischer
d0f8b285e4 Fix a PHP "Undefined index" notice
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:15:53 +02:00
Marcel Korpel
df160b61e8 Make it more clear that the bug tracker is for aurweb only
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-24 07:05:28 +02:00
Marcel Korpel
d5d08b8f92 Add option to hide one's email address
Implements FS#42343.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-20 22:01:23 +02:00
Lukas Fleischer
9cae17ff7c Extract package name from details
When requesting package details, instead of performing another SQL query
to obtain the package name, extract the name from the result of the
package details query.

Also, drop pkg_name_from_id() which is no longer needed after this
optimization.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-18 08:03:56 +02:00
Lukas Fleischer
ee9a8f232b Allow for logging in via email address
Accept both user names and email addresses in the login prompt.

Suggested-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:18:31 +02:00
Lukas Fleischer
c5014b0752 Remove superfluous function valid_user()
This helper function was almost 100% identical to uid_from_username().
Switch to using uid_from_username(), which has a much better name and
implementation, everywhere.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:28 +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
Lukas Fleischer
6b7e26a2d1 Move package base flagging to a separate form
Show a separate confirmation page when flagging a package out-of-date.

Implements FS#44967.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:11:52 +02:00
Stefan Auditor
e9e9b41484 Update link to package submission documentation
Fixes FS#45942.

Signed-off-by: Stefan Auditor <stefan.auditor@erdfisch.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-17 04:20:45 +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
54d812ec79 pkg_comments.php: Add JavaScript function to edit comments
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
c7025054c6 Split pkg_comment_form.php so the outer box is not always included
For use in the new RPC interface to edit comments, the form shouldn't
always print a header. Create a new template pkg_comment_box.php that
prints form and box, change template pkg_comment_form.php to only
print the form.

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
Lukas Fleischer
c751921aff Do not use the term "unsupported" for AUR packages
We no longer use the term [unsupported] to refer to the "repository" of
AUR packages. Update texts and variable names accordingly.

Fixes FS#45381.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:24 +02:00
Marcel Korpel
8db2ff5da6 Set correct 'My Account' link after changing username
Don't print messages (and the account form) in process_account_form()
anymore, but return them to the caller. When updating accounts, this
function will be called before the headers are written.

If a username has been changed by process_account_form(), the headers
now show the updated username from the database in the 'My Account'
link. Clicking on it immediately after changing a username will no
longer lead to a non-existing URL.

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
cb9c0d2477 Surround message with <p> tags
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
7927a6decd Use username from the database if one is provided by the user
This fixes a bug where the new user name input by the user was
invalid, causing the account deletion link and the form action to be
wrong.

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
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
9cde6b0566 Show dateline when a comment is edited or deleted
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
Marcel Korpel
8375d21210 Use SVG image for comment deletion icon
This also puts the icon to the right and the timestamp in the byline
and wipes out a repeated instance of the byline.

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
Johannes Löthberg
828506e868 Reindent web/html/packages with tabs
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Lukas Fleischer
9746a65473 Port notification routines to Python
Use a Python script for sending notification emails. The notification
action and additional parameters are passed via command line arguments.
For comment and package request notifications, the text is passed via
stdin.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-08 12:59:23 +02:00
Lukas Fleischer
b036b436aa Add support for multiple SSH public keys
Attaching more than one SSH public key to the same account is useful,
e.g. if one uses different machines to access the AUR SSH interface.
Multiple keys can now be specified by adding multiple lines to the text
area on the account edit form.

Implements FS#45469.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Acked-by: Leonidas Spyropoulos <artafinde@gmail.com>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
3dbaee80b4 Move registration code to a separate unit
Until now, we used the same unit to register and edit accounts. Split
these features into separate source files for clarity. This also allows
us to redirect to the home page when a logged-in user tries to access
the registration page.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Gordian Edenhofer
6395a5d5b8 Redirect at previous page after a successful login
After the user was authenticated a redirect to the site which
linked the user to the login page is done. This fixes FS#32481.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
d841357d7f Make merge into label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
d1fe28ff7e Make confirmation label of width 'auto'
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Johannes Löthberg
226376fc62 Wrap all confirmation checkbox labels in label tag
Without a label tag around the label it won't be clickable.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Marcel Korpel
d852da79e4 pkgbase_details.php/pkg_details.php: Show keywords
Keywords are hyperlinked so a user can search for other packages with
the same name and/or keyword.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-19 14:40:08 +02:00
Leonidas Spyropoulos
74c7cf70ff Add explanation for Popularity field in search results
Fixes FS#45327.

Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-15 22:37:45 +02:00
Johannes Löthberg
fd1794a737 home: Add submitting packages section
Link to the ArchWiki and lists any SSH fingerprints configured in the
AUR configuration file.

Fixes FS#45322.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:56 +02:00
Lukas Fleischer
19ee268935 Make "Learn more..." translatable
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:55 +02:00