mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Support canonical links to packages
This is more user-friendly than supporting package IDs only and can be used as a basis to support direct links to AUR packages in places where links are computer-produced (e.g. Wiki templates). Addresses FS#21600 and FS#28839. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
132856a938
commit
cf2f667512
3 changed files with 22 additions and 2 deletions
|
@ -2,7 +2,13 @@
|
|||
$atype = account_from_sid($SID);
|
||||
$uid = uid_from_sid($SID);
|
||||
|
||||
$pkgid = intval($_REQUEST['ID']);
|
||||
if (isset($_REQUEST['ID'])) {
|
||||
$pkgid = intval($_REQUEST['ID']);
|
||||
}
|
||||
else {
|
||||
$pkgid = pkgid_from_name($_REQUEST['N']);
|
||||
}
|
||||
|
||||
if ($uid == $row["MaintainerUID"] or
|
||||
($atype == "Developer" or $atype == "Trusted User")) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue