diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index bfc290b69..f399d3d12 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -526,7 +526,7 @@ class e_plugin $path = $row['plugin_path']; - if(!in_array($path,$detected)) + if(!empty($detected) && !in_array($path,$detected)) { $toRemove[] = (int) $row['plugin_id']; continue; @@ -542,6 +542,7 @@ class e_plugin if(!isset($pref[$path])) { $cfg->setPref('plug_installed/'.$path, $row['plugin_version']); + e107::getAdminLog()->addDebug($path)->save("plug_installed pref updated"); $save = true; } } @@ -565,7 +566,8 @@ class e_plugin if($sql->delete('plugin', "plugin_id IN (".$delList.")")) { - e107::getDebug()->log("Deleted missing plugins with id(s): ".$delList); + e107::getAdminLog()->addDebug("Deleted missing plugins with id(s): ".$delList)->save("Plugin Table Updated"); + // e107::getDebug()->log("Deleted missing plugins with id(s): ".$delList); } } @@ -585,6 +587,7 @@ class e_plugin if(!$id = $sql->insert('plugin',$row)) { e107::getDebug()->log("Unable to insert plugin data into table".print_a($row,true)); + e107::getAdminLog()->addDebug("Unable to insert plugin data into table".print_a($row,true))->save("plug_installed pref updated"); } else { @@ -593,6 +596,7 @@ class e_plugin $runUpdate = true; e107::getDebug()->log("Inserting plugin data into table".print_a($row,true)); + e107::getAdminLog()->addArray($row)->save("Plugin Table Entry Added"); if($row['plugin_installflag'] == 1) {