Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv14520/lib
Modified Files:
main.php
Log Message:
If we're expecting PATH_INFO, and don't get it, redirect to REQUEST_URI
with a trailing '/' added. This is to make the index.php script look
more like a 'directory', for consistencies sake.
Also apparently $PATH_INFO gets magic-quoted, so un-magic that.
Index: main.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** main.php 2001/02/14 22:02:05 1.3
--- main.php 2001/02/15 19:32:34 1.4
***************
*** 5,8 ****
--- 5,14 ----
include "lib/userauth.php";
+ if (USE_PATH_INFO && !isset($PATH_INFO))
+ {
+ header("Location: " . SERVER_URL . $REQUEST_URI);
+ exit;
+ }
+
function DeducePagename ()
{
***************
*** 12,18 ****
return fix_magic_quotes_gpc($pagename);
! if (USE_PATH_INFO)
if (ereg('^' . PATH_INFO_PREFIX . '(..*)$', $PATH_INFO, $m))
return $m[1];
return gettext("FrontPage");
--- 18,27 ----
return fix_magic_quotes_gpc($pagename);
! if (USE_PATH_INFO && isset($PATH_INFO))
! {
! fix_magic_quotes_gpc($PATH_INFO);
if (ereg('^' . PATH_INFO_PREFIX . '(..*)$', $PATH_INFO, $m))
return $m[1];
+ }
return gettext("FrontPage");
|