Fix tinymce breaking in non-typical install location

This commit is contained in:
Damian Mooyman 2016-11-01 17:40:59 +13:00
parent 81087ce15c
commit 38fdafb474

View File

@ -21,10 +21,12 @@ class TinyMCEConfig extends HTMLEditorConfig {
* - themes * - themes
* - skins * - skins
* *
* If left blank defaults to ADMIN_THIRDPARTY_DIR . '/tinymce'
*
* @config * @config
* @var string * @var string
*/ */
private static $base_dir = 'framework/admin/thirdparty/tinymce'; private static $base_dir = null;
/** /**
* TinyMCE JS settings * TinyMCE JS settings
@ -366,7 +368,7 @@ class TinyMCEConfig extends HTMLEditorConfig {
// https://www.tinymce.com/docs/api/class/tinymce.editormanager/#baseURL // https://www.tinymce.com/docs/api/class/tinymce.editormanager/#baseURL
$tinyMCEBaseURL = Controller::join_links( $tinyMCEBaseURL = Controller::join_links(
Director::absoluteBaseURL(), Director::absoluteBaseURL(),
$this->config()->base_dir $this->config()->get('base_dir') ?: ADMIN_THIRDPARTY_DIR . '/tinymce'
); );
$settings['baseURL'] = $tinyMCEBaseURL; $settings['baseURL'] = $tinyMCEBaseURL;