* allow comments inside plugin json file

* updated German translation (by German native speaker)
This commit is contained in:
slawkens
2018-01-08 16:15:34 +01:00
parent f29758939c
commit 5aa1ae003e
6 changed files with 59 additions and 32 deletions

View File

@@ -74,7 +74,7 @@ else if(isset($_FILES["plugin"]["name"]))
warning($warning);
}
$info = Plugins::getPluginInfo();
$info = Plugins::getPlugin();
success((isset($info['name']) ? '<strong>' . $info['name'] . '</strong> p' : 'P') . 'lugin has been successfully installed.');
}
else {
@@ -101,6 +101,7 @@ $plugins = array();
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');