Add PCRE_DOLLAR_ENDONLY to preg_match()

When using preg_match() to check for a match that starts at the
beginning of the string and ends at the last character of the string, we
do not want to allow an additional newline character to sneak in.
Amongst other potential loopholes, adding the PCRE_DOLLAR_ENDONLY
modifier prevents users from registering with user names that end with a
newline character.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
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>
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>
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>
Group dependencies by dependency type

Implements FS#40888.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
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>
Merge branch 'maint'
Update message catalog

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
rss.php: Include package functions

This is needed since 4426877 (Move latest_pkgs() to pkgfuncs.inc.php,
2014-05-29).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
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>
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>
Merge branch 'maint'
Use proper email address in send_resetkey()

Fixes FS#41860.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Use readfile() instead of include for static files

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Add a script to generate package lists

This can be used to regularly generate lists of packages and package
bases that are made available under /packages.gz and /pkgbase.gz,
respectively.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
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>
Merge branch 'maint'
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>
voters.php: Show time stamps if available

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Add a "wayland" package category

Implements FS#41372.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>