diff options
author | canyonknight <canyonknight@gmail.com> | 2012-09-27 23:02:11 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-09-28 08:57:24 +0200 |
commit | 00cffd7ddba6bd7b65fcd4c1ce625515cf5489d0 (patch) | |
tree | eeba9df3d5b2528c8b35583456004dc1b8cd17eb /web/template | |
parent | d56a88897bcaa9d552d1d2b90c33b7c6e29e330a (diff) | |
download | aur-00cffd7ddba6bd7b65fcd4c1ce625515cf5489d0.tar.gz aur-00cffd7ddba6bd7b65fcd4c1ce625515cf5489d0.tar.xz |
Move package deletion to a separate page
Package actions now have a separate box on the package details page. Make
a package deletion link in that box.
Link leads to a new page (pkgdel.php) that can be used to confirm package
deletion. A separate page with confirmation is used to avoid CSRFs.
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_details.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 4e9e0733..dcc086bb 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -54,6 +54,9 @@ $sources = package_sources($row["ID"]); <?php else: ?> <li><a href="<?= get_pkg_uri($row['Name']) . 'notify/'; ?>"><?= __('Notify of new comments'); ?></a></li> <?php endif; ?> + <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> + <li><a href="<?= get_pkg_uri($row['Name']) . 'delete/'; ?>"><?= __('Delete Package'); ?></a></li> + <?php endif; ?> <?php endif; ?> </ul> <?php if ($uid): ?> |