* don't install plugin when requirements are not satisfied

This commit is contained in:
slawkens
2020-02-15 22:41:52 +01:00
parent 2a9c28e63b
commit 518ae4d97a
5 changed files with 239 additions and 237 deletions

View File

@@ -69,7 +69,7 @@ if (isset($_REQUEST['uninstall'])) {
warning($warning);
}
$info = Plugins::getPlugin();
$info = Plugins::getPluginJson();
success((isset($info['name']) ? '<strong>' . $info['name'] . '</strong> p' : 'P') . 'lugin has been successfully installed.');
} else {
$error = Plugins::getError();
@@ -93,6 +93,7 @@ foreach (get_plugins() as $plugin) {
$string = file_get_contents(BASE . 'plugins/' . $plugin . '.json');
$string = Plugins::removeComments($string);
$plugin_info = json_decode($string, true);
if ($plugin_info == false) {
warning('Cannot load plugin info ' . $plugin . '.json');
} else {