From d7de9d5a286b5a4c78c95dc6021028d11e815d5a Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sat, 26 Dec 2020 21:08:57 +0100 Subject: [PATCH] Menu manager: Legacy themes: Added some magic constant support --- e107_handlers/menumanager_class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e107_handlers/menumanager_class.php b/e107_handlers/menumanager_class.php index 7db14a011..9a393b8ff 100644 --- a/e107_handlers/menumanager_class.php +++ b/e107_handlers/menumanager_class.php @@ -2087,6 +2087,9 @@ class e_menu_layout $themeFileContent = str_replace("class ".$theme."_theme", "class ".$theme."__theme", $themeFileContent); // rename class to avoid conflicts while parsing. + $themeFileContent = str_replace('__DIR__', var_export(dirname($file), true), $themeFileContent); + $themeFileContent = str_replace('__FILE__', var_export($file, true), $themeFileContent); + try { @eval($themeFileContent);