Commit:    fedea42b2df6fb47c3c44e205950ab0de71eace0
Author:    Adam Harvey <ahar...@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;
 }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to