From: jollytoad Date: Wed, 14 Jul 2004 10:04:55 +0000 (+0000) Subject: Rewritten to use 'require' instead of redirecting with header('Location: ...'). X-Git-Tag: REL_3-5-1~129 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=9e6d426cf455e14868c8e496f392765c44f8b5e7;p=phppgadmin.git Rewritten to use 'require' instead of redirecting with header('Location: ...'). --- diff --git a/redirect.php b/redirect.php index dbfdbfb7..b864a315 100644 --- a/redirect.php +++ b/redirect.php @@ -1,15 +1,18 @@ getLastTabURL($_REQUEST['section']); + $url = parse_url($misc->getLastTabURL($_REQUEST['section'])); - if (is_string($url)) { - $dir = substr($_SERVER['REQUEST_URI'], 0, strrpos ($_SERVER['REQUEST_URI'],'/')); - header("Location: http://{$_SERVER['HTTP_HOST']}{$dir}/{$url}"); - exit; + $_SERVER['PHP_SELF'] = $url['path']; + + // Load query vars into superglobal arrays + if (isset($url['query'])) { + $vars = array(); + parse_str($url['query'], $vars); + + $_REQUEST = array_merge($_REQUEST, $vars); + $_GET = array_merge($_GET, $vars); } - $misc->printHeader('ERROR'); - $misc->printBody(); - $misc->printFooter(); + require $url['path']; ?>