Commit graph

953 commits

Author SHA1 Message Date
Lukas Fleischer
4bc990f9c0 Split out code to generate action links
Add (and use) two new helper functions html_account_link() and
html_account_form() to generate the links in the package actions box.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
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
Lukas Fleischer
5a050552e8 Add the popularity field to the RPC interface
Implements FS#45422.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
d1c331613d Display (reverse) optional dependencies as "Required by"
Also, change pkg_required() such that the returned array has the same
structure as the result of pkg_dependencies().

Fixes FS#45452.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
6852a0c2af Add Arabic translation
Implements FS#45430.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-27 13:04:03 +02:00
Lukas Fleischer
0fa4836e66 Fix a warning when formatting user names
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:38:40 +02:00
Johannes Löthberg
918f00f9a2 Let co-maintainers edit package keywords
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:27:00 +02:00
Johannes Löthberg
a5fd2bb39d Let co-maintainers unflag the package
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:27:00 +02:00
Johannes Löthberg
5eb7354e7d Add functions for getting arrays of maintainer and co-maintainer UIDs
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-20 14:26:59 +02:00
Lukas Fleischer
2d7b68ac4c Remove can_submit_blacklisted()
This function is unneeded since commit 74edb6f (Use Git repositories to
store packages, 2014-06-06).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-19 16:52:07 +02:00
Lukas Fleischer
6e3cbb9e65 Release 4.0.0-rc5
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-18 10:20:39 +02:00
Johannes Löthberg
815e437f0c confparser: Add function for getting the items of a section
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
Johannes Löthberg
d8e32ce5e1 confparser: Add function for checking if config section exists
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
Johannes Löthberg
9ef7de0569 confparser: Split loading of config into own function
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
fb42ec696c Show co-maintainers next to maintainers in details
Implements FS#45313.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:56 +02:00
Lukas Fleischer
a2f79eb2e1 Refactor code for printing account links
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-14 17:58:56 +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
4c1bb8b7e5 Release 4.0.0-rc4
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-12 17:15:46 +02:00
Lukas Fleischer
3e75d9bb34 stats.inc.php: Show the 15 most recent updates
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-12 00:02:08 +02:00
Lukas Fleischer
15ee85b456 Show package popularity in search results
Display the popularity score (weighted votes) in the package search
results.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 19:15:44 +02:00
Lukas Fleischer
bd9af5f893 Reintroduce the URLPath field
In commit 74edb6f (Use Git repositories to store packages, 2014-06-06),
the URLPath field was dropped from RPC package results. Reintroduce the
field for backwards compatibility, even though it is no longer
recommended to use snapshot tarballs.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-11 13:44:53 +02:00
Lukas Fleischer
b870c0b682 Release 4.0.0-rc3
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 15:44:00 +02:00
Lukas Fleischer
08cdc5ca64 Invert order when sorting packages by age
Fixes FS#44195.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 09:22:46 +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
9b19f7595e Add Spanish (Latin America) and Asturian translations
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 08:52:08 +02:00
Lukas Fleischer
87df56e30b Fix official language name of Czech
Reported-by: Pablo Lezaeta Reyes <prflr88@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 08:49:21 +02:00
Lukas Fleischer
2be78f42ac aurjson.class.php: Exclude hidden package bases
Do not return packages belonging to hidden package bases in RPC results.

Fixes FS#45271.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-09 08:43:24 +02:00
Lukas Fleischer
e2b040b7ce Release 4.0.0-rc2
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 21:58:04 +02:00
Lukas Fleischer
8aa4c51dfb Fix searching for an empty string
Return all packages when an empty search term is used with keyword
search.

Reported-by: G. Schlisio <g.schlisio@dukun.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 21:35:52 +02:00
Lukas Fleischer
cb00a66855 Fix package statistics
Exclude hidden package bases from the package statistics.

Reported-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 14:42:20 +02:00
Lukas Fleischer
f13160f5cf Add Chinese (Taiwan) translations
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 14:26:26 +02:00
Lukas Fleischer
608d4aaf57 Release 4.0.0-rc1
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-08 09:21:08 +02:00
Lukas Fleischer
643dae80eb pkgfuncs.inc.php: Remove a conflict marker
Remove a Git conflict marker that was added accidentally in 74edb6f (Use
Git repositories to store packages, 2014-06-06).

Reported-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-06-04 11:24:56 +02:00
Lukas Fleischer
86352459ab Allow for resetting the SSH public key
Use NULL instead of an empty string if the SSH public key field is left
empty. Additionally, do not check for duplicate keys in that case.

Fixes FS#45109.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-31 19:16:31 +02:00
Lukas Fleischer
dd3eb28a8c Update co-maintainer list when promoting a user
When a user disowns a package and promotes a co-maintainer, remove that
new maintainer from the list of package co-maintainers. Since only the
package maintainer can manage co-maintainers, this must happen before
the actual disown operation.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:14:26 +02:00
Lukas Fleischer
c6e09def2b Fix processing of pkgbase_get_comaintainers()
pkgbase_get_comaintainers() returns an array of user names, not an array
of user IDs.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 21:14:24 +02:00
Lukas Fleischer
422d8026da Update co-maintainers when disowning a package
When a user disowns a package, the co-maintainer with the highest
priority automatically becomes the new maintainer. When the package is
disowned by a Trusted User or a Developer, the list of co-maintainers is
cleared.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
0dcdc23a7f Fix the permission check in pkgbase_adopt()
Filter the affected package bases before closing any package requests.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
2b909cb3f6 Store co-maintainer priorities
In addition to saving the list of package co-maintainers, also save
their order. This makes it possible to define a "primary" co-maintainer.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
2db1a55922 Support boolean operators in search queries
This adds very basic support for boolean search queries such as "video
or movie" or "lin and not linux". However, nested queries such as
"(video or movie) and editing" are not (yet) supported.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:26 +02:00
Lukas Fleischer
0f48341ed6 Do not allow more than 20 terms in search queries
Specifying a huge number of search terms currently results in complex
SQL queries. In practice, queries with more than 20 terms are rarely
needed. Ignore everything apart from the first 20 keywords to prevent
from potential abuse.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 17:09:25 +02:00
Lukas Fleischer
20b838a90c Use keyword search by default
Change the default search mode such that packages that contain all of
the space-separated search terms are returned. For example, the query

    image edit "command line"

returns all packages where "image", "edit" and "command line" occurs in
the package name or description. This is much more convenient and
general than a simple substring search (one can still perform a
substring search by quoting the whole search term).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-22 13:08:06 +02:00
Lukas Fleischer
01bfae82ce Make the type parameter of pkgreq_by_pkgbase() optional
This simplifies the code a bit, improves maintainability and reduces the
number of SQL queries when deleting a package.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-05-21 17:10:33 +02:00
Lukas Fleischer
a53241a2f1 Automatically close requests
Close requests automatically when a package is deleted or orphaned.

Implements FS#43799.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-03-04 12:20:21 +01:00
Lukas Fleischer
5dca715c46 Allow users to delete their own packages
Allow users to remove their own package bases for a short period of time
after initial submission (defaults to one day).

Implements FS#43648.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2015-03-04 12:16:33 +01: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
d1df490370 Hide fresh package bases from stats and results
Do not show package bases that have just been created in the package
update statistics or in the search results.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-28 17:44:25 +01:00
Lukas Fleischer
74edb6fea9 Use Git repositories to store packages
* Remove package submission page from the web interface.
* Replace PKGBUILD and tarball links with links to cgit.
* Remove the "URLPath" field from RPC replies.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00