diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php
index ec57ec9fefb7ca5530bca2c4a4a7b86ad7637bbd..019937d5bedd5b98fa13c7c30a7810c5f5ca5b1f 100644
--- a/htdocs/conf/conf.class.php
+++ b/htdocs/conf/conf.class.php
@@ -272,7 +272,7 @@ class Conf
$this->ldap->enabled=defined("MAIN_MODULE_LDAP")?MAIN_MODULE_LDAP:0;
// Module FCKeditor
$this->fckeditor->enabled=defined("MAIN_MODULE_FCKEDITOR")?MAIN_MODULE_FCKEDITOR:0;
- $this->fckeditor->dir_images=DOL_DATA_ROOT."/fckeditor/images";
+ $this->fckeditor->dir_output=DOL_DATA_ROOT."/fckeditor";
/*
diff --git a/htdocs/document.php b/htdocs/document.php
index fe548685f4fb791623dec5c8d1025a3976f8940d..c9db9c7a2e7e9c4e57234e89e510f82b6c1b8e8d 100644
--- a/htdocs/document.php
+++ b/htdocs/document.php
@@ -250,7 +250,16 @@ if ($modulepart)
// Aucun test necessaire car on force le rep de doanwload sur
// le rep export qui est propre � l'utilisateur
$accessallowed=1;
- $original_file=$conf->export->dir_ouput.'/'.$user->id.'/'.$original_file;
+ $original_file=$conf->export->dir_output.'/'.$user->id.'/'.$original_file;
+ }
+
+ // Wrapping pour l'�diteur wysiwyg
+ if ($modulepart == 'editor')
+ {
+ // Aucun test necessaire car on force le rep de doanwload sur
+ // le rep export qui est propre � l'utilisateur
+ $accessallowed=1;
+ $original_file=$conf->fckeditor->dir_output.'/'.$original_file;
}
}
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 a0ca126c47fe61722053f952c52b0c374e4f6142..cf33cfbf39df3f18d212fd51f8b1261c5d89f344 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
@@ -18,19 +18,24 @@
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-global $Config, $conf ;
+require_once("../../../../../../../../conf/conf.php"); // ajout� car $conf et DOL_DATA_ROOT ne fonctionne pas
+
+global $Config ;
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
-$Config['UserFilesPath'] = '/images/' ;
+//$Config['UserFilesPath'] = '/UserFiles/' ;
// 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
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
-$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_images ;
+
+//$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_output; // ne fonctionne pas
+//$Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/fckeditor/'; // ne fonctionne pas
+$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
diff --git a/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php b/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php
index 59551a538d696433beab485767b720f2f3fcec6d..dca87524508c88dac16f3fda5079fc92fbfb9145 100644
--- a/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php
+++ b/htdocs/includes/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php
@@ -35,7 +35,7 @@ if ( isset( $Config['UserFilesPath'] ) )
else if ( isset( $_GET['ServerPath'] ) )
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
else
- $GLOBALS["UserFilesPath"] = '/UserFiles/' ;
+ $GLOBALS["UserFilesPath"] = $dolibarr_main_url_root.'/document.php?modulepart=editor&file=';// il faut l'url en entier
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
$GLOBALS["UserFilesPath"] .= '/' ;
diff --git a/htdocs/includes/fckeditor/editor/filemanager/upload/php/config.php b/htdocs/includes/fckeditor/editor/filemanager/upload/php/config.php
index 13e3c2ec643be58887a271a1251242c5584fdf5a..cd52b630e37f897a898f2f17ab9c786bb25e2e60 100644
--- a/htdocs/includes/fckeditor/editor/filemanager/upload/php/config.php
+++ b/htdocs/includes/fckeditor/editor/filemanager/upload/php/config.php
@@ -18,19 +18,24 @@
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
-global $Config, $conf ;
+require_once("../../../../../../conf/conf.php"); // ajout� car $conf et DOL_DATA_ROOT ne fonctionne pas
+
+global $Config ;
// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true ;
// Path to uploaded files relative to the document root.
-$Config['UserFilesPath'] = '/images/' ;
+//$Config['UserFilesPath'] = '/UserFiles/' ;
// 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
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
-$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_images ;
+
+//$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_output; // ne fonctionne pas
+//$Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/fckeditor/'; // ne fonctionne pas
+$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
diff --git a/htdocs/includes/fckeditor/fckconfig.js b/htdocs/includes/fckeditor/fckconfig.js
index 12956c62f386bd3558592eb9230346c11e9ff234..251465be90dc10485c2053cce9eb83710e67b2d9 100644
--- a/htdocs/includes/fckeditor/fckconfig.js
+++ b/htdocs/includes/fckeditor/fckconfig.js
@@ -20,6 +20,8 @@
FCKConfig.CustomConfigurationsPath = '' ;
+print FCKConfig.BasePath;
+
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
FCKConfig.DocType = '' ;
@@ -174,8 +176,8 @@ FCKConfig.FlashDlgHideAdvanced = false ;
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
-var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
-var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
+var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
+var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
// Don't care about the following line. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").
diff --git a/htdocs/includes/fpdf/fpdf/fpdf.php b/htdocs/includes/fpdf/fpdf/fpdf.php
index ba643b366f87ba4cfeeda27ba25b6eaf6b1d9088..db218fcce7489fff5e603a842951e95dcf9e5d72 100644
--- a/htdocs/includes/fpdf/fpdf/fpdf.php
+++ b/htdocs/includes/fpdf/fpdf/fpdf.php
@@ -20,6 +20,16 @@
*/
define("K_CELL_HEIGHT_RATIO", 1.25);
+/**
+ * R�pertoire des documents de fckeditor
+ */
+define ("K_PATH_CACHE", $conf->fckeditor->dir_output);
+
+/**
+ * url qui sera substituer par le K_PATH_CACHE lorsqu'une image sera int�gr�e au pdf
+ */
+define ("K_PATH_URL_CACHE", $dolibarr_main_url_root."/document.php?modulepart=editor&file=");
+
if(!class_exists('FPDF'))
{
define('FPDF_VERSION','1.53');
diff --git a/htdocs/theme/eldy/fckeditor/fckconfig.js b/htdocs/theme/eldy/fckeditor/fckconfig.js
index a1c3b1df1e9484219bb7d5f7a1426aa23e0f4672..0cc650b0b8f77001597dbce371ced05d84d16fe3 100644
--- a/htdocs/theme/eldy/fckeditor/fckconfig.js
+++ b/htdocs/theme/eldy/fckeditor/fckconfig.js
@@ -165,8 +165,8 @@ FCKConfig.FlashDlgHideAdvanced = false ;
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
-var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
-var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
+var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
+var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
// Don't care about the following line. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").