diff --git a/fckeditor/editor/filemanager/connectors/php/config.php b/fckeditor/editor/filemanager/connectors/php/config.php index 24d7c7e..87c0ccf 100644 --- a/fckeditor/editor/filemanager/connectors/php/config.php +++ b/fckeditor/editor/filemanager/connectors/php/config.php @@ -22,16 +22,22 @@ * Configuration file for the File Manager Connector for PHP. */ +require_once("../../../../../data/config.inc.php"); +mysql_connect($DBHOST,$DBUSER,$DBPASS); +mysql_select_db($DBNAME); +$q=mysql_query("SELECT * FROM config WHERE var='SFIABDIRECTORY'"); +$r=mysql_fetch_object($q); +$config_sfiabdirectory=$r->val; + global $Config ; // SECURITY: You must explicitly enable this "connector". (Set it to "true"). // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only // authenticated users can access this file or use some kind of session checking. -$Config['Enabled'] = false ; - +$Config['Enabled'] = true ; // Path to user files relative to the document root. -$Config['UserFilesPath'] = '/userfiles/' ; +$Config['UserFilesPath'] = $config_sfiabdirectory.'/data/userfiles/' ; // Fill the following value it you prefer to specify the absolute path for the // user files directory. Useful if you are using a virtual directory, symbolic @@ -62,11 +68,11 @@ $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ; // If possible, it is recommended to set more restrictive permissions, like 0755. // Set to 0 to disable this feature. // Note: not needed on Windows-based servers. -$Config['ChmodOnUpload'] = 0777 ; +$Config['ChmodOnUpload'] = 0644 ; // See comments above. // Used when creating folders that does not exist. -$Config['ChmodOnFolderCreate'] = 0777 ; +$Config['ChmodOnFolderCreate'] = 0755 ; /* Configuration settings for each Resource Type @@ -124,28 +130,28 @@ $Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', $Config['DeniedExtensions']['File'] = array() ; $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ; $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ; -$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ; -$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ; +$Config['QuickUploadPath']['File'] = $Config['FileTypesPath']['File'] ; +$Config['QuickUploadAbsolutePath']['File']= $Config['FileTypesAbsolutePath']['File'] ; $Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ; $Config['DeniedExtensions']['Image'] = array() ; $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'image/' ; $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ; -$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ; -$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ; +$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ; +$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ; $Config['AllowedExtensions']['Flash'] = array('swf','flv') ; $Config['DeniedExtensions']['Flash'] = array() ; $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ; $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ; -$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ; -$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ; +$Config['QuickUploadPath']['Flash'] = $Config['FileTypesPath']['Flash'] ; +$Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolultePath']['Flash'] ; $Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ; $Config['DeniedExtensions']['Media'] = array() ; $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ; $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ; -$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ; -$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ; +$Config['QuickUploadPath']['Media'] = $Config['FileTypesPath']['Media'] ; +$Config['QuickUploadAbsolutePath']['Media']= $Config['FileTypesAbsolutePath']['Media'] ; ?>