Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 431 → Rev 436

/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php
38,10 → 38,29
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
$GLOBALS["UserFilesPath"] .= '/' ;
 
$GLOBALS["BaseDir"] = '';
if ( isset( $Config['BaseDir'] ) )
$GLOBALS["BaseDir"] = $Config['BaseDir'] ;
else if ( isset( $_GET['BaseDir'] ) )
$GLOBALS["BaseDir"] = $_GET['BaseDir'] ;
else
$GLOBALS["BaseDir"] = '' ;
 
$GLOBALS["UrlPrefix"] = '';
if ( isset( $Config['UrlPrefix'] ) )
$GLOBALS["UrlPrefix"] = $Config['UrlPrefix'] ;
else if ( isset( $_GET['UrlPrefix'] ) )
$GLOBALS["UrlPrefix"] = $_GET['UrlPrefix'] ;
else
$GLOBALS["UrlPrefix"] = '' ;
 
 
// Map the "UserFiles" path to a local directory.
//$GLOBALS["UserFilesDirectory"] = GetRootPath() . str_replace( '/', '\\', $GLOBALS["UserFilesPath"] ) ;
$GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ;
//$GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ;
$GLOBALS['UserFilesDirectory'] = $GLOBALS['BaseDir'].$GLOBALS['UserFilesPath'] ;
 
 
DoResponse() ;
 
function DoResponse()
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
22,7 → 22,10
$Config['Enabled'] = true;
 
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/UserFiles/' ;
// Without end slash
$Config['UserFilesPath'] = '/UserFiles';
$Config['BaseDir'] = '/home/david/workspace/papyrus';
$Config['UrlPrefix'] = '/~david/papyrus';
 
$Config['AllowedExtensions']['File'] = array() ;
$Config['DeniedExtensions']['File'] = array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ;
/trunk/api/fckeditor/editor/filemanager/browser/default/connectors/php/io.php
19,11 → 19,12
function GetUrlFromPath( $resourceType, $folderPath )
{
if ( $resourceType == '' )
return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
return RemoveFromEnd( $GLOBALS['UrlPrefix'].$GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
else
return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;
return $GLOBALS['UrlPrefix'].$GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;
}
 
 
function RemoveExtension( $fileName )
{
return substr( $fileName, 0, strrpos( $fileName, '.' ) ) ;