Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php =================================================================== diff -u -r2868 -r3584 --- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php (.../connector.php) (revision 2868) +++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php (.../connector.php) (revision 3584) @@ -25,17 +25,23 @@ include('commands.php') ; // Get the "UserFiles" path. $GLOBALS["UserFilesPath"] = '' ; -if ( isset( $Config['UserFilesPath'] ) ) +if ( isset( $Config['UserFilesPath'] ) ) { $GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ; -else if ( isset( $_GET['ServerPath'] ) ) +}else if ( isset( $_GET['ServerPath'] ) ) $GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ; else $GLOBALS["UserFilesPath"] = '/UserFiles/' ; if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) ) $GLOBALS["UserFilesPath"] .= '/' ; // Map the "UserFiles" path to a local directory. -//$GLOBALS["UserFilesDirectory"] = GetRootPath() . str_replace( '/', '\\', $GLOBALS["UserFilesPath"] ) ; $GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"] ; +if (isset( $_GET['Type']) && isset($_GET['ServerPath'])) { + if ($_GET['Type'] == "Special") { + $GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ; + $GLOBALS["UserFilesDirectory"] = $GLOBALS["UserFilesPath"] ; + } +} +//exit; DoResponse() ; function DoResponse() { @@ -47,12 +53,13 @@ $sCommand = $_GET['Command'] ; $sResourceType = $_GET['Type'] ; $sCurrentFolder = $_GET['CurrentFolder'] ; - // Check if it is an allowed type. if ($sCommand != 'GetCmsTree') { - if ( !in_array( $sResourceType, array('Files','Images','Flash','Media', 'Documents' ) ) ) + if ( !in_array( $sResourceType, array('Files','Images','Flash','Media', 'Documents','Special' ) ) ) return ; } + if ($sResourceType == "Special") + $sResourceType = ""; // Check the current folder syntax (must begin and start with a slash). if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;