From cfcb489cfa131a56e057e358b7041a7dd6dd71ab Mon Sep 17 00:00:00 2001 From: chrisaga Date: Sun, 9 Jul 2006 17:58:21 +0000 Subject: improve : evaluate {pwg_root} after any {themeconf:___} variable to allow using {pwg_root} in themeconf.inc.php usefull for including theme specific fix-ie5-ie6.css git-svn-id: http://piwigo.org/svn/trunk@1456 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/template.php') diff --git a/include/template.php b/include/template.php index 5f2cf7a2c..d93700b7a 100644 --- a/include/template.php +++ b/include/template.php @@ -328,11 +328,11 @@ class Template { */ function compile($code, $do_not_echo = false, $retvar = '') { - $code = preg_replace('/\{pwg_root\}/e', "get_root_url()", $code); // PWG specific : communication between template and $lang $code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code); // PWG specific : expand themeconf.inc.php variables $code = preg_replace('/\{themeconf:([^}]+)\}/e', "get_themeconf('$1')", $code); + $code = preg_replace('/\{pwg_root\}/e', "get_root_url()", $code); // replace \ with \\ and then ' with \'. $code = str_replace('\\', '\\\\', $code); -- cgit v1.2.3