From b5096a3384c7651508fa188c2ef2e4678df28d57 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 29 Apr 2017 14:14:23 -0700 Subject: [PATCH] Issue #2584 - Bootstrap Snippets path. --- e107_plugins/tinymce4/wysiwyg.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index edd536616..b79889dd2 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -935,7 +935,17 @@ class wysiwyg $customPath = THEME."templates/tinymce/snippets"; - $path = is_dir($customPath) ? $customPath : e_PLUGIN."tinymce4/snippets"; + if(is_dir($customPath)) + { + $path = $customPath; + $base = THEME_ABS."templates/tinymce/snippets"; + } + else + { + $path = e_PLUGIN."tinymce4/snippets"; + $base = e_PLUGIN_ABS."tinymce4/snippets"; + } + $files = e107::getFile()->get_files($path); @@ -948,7 +958,8 @@ class wysiwyg if(!empty($m[1])) { // $url = e_PLUGIN_ABS."tinymce4/snippets/".$f['fname']; - $url =$path."/".$f['fname']; + + $url = $base."/".$f['fname']; $ret[] = array('title'=>trim($m[1]), 'url'=>$url, 'description'=>trim($m[2])); } }