diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php
index e514748e..9d2a1c46 100644
--- a/bl-kernel/abstract/plugin.class.php
+++ b/bl-kernel/abstract/plugin.class.php
@@ -191,6 +191,10 @@ class Plugin
return $this->getMetadata('releaseDate');
}
+ public function isModule() {
+ return $this->getMetadata('isModule');
+ }
+
public function className()
{
return $this->className;
diff --git a/bl-kernel/admin/views/plugins.php b/bl-kernel/admin/views/plugins.php
index ec8a6cb9..ee659935 100644
--- a/bl-kernel/admin/views/plugins.php
+++ b/bl-kernel/admin/views/plugins.php
@@ -37,7 +37,7 @@ echo '
// Show installed plugins
foreach ($pluginsInstalled as $plugin) {
- if ($plugin->type() == 'theme' || $plugin->type() == 'widget') {
+ if ($plugin->type() == 'theme' || $plugin->type() == 'widget' || $plugin->isModule()) {
// Do not display theme's plugins
continue;
}
diff --git a/bl-kernel/boot/rules/60.plugins.php b/bl-kernel/boot/rules/60.plugins.php
index 484bd7d0..87a80198 100644
--- a/bl-kernel/boot/rules/60.plugins.php
+++ b/bl-kernel/boot/rules/60.plugins.php
@@ -77,9 +77,9 @@ function buildPlugins($path, $autoActivate = false)
$Plugin = new $pluginClass;
// Check if the plugin is translated
- $languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.$site->language().'.json';
+ $languageFilename = $path.$Plugin->directoryName().DS.'languages'.DS.$site->language().'.json';
if (!Sanitize::pathFile($languageFilename)) {
- $languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.DEFAULT_LANGUAGE_FILE;
+ $languageFilename = $path.$Plugin->directoryName().DS.'languages'.DS.DEFAULT_LANGUAGE_FILE;
}
$database = file_get_contents($languageFilename);
@@ -88,6 +88,7 @@ function buildPlugins($path, $autoActivate = false)
// Set name and description from the language file
$Plugin->setMetadata('name',$database['plugin-data']['name']);
$Plugin->setMetadata('description',$database['plugin-data']['description']);
+ $Plugin->setMetadata('isModule',$autoActivate);
// Remove name and description from the language file loaded and add new words if there are
// This function overwrite the key=>value