warnings when no plugins installed

This commit is contained in:
Friendika 2010-12-22 17:25:58 -08:00
parent b302012581
commit f2242826d8

View file

@ -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,6 +440,8 @@ function check_config(&$a) {
$plugins_arr = explode(',',str_replace(' ', '',$plugins));
$installed_arr = array();
if(count($installed)) {
foreach($installed as $i) {
if(! in_array($i['name'],$plugins_arr)) {
logger("Addons: uninstalling " . $i['name']);
@ -454,6 +458,7 @@ function check_config(&$a) {
else
$installed_arr[] = $i['name'];
}
}
if(count($plugins_arr)) {
foreach($plugins_arr as $p) {