Move package merging to a separate page

Package actions now have a separate box on the package details page. Add
a package merge link in that box.

Link leads to a new page (pkgmerge.php) that can be used to confirm package
merging. 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:03:50 -04:00 committed by Lukas Fleischer
parent 00cffd7ddb
commit 752c5a6e34
3 changed files with 51 additions and 0 deletions

View file

@ -56,6 +56,7 @@ $sources = package_sources($row["ID"]);
<?php endif; ?>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
<li><a href="<?= get_pkg_uri($row['Name']) . 'delete/'; ?>"><?= __('Delete Package'); ?></a></li>
<li><a href="<?= get_pkg_uri($row['Name']) . 'merge/'; ?>"><?= __('Merge Package'); ?></a></li>
<?php endif; ?>
<?php endif; ?>
</ul>