[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup config.php,1.78.2.2,1.78.2.3
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup config.php,1.78.2.2,1.78.2.3 |
Date: |
Thu, 03 Jul 2003 13:09:47 -0400 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv3119
Modified Files:
Tag: Version-0_9_16-branch
config.php
Log Message:
improved version of in_docroot, allows for pathnames starting like the docroot
Index: config.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/config.php,v
retrieving revision 1.78.2.2
retrieving revision 1.78.2.3
diff -C2 -r1.78.2.2 -r1.78.2.3
*** config.php 2 Jul 2003 23:57:51 -0000 1.78.2.2
--- config.php 3 Jul 2003 17:09:45 -0000 1.78.2.3
***************
*** 35,43 ****
// test if $path lies within the webservers document-root
function in_docroot($path)
{
! $ret = strstr($path,PHPGW_SERVER_ROOT) ||
strstr($path,$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']);
! //echo "<p>in_docroot('$path') = '$ret',
PHPGW_SERVER_ROOT='".PHPGW_SERVER_ROOT."',DOCUMENT_ROOT='".$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']."'</p>\n";
! return $ret;
}
--- 35,58 ----
// test if $path lies within the webservers document-root
+ //
function in_docroot($path)
{
! $docroots =
array(PHPGW_SERVER_ROOT,$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']);
!
! foreach ($docroots as $docroot)
! {
! $len = strlen($docroot);
!
! if ($docroot == substr($path,0,$len))
! {
! $rest = substr($path,$len);
!
! if (!strlen($rest) || $rest[0] ==
DIRECTORY_SEPARATOR)
! {
! return True;
! }
! }
! }
! return False;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup config.php,1.78.2.2,1.78.2.3,
Ralf Becker <address@hidden> <=