Browse Source

Ajout de constantes dans getModules()

10504
SylvainLelievre 4 months ago
parent
commit
1d75d17e4d
  1. 27
      core/class/helper.class.php

27
core/class/helper.class.php

@ -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);
}
}
}
Loading…
Cancel
Save