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>
This commit is contained in:
canyonknight 2012-09-27 17:02:11 -04:00 committed by Lukas Fleischer
parent d56a88897b
commit 00cffd7ddb
3 changed files with 50 additions and 0 deletions

View file

@ -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): ?>