diff --git a/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php b/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php index 7e2b984598..5fe8bb271f 100644 --- a/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php +++ b/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php @@ -170,8 +170,17 @@ * */ + // Modified by Ivan Tcholakov. + //define('CONFIG_WEBSITE_DOCUMENT_ROOT', ''); + if (preg_match('@'.api_get_path(REL_PATH).'$@', api_get_path(SYS_PATH))) // Sanity check. + { + define('CONFIG_WEBSITE_DOCUMENT_ROOT', preg_replace('@'.api_get_path(REL_PATH).'$@', '', api_get_path(SYS_PATH))); + } + else + { + define('CONFIG_WEBSITE_DOCUMENT_ROOT', ''); // Let the ajaxfilemanager try alone to find the document root. + } - define('CONFIG_WEBSITE_DOCUMENT_ROOT', ''); //theme related setting /* * options avaialbe for CONFIG_EDITOR_NAME are: @@ -192,4 +201,4 @@ //$langdokajax= api_get_language_isocode(); //from dokeos. return, en, es... define('CONFIG_LANG_INDEX', 'language'); //the index in the session define('CONFIG_LANG_DEFAULT', (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['language']) && file_exists(DIR_LANG . secureFileName($_GET['language']) . '.php')?secureFileName($_GET['language']):'en')); //change it to be your language file base name, such en -?> \ No newline at end of file +?>