From 8165ddd86d3dcb7cc0d4d0bf6c10228e144033e6 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 15 Dec 2011 21:51:45 +0000 Subject: [PATCH] Ugly hack. if we're on sfiab.com set the absolute path for the userfiles so uploading files to the server works --- fckeditor/editor/filemanager/connectors/php/config.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fckeditor/editor/filemanager/connectors/php/config.php b/fckeditor/editor/filemanager/connectors/php/config.php index 87c0ccf..1671a38 100644 --- a/fckeditor/editor/filemanager/connectors/php/config.php +++ b/fckeditor/editor/filemanager/connectors/php/config.php @@ -43,7 +43,14 @@ $Config['UserFilesPath'] = $config_sfiabdirectory.'/data/userfiles/' ; // user files directory. Useful if you are using a virtual directory, symbolic // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'. // Attention: The above 'UserFilesPath' must point to the same directory. -$Config['UserFilesAbsolutePath'] = '' ; +list($sub,$junk)=explode(".",$_SERVER['HTTP_HOST'],2); +if($junk=="sfiab.com") { + $p="{$_SERVER['DOCUMENT_ROOT']}/{$sub}/data/userfiles/"; + $Config['UserFilesAbsolutePath'] = $p; +} +else { + $Config['UserFilesAbsolutePath'] = ''; +} // Due to security issues with Apache modules, it is recommended to leave the // following setting enabled.