com web/php: Redirect back to the original page, not the home page, when setting beta mode.: include/prepend.inc

From: 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-16467@lists.php.net to get a copy of this message
Commit: fedea42b2df6fb47c3c44e205950ab0de71eace0 Author: Adam Harvey <aharvey@php.net> Wed, 7 Aug 2013 20:32:19 -0700 Parents: af8f950ffad262f07e7f128d2038e891d405bae9 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=fedea42b2df6fb47c3c44e205950ab0de71eace0 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; }

« previous php.webmaster (#16467) next »