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 { } else {
$version = '0.0'; $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 // Affection
$modules [$value] = [ $modules [$value] = [
'realName' => $realName, 'realName' => $realName,
'version' => $version 'version' => $version,
'update' => $update,
'delete' => $delete,
'dataDirectory' => $dataDirectory
]; ];
} catch (Exception $e){ } catch (Exception $e){
@ -550,4 +571,4 @@ class helper {
return openssl_decrypt($encrypted_data, 'aes-256-cbc', $key, 0, $iv); return openssl_decrypt($encrypted_data, 'aes-256-cbc', $key, 0, $iv);
} }
} }