cvs: phpweb /error index.php

From: Date: Sun, 01 Dec 2002 13:24:09 +0000
Subject: cvs: phpweb /error index.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-13965@lists.php.net to get a copy of this message
goba Sun Dec 1 08:24:09 2002 EDT Modified files: /phpweb/error index.php Log: 1. Convert tabs to spaces 2. Always show the books page in the mirror's default lanaguage if available 3. Reorder redirects logically, put exit after the book redirect Index: phpweb/error/index.php diff -u phpweb/error/index.php:1.84 phpweb/error/index.php:1.85 --- phpweb/error/index.php:1.84 Sun Dec 1 08:17:40 2002 +++ phpweb/error/index.php Sun Dec 1 08:24:09 2002 @@ -166,8 +166,10 @@ } // ============================================================================ -// Redirect if the entered URI was a PHP page name -if (file_exists("$DOCUMENT_ROOT/$uri.php")) { +// Redirect if the entered URI was a PHP page name (except the books page, +// which we display in the mirror's language or the explicitly specified +// language [see below]) +if ($uri != 'books' && file_exists("$DOCUMENT_ROOT/$uri.php")) { header("Location: http://$SERVER_NAME/$uri.php"); exit; } @@ -184,14 +186,14 @@ require "manual-lookup.inc"; if (strchr($uri,'/')) { - // Find language and function name part (eg. hu/ini) - list($lang,$function) = explode('/',$uri,2); + // Find language and function name part (eg. hu/ini) + list($lang,$function) = explode('/',$uri,2); $function = strtolower($function); if ($lang != 'pt_BR') { $lang = strtolower($lang); } // Transform function name, so it can be a shortcut - if (isset($uri_aliases[$function])) { + if (isset($uri_aliases[$function])) { $function = $uri_aliases[$function]; } @@ -208,11 +210,12 @@ } elseif ($function == "blog") { header("Location: http://$SERVER_NAME/manual/$lang/build.log.gz"); exit; +} elseif ($function == "books") { + header("Location: http://$SERVER_NAME/books.php?type_lang=PHP_$lang"); + exit; } elseif ($function == "phpdochowto") { header("Location: http://$SERVER_NAME/manual/howto/index.html"); exit; -} elseif ($function == "books") { - header("Location: http://$SERVER_NAME/books.php?type_lang=PHP_$lang"); } // ============================================================================

« previous php.mirrors (#13965) next »