fixed not working browsing or upload, if eGW is not installed in the docroot, which is our default, also fixed a double // in the path

This commit is contained in:
Ralf Becker 2007-04-17 14:16:21 +00:00
parent 909d37d94a
commit 1600dc906e
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<?php <?php
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2007 Frederico Caldeira Knabben
@ -40,7 +40,7 @@ function ServerMapFolder( $resourceType, $folderPath )
{ {
// Get the resource type directory. // Get the resource type directory.
//INTEGRATION $sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '/' ; //INTEGRATION $sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '/' ;
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . '/' ; $sResourceTypePath = $GLOBALS["UserFilesDirectory"];
// Ensure that the directory exists. // Ensure that the directory exists.
CreateServerFolder( $sResourceTypePath ) ; CreateServerFolder( $sResourceTypePath ) ;
@ -93,6 +93,9 @@ function CreateServerFolder( $folderPath )
function GetRootPath() function GetRootPath()
{ {
//INTEGRATION: alogrithm below does not work if eGW is installed outside the docroot
return $_SERVER['DOCUMENT_ROOT'];
$sRealPath = realpath( './' ) ; $sRealPath = realpath( './' ) ;
$sSelfPath = $_SERVER['PHP_SELF'] ; $sSelfPath = $_SERVER['PHP_SELF'] ;

View File

@ -1,4 +1,4 @@
<?php <?php
/* /*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net * FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2007 Frederico Caldeira Knabben * Copyright (C) 2003-2007 Frederico Caldeira Knabben
@ -29,6 +29,9 @@ function RemoveExtension( $fileName )
function GetRootPath() function GetRootPath()
{ {
//INTEGRATION: alogrithm below does not work if eGW is installed outside the docroot
return $_SERVER['DOCUMENT_ROOT'];
$sRealPath = realpath( './' ) ; $sRealPath = realpath( './' ) ;
$sSelfPath = $_SERVER['PHP_SELF'] ; $sSelfPath = $_SERVER['PHP_SELF'] ;