Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Fix save template path for plugin templates

givanz8e4bd2a43511
diff --git a/admin/controller/editor/editor.php b/admin/controller/editor/editor.php
index 1b9370e..1a2eda0 100755
--- a/admin/controller/editor/editor.php
+++ b/admin/controller/editor/editor.php
@@ -95,7 +95,7 @@ class Editor extends Base {
foreach (['inputs', 'components', 'blocks', 'sections'] as $type) {
$$type = [];
- $glob = glob("$themeFolder/$type/*.js", GLOB_BRACE);
+ $glob = glob("$themeFolder/$type/*.js");
foreach ($glob as &$file) {
$base = str_replace('.js', '', basename($file));
@@ -358,8 +358,8 @@ class Editor extends Base {
}
}
- //if absolute path then this might be a plugin template, save to public
- if ($page[0] == '/') {
+ //if plugins template use public path
+ if (substr_compare($page[0],'/plugins/', 0, 9) === 0) {
$fileName = DIR_PUBLIC . DS . $page;
} else {
$fileName = $themeFolder . DS . $page;