- direct communication between templates and language items, without needing

a mapping in the PHP code.


git-svn-id: http://piwigo.org/svn/trunk@794 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2005-06-21 19:32:17 +00:00
parent 743efaf112
commit a86321eab5
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -1,3 +1,8 @@
2005-06-21 Pierrick LE GALL
* direct communication between templates and language items,
without needing a mapping in the PHP code.
2005-06-21 Pierrick LE GALL
* new function get_name_from_file to centralize the construction
+3
View File
@@ -330,6 +330,9 @@ class Template {
// replace \ with \\ and then ' with \'.
$code = str_replace('\\', '\\\\', $code);
$code = str_replace('\'', '\\\'', $code);
// PWG specific : communication between template and $lang
$code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code);
// change template varrefs into PHP varrefs