From 00cffd7ddba6bd7b65fcd4c1ce625515cf5489d0 Mon Sep 17 00:00:00 2001 From: canyonknight Date: Thu, 27 Sep 2012 17:02:11 -0400 Subject: 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 Signed-off-by: Lukas Fleischer --- web/html/index.php | 3 +++ web/html/pkgdel.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ web/template/pkg_details.php | 3 +++ 3 files changed, 50 insertions(+) create mode 100644 web/html/pkgdel.php diff --git a/web/html/index.php b/web/html/index.php index 5c568689..0b5dfc87 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -43,6 +43,9 @@ if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { case "unflag": $_POST['do_UnFlag'] = __('UnFlag'); break; + case "delete": + include('pkgdel.php'); + return; } if (isset($_COOKIE['AURSID'])) { diff --git a/web/html/pkgdel.php b/web/html/pkgdel.php new file mode 100644 index 00000000..7f244eb4 --- /dev/null +++ b/web/html/pkgdel.php @@ -0,0 +1,44 @@ + +
+

+

+ ', htmlspecialchars($pkgname), ''); ?> + + +

+
+
+ + + +

+

+

" />

+
+
+
+ +
  • + +
  • + -- cgit v1.2.3-24-g4f1b