Corrige la récupération d'un module

This commit is contained in:
Clement Desmidt 2016-11-21 23:03:59 +01:00
parent 835fbf8a46
commit 56e63ed73e

View File

@ -61,10 +61,10 @@ class AccueilModules
*/
public static function getModule($module)
{
if ($config = simplexml_load_file('../' . self::CONFIG_FILE)) {
$config_xml = $config->item;
foreach ($config_xml as $item) {
if ($item["id"] == $module) {
if ($config = simplexml_load_file(__DIR__.'/../'.self::CONFIG_FILE)) {
foreach ($config->item as $item) {
$item_id = (string) $item['id'];
if ($item_id == $module) {
$params = array();
foreach ($item as $confParam) {
$params[$confParam->getName()] = "$confParam";