aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-22 17:25:58 -0800
committerFriendika <info@friendika.com>2010-12-22 17:25:58 -0800
commitf2242826d84c9b72810345816831ddfb05e15422 (patch)
tree3abe5fabf97fe3d61ac378797fbd2bbb6dba6b4b /boot.php
parentb302012581143285f8354d8af76185372f707493 (diff)
downloadvolse-hubzilla-f2242826d84c9b72810345816831ddfb05e15422.tar.gz
volse-hubzilla-f2242826d84c9b72810345816831ddfb05e15422.tar.bz2
volse-hubzilla-f2242826d84c9b72810345816831ddfb05e15422.zip
warnings when no plugins installed
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php29
1 files changed, 17 insertions, 12 deletions
diff --git a/boot.php b/boot.php
index de1669439..7e630eba8 100644
--- a/boot.php
+++ b/boot.php
@@ -430,6 +430,8 @@ function check_config(&$a) {
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
if(count($r))
$installed = $r;
+ else
+ $installed = array();
$plugins = get_config('system','addon');
$plugins_arr = array();
@@ -438,21 +440,24 @@ function check_config(&$a) {
$plugins_arr = explode(',',str_replace(' ', '',$plugins));
$installed_arr = array();
- foreach($installed as $i) {
- if(! in_array($i['name'],$plugins_arr)) {
- logger("Addons: uninstalling " . $i['name']);
- q("DELETE FROM `addon` WHERE `id` = %d LIMIT 1",
- intval($i['id'])
- );
- @include_once('addon/' . $i['name'] . '/' . $i['name'] . '.php');
- if(function_exists($i['name'] . '_uninstall')) {
- $func = $i['name'] . '_uninstall';
- $func();
+ if(count($installed)) {
+ foreach($installed as $i) {
+ if(! in_array($i['name'],$plugins_arr)) {
+ logger("Addons: uninstalling " . $i['name']);
+ q("DELETE FROM `addon` WHERE `id` = %d LIMIT 1",
+ intval($i['id'])
+ );
+
+ @include_once('addon/' . $i['name'] . '/' . $i['name'] . '.php');
+ if(function_exists($i['name'] . '_uninstall')) {
+ $func = $i['name'] . '_uninstall';
+ $func();
+ }
}
+ else
+ $installed_arr[] = $i['name'];
}
- else
- $installed_arr[] = $i['name'];
}
if(count($plugins_arr)) {