Allow users to delete their own comments

Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15). Fixes FS#41379.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Remove duplicate recipients from Cc

When a user files a request for a package maintained by himself, he is
currently included in the Cc list twice. Use array_unique() to omit
repeated entries.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Close requests before accepting

When auto-accepting a request, we need to close the package request
before performing the actual action (disown/deletion/merge). Otherwise,
the former maintainer is not included in the Cc list of the
acceptance/rejection notification email.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Lock fresh orphan requests

Trusted Users should almost always wait for two weeks before accepting
an orphan request. Lock orphan requests during the first two weeks.
Package bases can still be orphaned and package requests can still be
closed manually during that period of time.

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

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

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Count users in "Trusted User & Developer" group as TU

This reflects the changes in 3610f3c.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Translation updates from Transifex

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

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