* moved spells to twig template

* removed useless spells.spell column that was duplicate of spells.words
* Usage_Statistics reports now plugin version too
* (internal) removed $hook_types array, using defined() and constant() functions now
* (internal) optimized Spells class
This commit is contained in:
slawkens
2017-10-20 10:52:55 +02:00
parent 913b4297cf
commit f9b6e9fa2e
9 changed files with 236 additions and 246 deletions

View File

@@ -97,7 +97,16 @@ WHERE TABLE_SCHEMA = "forgottenserver";');
}
$ret['locales'] = get_locales();
$ret['plugins'] = get_plugins();
$ret['plugins'] = array();
foreach(get_plugins() as $plugin) {
$string = file_get_contents(BASE . 'plugins/' . $plugin . '.json');
$plugin_info = json_decode($string, true);
if($plugin_info != false) {
if(isset($plugin_info['version'])) {
$ret['plugins'][$plugin] = $plugin_info['version'];
}
}
}
$ret['templates'] = get_templates();
$ret['date_timezone'] = $config['date_timezone'];