aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php4
-rw-r--r--index.php7
2 files changed, 9 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 9d41abec4..f1edf798e 100644
--- a/boot.php
+++ b/boot.php
@@ -195,7 +195,7 @@ class App {
public $hooks;
public $timezone;
public $interactive = true;
-
+ public $plugins;
private $scheme;
private $hostname;
@@ -478,6 +478,8 @@ function check_config(&$a) {
if($plugins)
$plugins_arr = explode(',',str_replace(' ', '',$plugins));
+ $a->plugins = $plugins_arr;
+
$installed_arr = array();
if(count($installed)) {
diff --git a/index.php b/index.php
index 5f128ebb1..d0de1b9dc 100644
--- a/index.php
+++ b/index.php
@@ -134,7 +134,12 @@ else
if(strlen($a->module)) {
- if(file_exists("mod/{$a->module}.php")) {
+ if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) {
+ include("addon/{$a->module}/{$a->module}.php");
+ if(function_exists($a->module . '_module'))
+ $a->module_loaded = true;
+ }
+ if((! $a->module_loaded) && (file_exists("mod/{$a->module}.php"))) {
include("mod/{$a->module}.php");
$a->module_loaded = true;
}