Commit 4c0eb996 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Make use of REFERRER variable so that after clicking on adminmode

button, you zap back to the page you were on. Much more convenient.
parent 99a3be13
......@@ -36,7 +36,12 @@ DBQueryFatal("update users set adminoff=$adminoff where uid='$target_uid'");
#
# Spit out a redirect
#
header("Location: $TBBASE/showuser.php3?target_uid=$target_uid");
#
if (isset($HTTP_REFERER) && strcmp($HTTP_REFERER, "")) {
header("Location: $HTTP_REFERER");
}
else {
header("Location: $TBBASE/showuser.php3?target_uid=$target_uid");
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment