com web/php: Redirect back to the original page, not the home page, when setting beta mode.: include/prepend.inc
| From: | Paul Dragoonis | Date: | Thu, 08 Aug 2013 03:32:19 +0000 |
| Subject: | com web/php: Redirect back to the original page, not the home page, when setting beta mode.: include/prepend.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-22683@lists.php.net to get a copy of this message | ||
Commit: ad65043f3ce78d2a60a54167c4a3c83f7ad92711
Author: Adam Harvey <aharvey@php.net> Wed, 7 Aug 2013 20:32:19 -0700
Parents: 101a92e7ab0826e7470c2a151c7b3903fda4984b
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=ad65043f3ce78d2a60a54167c4a3c83f7ad92711
Log:
Redirect back to the original page, not the home page, when setting beta mode.
Changed paths:
M include/prepend.inc
Diff:
diff --git a/include/prepend.inc b/include/prepend..inc
index ded2bcb..942b8b1 100644
--- a/include/prepend.inc
+++ b/include/prepend.inc
@@ -65,10 +65,11 @@ include $_SERVER['DOCUMENT_ROOT'] .
'/include/last_updated.inc';
// SETBETA Setting for temporary banners
if(isset($_GET['setbeta']) && !headers_sent()) {
- global $MYSITE;
+ $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
myphpnet_setbeta( (bool) $_GET['setbeta']);
myphpnet_save();
- header("Location: " . $MYSITE);
+ list($path, $query) = explode('?', $_SERVER['REQUEST_URI'], 2);
+ mirror_redirect($path);
exit;
}