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:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -9,7 +9,7 @@ class Plugins
|
||||
$rootpath = getcwd();
|
||||
$pluginFolder = self::scanPluginFolder($rootpath);
|
||||
$classNames = [];
|
||||
|
||||
|
||||
# iterate over plugin folders
|
||||
foreach($pluginFolder as $plugin)
|
||||
{
|
||||
|
@@ -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';
|
||||
|
@@ -58,7 +58,6 @@ $settings = $settingsModel->loadSettings();
|
||||
/****************************
|
||||
* HANDLE DISPLAY ERRORS *
|
||||
****************************/
|
||||
|
||||
if(isset($settings['displayErrorDetails']) && $settings['displayErrorDetails'])
|
||||
{
|
||||
ini_set('display_errors', 1);
|
||||
|
Reference in New Issue
Block a user