cvs: phpweb / source.php

From: Date: Fri, 29 Jun 2001 17:18:02 +0000
Subject: cvs: phpweb / source.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-5223@lists.php.net to get a copy of this message
goba Fri Jun 29 13:18:02 2001 EDT Modified files: /phpweb source.php Log: Make source.php to work for all manual subdirs Index: phpweb/source.php diff -u phpweb/source.php:1.2 phpweb/source.php:1.3 --- phpweb/source.php:1.2 Wed Mar 7 19:17:34 2001 +++ phpweb/source.php Fri Jun 29 13:17:58 2001 @@ -15,12 +15,20 @@ echo hdelim(); $legal_dirs = array( - "/manual" => 1, - "/include" => 1, - "/stats" => 1); + "/manual" => 1, + "/include" => 1, + "/stats" => 1 +); $dir = dirname($url); -if ($dir && $legal_dirs[$dir]) { + +// The separate manual language dirs are legal dirs +if (preg_match("!^/manual/(en|pt_BR|cs|nl|fr|de|hu|it|ja|kr|es)$!", $dir) || $legal_dirs[$dir]) { + $legal_dir = TRUE; +} else { $legal_dir = FALSE: } + +// If this is a legal dir, then it is under the docroot, else use basename +if ($dir && $legal_dir) { $page_name = $DOCUMENT_ROOT . $url; } else { $page_name = basename($url);

« previous php.mirrors (#5223) next »