From 8e511162af0029dbaee3feaea951b2dfd4f558a0 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 11 Aug 2011 16:39:49 +0200 Subject: [PATCH] Using absolute path instead of relative for fckeditor lib (Requires testing it could break the fckeditor everywhere maybe under Windoz? ) Should fix bug #3792 --- main/inc/lib/fckeditor/fckeditor.php | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/main/inc/lib/fckeditor/fckeditor.php b/main/inc/lib/fckeditor/fckeditor.php index 57e61e006b..7c5db9430e 100755 --- a/main/inc/lib/fckeditor/fckeditor.php +++ b/main/inc/lib/fckeditor/fckeditor.php @@ -157,11 +157,12 @@ class FCKeditor * * @return string */ - public function CreateHtml() - { - // Adaptation for the Chamilo LMS --------------------------------------------------------- - - $this->BasePath = api_get_path(REL_PATH).'main/inc/lib/fckeditor/'; + public function CreateHtml() { + // Adaptation for the Chamilo LMS + + //@todo why the BasePath is relative ? we should use this constant WEB_PATH + //$this->BasePath = api_get_path(REL_PATH).'main/inc/lib/fckeditor/'; + $this->BasePath = api_get_path(WEB_PATH).'main/inc/lib/fckeditor/'; $config = $this->get_custom_configuration(); $this->read_configuration($config); @@ -173,14 +174,9 @@ class FCKeditor $this->Config['BlockCopyPaste'] = false; } - //---------------------------------------------------------------------------------------- - $HtmlValue = htmlspecialchars( $this->Value ) ; - $Html = '' ; - - if ( $this->IsCompatible() ) - { + if ( $this->IsCompatible() ) { if ( api_get_setting('server_type') == 'test' ) $File = 'fckeditor.original.html' ; else @@ -199,9 +195,7 @@ class FCKeditor // Render the editor IFRAME. $Html .= "" ; - } - else - { + } else { if ( strpos( $this->Width, '%' ) === false ) $WidthCSS = $this->Width . 'px' ; else @@ -214,7 +208,6 @@ class FCKeditor $Html .= "" ; } - return $Html ; }