Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1069730
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 20, 6:31 AM
Size
4 KB
Mime Type
text/x-diff
Expires
Tue, Jul 22, 6:31 AM (5 h, 19 m)
Engine
blob
Format
Raw Data
Handle
692626
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php
===================================================================
--- trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php (revision 4817)
+++ trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php (revision 4818)
@@ -1,104 +1,104 @@
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: connector.php
* This is the File Manager Connector for PHP.
*
* Version: 2.0 RC3
* Modified: 2005-02-08 11:48:55
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
include('config.php') ;
include('util.php') ;
include('io.php') ;
include('basexml.php') ;
include('commands.php') ;
// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '' ;
if ( isset( $Config['UserFilesPath'] ) ) {
$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
}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() . $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()
{
if ($_GET['Command'] != 'GetCmsTree') {
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
return ;
}
// Get the main request informaiton.
- $sCommand = $_GET['Command'] ;
- $sResourceType = $_GET['Type'] ;
- $sCurrentFolder = $_GET['CurrentFolder'] ;
+ $sCommand = (isset($_GET['Command']))?$_GET['Command']:'';
+ $sResourceType = (isset($_GET['Type']))?$_GET['Type']:'';
+ $sCurrentFolder = (isset($_GET['CurrentFolder']))?$_GET['CurrentFolder']:'';
// Check if it is an allowed type.
if ($sCommand != 'GetCmsTree') {
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 ;
// File Upload doesn't have to Return XML, so it must be intercepted before anything.
if ( $sCommand == 'FileUpload' )
{
FileUpload( $sResourceType, $sCurrentFolder ) ;
return ;
}
// Prevent the browser from caching the result.
// Date in the past
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
// always modified
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
// HTTP/1.1
header('Cache-Control: no-store, no-cache, must-revalidate') ;
header('Cache-Control: post-check=0, pre-check=0', false) ;
// HTTP/1.0
header('Pragma: no-cache') ;
// Set the response format.
header( 'Content-Type:text/xml; charset=utf-8' ) ;
CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;
// Execute the required command.
switch ( $sCommand )
{
case 'GetCmsTree' :
GetCmsTree() ;
break;
case 'GetFolders' :
GetFolders( $sResourceType, $sCurrentFolder ) ;
break ;
case 'GetFoldersAndFiles' :
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
break ;
case 'CreateFolder' :
CreateFolder( $sResourceType, $sCurrentFolder ) ;
break ;
}
CreateXmlFooter() ;
exit;
}
?>
Property changes on: trunk/admin/editor/cmseditor/editor/filemanager/browser/default/connectors/php/connector.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Event Timeline
Log In to Comment