Commit graph

882 commits

Author SHA1 Message Date
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
Lukas Fleischer
253e76d8cc Add support for adding SSH public keys to profiles
Users can now add an SSH public key on the account edit page. This will
later be used to authenticate users via SSH.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00
Lukas Fleischer
1af375828f Use raw scanner mode in config_get()
We do not want PHP to parse the values for us. Use raw scanner mode to
avoid issues with certain values, such as regular expressions.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:11 +01:00
Lukas Fleischer
495455c28e Release 3.5.1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:39:40 +01:00
Lukas Fleischer
5ebf534ba7 Avoid double slashes in notification email body
Refactor some of the URI generation code to avoid double slashes in
absolute URIs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:28:54 +01:00
Lukas Fleischer
aa2724bbfe Release 3.5.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-22 23:47:20 +01:00
Lukas Fleischer
e0c1caece5 Remove duplicate slash in the password reset URL
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-21 11:43:31 +01:00
Lukas Fleischer
571b74b901 Always use virtual URLs
Support for non-virtual URLs has been broken for a long time and is no
longer used on the official AUR setup.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-21 11:43:31 +01:00
Lukas Fleischer
76343fb915 Use an INI-style configuration file
Replace web/lib/config.inc.php with an INI-style configuration file.
This allows us to get rid of several globals and makes it easier to use
the same configuration file in external scripts.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-24 10:03:54 +02:00
Lukas Fleischer
c64b51f2ee voters.php: Show time stamps if available
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-17 09:53:02 +02:00
Lukas Fleischer
e9ebcc4479 Add a time stamp to package base votes
This can potentially be used to identify trending packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-16 18:15:45 +02:00
Lukas Fleischer
c986ba0c52 Merge branch 'maint' 2014-10-11 11:27:04 +02:00
Lukas Fleischer
a1bee1a21e Add support for architecture-specific sources
As a follow-up to 4d7da95 (Add support for architecture-specific fields,
2014-08-10), handle architecture-specific source fields as well.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 12:29:18 +02:00
Lukas Fleischer
01fed360c2 Use proper email address in send_resetkey()
Fixes FS#41860.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 10:20:57 +02:00
Lukas Fleischer
2786c16bd5 Merge branch 'maint' 2014-10-03 13:18:04 +02:00
Lukas Fleischer
55586d9c22 Include proper timestamp in auto-accept emails
Fixes a regression introduced in c70b340 (Close requests before
accepting, 2014-07-29).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +02:00
Lukas Fleischer
76872d8b08 Fix permission check in pkgreq_close()
Make sure that requests can be auto-accepted if filed by a regular user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +02:00
Lukas Fleischer
49f76cd53b Merge branch 'maint' 2014-08-11 22:50:01 +02:00
Lukas Fleischer
4d7da95906 Add support for architecture-specific fields
This adds support for architecture-specific dependencies and relations.
Support for this has recently been added to makepkg, see commit 2b556d8
(PKGBUILD: handle arch specific attributes, 2014-07-25) in the pacman
repository for details.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-10 12:32:46 +02:00
Lukas Fleischer
218ccf51e3 Add permission checks to the request feature
* Only show the request form to users that are logged in.
* Only show the close request form to Trusted Users and developers.
* Check for a valid login in pkgreq_file().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-08 11:48:58 +02:00
Lukas Fleischer
d61b34f255 Fix the return value of save_salt()
Return true if and only if the SQL query was executed successfully.
Logins with an unsalted password no longer fail now.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-08 11:38:00 +02:00
Lukas Fleischer
0613a637b3 Fix notification handling on submission and adoption
Automatically add users to the notification list when adopting a
package. This used to work bug was broken by 03c6304 (Rework permission
handling, 2014-07-15). Fixes FS#41426.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-06 00:09:05 +02:00