From e16472c69718a5e68cbca11dc63e562c66b8d159 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Sep 2006 16:16:19 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20a=20jour=20fckeditor=202.3.1=20et=20corr?= =?UTF-8?q?ection=20pour=20que=20le=20code=20soit=20touch=E9=20au=20minimu?= =?UTF-8?q?m.=20Correction=20pour=20faire=20fonctionner=20l'upload=20de=20?= =?UTF-8?q?fichiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../includes/fckeditor/dolibarr_changes.txt | 39 +++++++++++-------- .../browser/default/connectors/php/config.php | 7 +++- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/htdocs/includes/fckeditor/dolibarr_changes.txt b/htdocs/includes/fckeditor/dolibarr_changes.txt index 834ac6897f6..b24050d981a 100644 --- a/htdocs/includes/fckeditor/dolibarr_changes.txt +++ b/htdocs/includes/fckeditor/dolibarr_changes.txt @@ -1,26 +1,31 @@ -If fckeditor files are replaced by new version, following changes must be done: - - -* Edit fckconfig.js to set: -*************************** - +If fckeditor files are replaced by new version, following changes must be done: + + +* Edit fckconfig.js to set: +*************************** + FCKConfig.LinkUpload = false ; FCKConfig.ImageUpload = false ; FCKConfig.FlashUpload = false ; - - -* Edit htdocs\includes\fckeditor\editor\filemanager\browser\default\connectors\php\config.php to set: -***************************************************************************************************** - + + +* Edit htdocs\includes\fckeditor\editor\filemanager\browser\default\connectors\php\config.php to set: +***************************************************************************************************** + //require_once("../../../../../../../../master.inc.php"); require_once("../../../../../../../../conf/conf.php"); // ajouté car include master.inc.php ne marche pas -/* -$conf->syslog->enabled=1; -define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log'); +$uri=eregi_replace('^http(s?)://','',$dolibarr_main_url_root); +$pos = strstr ($uri, '/'); // $pos contient alors url sans nom domaine +if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a '' +define('DOL_URL_ROOT', $pos); + +/* +$conf->syslog->enabled=1; +define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log'); require_once("../../../../../../../../lib/functions.inc.php"); -dolibarr_syslog("eee".$conf->fckeditor->dir_output); -*/ - +dolibarr_syslog("eee".$conf->fckeditor->dir_output); +*/ + // SECURITY: You must explicitelly enable this "connector". (Set it to "true"). $Config['Enabled'] = true ; diff --git a/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/config.php b/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/config.php index 67e1d6db0fd..51786cb991a 100644 --- a/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/config.php +++ b/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/config.php @@ -22,6 +22,11 @@ global $Config ; //require_once("../../../../../../../../master.inc.php"); require_once("../../../../../../../../conf/conf.php"); // ajouté car include master.inc.php ne marche pas +$uri=eregi_replace('^http(s?)://','',$dolibarr_main_url_root); +$pos = strstr ($uri, '/'); // $pos contient alors url sans nom domaine +if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a '' +define('DOL_URL_ROOT', $pos); + /* $conf->syslog->enabled=1; define('SYSLOG_FILE','c:/log/dolibarr/dolibarr.log'); @@ -33,7 +38,7 @@ dolibarr_syslog("eee".$conf->fckeditor->dir_output); $Config['Enabled'] = true ; // Path to user files relative to the document root. -$Config['UserFilesPath'] = '/viewimage.php?modulepart=fckeditor&file=' ; +$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&file=' ; // Fill the following value it you prefer to specify the absolute path for the // user files directory. Usefull if you are using a virtual directory, symbolic