cvs: phpweb / error.php

From: Date: Sun, 10 Aug 2003 10:48:38 +0000
Subject: cvs: phpweb / error.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-20106@lists.php.net to get a copy of this message
goba Sun Aug 10 06:48:38 2003 EDT Modified files: /phpweb error.php Log: Drop QUERY_STRING from the shortcut URL Index: phpweb/error.php diff -u phpweb/error.php:1.2 phpweb/error.php:1.3 --- phpweb/error.php:1.2 Sat Aug 9 12:43:40 2003 +++ phpweb/error.php Sun Aug 10 06:48:37 2003 @@ -1,6 +1,6 @@ <?php -// $Id: error.php,v 1.2 2003/08/09 16:43:40 goba Exp $ +// $Id: error.php,v 1.3 2003/08/10 10:48:37 goba Exp $ /* @@ -16,10 +16,12 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc'; -// Get URI for this request (without the leading slash) +// Get URI for this request (without the leading slash, and +// without any query string attached) // See langchooser.inc for more info on STRIPPED_URI // Also decode special URL parts, eg %20 into a space -$URI = urldecode(substr($_SERVER['STRIPPED_URI'], 1)); +$URI = substr($_SERVER['STRIPPED_URI'], 1); +$URI = urldecode(preg_replace("!(\\?.+$)!", "", $URI)); // ============================================================================ // For images, display a 404 automatically (no redirect) @@ -221,7 +223,7 @@ // ============================================================================ // Try to find the page using the preferred language as a manual page -include_once "manual-lookup.inc"; +include_once $_SERVER['DOCUMENT_ROOT'] . "/include/manual-lookup.inc"; $try = find_manual_page($LANG, $URI); if ($try) { @header('HTTP/1.1 200 OK');

« previous php.mirrors (#20106) next »