1
0
Fork 0
mirror of https://gitlab.easter-eggs.com/ee/ldapsaisie.git synced 2024-12-22 16:33:48 +01:00

LStemplate: rollback from array class constant to class variables to restore PHP < 7

This commit is contained in:
Benjamin Renard 2023-01-03 15:32:03 +01:00
parent a3fc7bacfa
commit d80c15acc1

View file

@ -123,7 +123,7 @@ class LStemplate extends LSlog_staticLoggerClass {
* Deprecated templates files
* @var array<string>
*/
private const deprecated_template_files = array (
private static $deprecated_template_files = array (
'accueil.tpl', 'blank.tpl', 'empty.tpl',
'top.tpl', 'bottom.tpl',
);
@ -334,7 +334,7 @@ class LStemplate extends LSlog_staticLoggerClass {
* @return string The path of the Smarty template file
**/
public static function getTemplatePath($template, $with_nocache=false) {
if (in_array($template, self :: deprecated_template_files))
if (in_array($template, self :: $deprecated_template_files))
self :: log_fatal(
getFData(
_("LStemplate : Request template '%{tpl}' is now deprecated. Please refer to upgrade documentation to adapt your templates."),