cvs: docweb /include init.inc.php /www redirect.php

[email protected] ("Nuno Lopes")
Newsgroups php.doc.web
Message-ID <cvsnlopess1116944162@cvsserver>
nlopess		Tue May 24 10:16:02 2005 EDT

  Modified files:              
    /docweb/include	init.inc.php 
    /docweb/www	redirect.php 
  Log:
  finally fix my crap of yesterday
  
http://cvs.php.net/diff.php/docweb/include/init.inc.php?r1=1.11&r2=1.12&ty=u
Index: docweb/include/init.inc.php
diff -u docweb/include/init.inc.php:1.11 docweb/include/init.inc.php:1.12
--- docweb/include/init.inc.php:1.11	Fri May 20 10:58:54 2005
+++ docweb/include/init.inc.php	Tue May 24 10:16:00 2005
@@ -18,7 +18,7 @@
 |                   Gabor Hojtsy <[email protected]>                        |
 |                   Sean Coates <[email protected]>                         |
 +----------------------------------------------------------------------+
-$Id: init.inc.php,v 1.11 2005/05/20 14:58:54 vincent Exp $
+$Id: init.inc.php,v 1.12 2005/05/24 14:16:00 nlopess Exp $
 */
 
 error_reporting(E_ALL);
@@ -45,7 +45,7 @@
     // set up constants (use defaults if necessary)
     define('SITE',  isset($project)  ? $project  : $defaultProject);
     define('LANGC', isset($language) ? $language : $defaultLanguage);
-    define('URI',   isset($uri)      ? $uri      : $_SERVER['REQUEST_URI']);
+    define('URI',   isset($uri)      ? preg_replace('@^[/\.]+@', '/' ,$uri) : $_SERVER['REQUEST_URI']);
     define('LANGD', $LANGUAGES[LANGC]);
 
     if (isset($project)) {
http://cvs.php.net/diff.php/docweb/www/redirect.php?r1=1.6&r2=1.7&ty=u
Index: docweb/www/redirect.php
diff -u docweb/www/redirect.php:1.6 docweb/www/redirect.php:1.7
--- docweb/www/redirect.php:1.6	Mon May 23 15:20:03 2005
+++ docweb/www/redirect.php	Tue May 24 10:16:01 2005
@@ -15,7 +15,7 @@
 +----------------------------------------------------------------------+
 | Authors:          Sean Coates <[email protected]>                         |
 +----------------------------------------------------------------------+
-$Id: redirect.php,v 1.6 2005/05/23 19:20:03 nlopess Exp $
+$Id: redirect.php,v 1.7 2005/05/24 14:16:01 nlopess Exp $
 */
 
 require_once('../include/lib_proj_lang.inc.php');
@@ -79,7 +79,7 @@
     }
 }
 
-if (!$uri || !($uri = part_is_valid_uri($uri))) {
+if (!($uri = part_is_valid_uri($uri))) {
     unset($uri);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.