Ajout de constantes dans getModules()

This commit is contained in:
SylvainLelievre 2021-02-15 13:38:23 +01:00
parent 2393a17742
commit 1d75d17e4d

View File

@ -157,10 +157,31 @@ class helper {
} else {
$version = '0.0';
}
// Constante UPDATE
if (array_key_exists('UPDATE', $class_constants)) {
$update = $value::UPDATE;
} else {
$update = false;
}
// Constante DELETE
if (array_key_exists('DELETE', $class_constants)) {
$delete = $value::DELETE;
} else {
$delete = false;
}
// Constante DATADIRECTORY
if (array_key_exists('DATADIRECTORY', $class_constants)) {
$dataDirectory= $value::DATADIRECTORY;
} else {
$dataDirectory = '';
}
// Affection
$modules [$value] = [
'realName' => $realName,
'version' => $version
'realName' => $realName,
'version' => $version,
'update' => $update,
'delete' => $delete,
'dataDirectory' => $dataDirectory
];
} catch (Exception $e){
@ -550,4 +571,4 @@ class helper {
return openssl_decrypt($encrypted_data, 'aes-256-cbc', $key, 0, $iv);
}
}
}