summaryrefslogtreecommitdiffstats
path: root/web/html/packages.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2013-08-27 11:25:14 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2013-08-27 11:25:14 +0200
commitbf019a5b6c66ab8a53382a739f1adf7dd568db23 (patch)
treefe120d467ca8acff14ecc1f14a582f02ae666e18 /web/html/packages.php
parent23867a211ce90d86938bea6a899d219cf8c08aab (diff)
downloadaurweb-bf019a5b6c66ab8a53382a739f1adf7dd568db23.tar.xz
Use POST-Redirect-GET for most package actions
Avoid showing a POST data resubmission dialog and simply redirect to the package page if a package action completed successfully. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/packages.php')
-rw-r--r--web/html/packages.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/html/packages.php b/web/html/packages.php
index 046a942..e03a099 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -98,6 +98,12 @@ if (check_token()) {
} elseif (current_action("do_ChangeCategory")) {
list($ret, $output) = pkg_change_category($pkgid, $atype);
}
+
+ if ($ret) {
+ /* Redirect back to package page on success. */
+ header('Location: ' . get_pkg_uri($pkgname));
+ exit();
+ }
}
# Get package details after package actions have been attempted, FS#34508