1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-09 07:36:34 +02:00

fix and unify plugin load logic

This commit is contained in:
trendschau
2023-11-11 21:25:58 +01:00
parent d189f7918e
commit f21434bb72
6 changed files with 21 additions and 21 deletions

View File

@@ -91,7 +91,7 @@ class Assets
public function activateVue()
{
$vueUrl = '<script src="' . $this->baseUrl . '/system/author/js/vue.js"></script>';
$vueUrl = '<script src="' . $this->baseUrl . '/system/typemill/author/js/vue.js"></script>';
if(!in_array($vueUrl, $this->JS))
{
$this->JS[] = $vueUrl;
@@ -100,7 +100,7 @@ class Assets
public function activateAxios()
{
$axiosUrl = '<script src="' . $this->baseUrl . '/system/author/js/axios.min.js"></script>';
$axiosUrl = '<script src="' . $this->baseUrl . '/system/typemill/author/js/axios.min.js"></script>';
if(!in_array($axiosUrl, $this->JS))
{
$this->JS[] = $axiosUrl;

View File

@@ -128,18 +128,14 @@ class Extension
public function getPlugins()
{
$pluginFolder = $this->storage->getFolderPath('pluginsFolder');
$pluginFolderC = scandir($pluginFolder);
$plugins = [];
foreach ($pluginFolderC as $key => $plugin)
$pluginlist = \Typemill\Static\Plugins::loadPlugins();
$plugins = [];
foreach($pluginlist as $plugin)
{
if (!in_array($plugin, [".",".."]))
{
if (is_dir($pluginFolder . DIRECTORY_SEPARATOR . $plugin))
{
$plugins[] = $plugin;
}
}
$plugins[] = $plugin['name'];
}
return $plugins;

View File

@@ -9,7 +9,7 @@ class Plugins
$rootpath = getcwd();
$pluginFolder = self::scanPluginFolder($rootpath);
$classNames = [];
# iterate over plugin folders
foreach($pluginFolder as $plugin)
{

View File

@@ -139,6 +139,11 @@ const app = Vue.createApp({
methods: {
getActiveClass(pluginname)
{
if(typeof this.formData[pluginname] == "undefined")
{
console.info(pluginname);
return;
}
if(this.formData[pluginname]['active'])
{
return 'bg-stone-200 dark:bg-stone-900';

View File

@@ -58,7 +58,6 @@ $settings = $settingsModel->loadSettings();
/****************************
* HANDLE DISPLAY ERRORS *
****************************/
if(isset($settings['displayErrorDetails']) && $settings['displayErrorDetails'])
{
ini_set('display_errors', 1);