diff options
author | chrisaga <chrisaga@piwigo.org> | 2006-03-25 17:29:03 +0000 |
---|---|---|
committer | chrisaga <chrisaga@piwigo.org> | 2006-03-25 17:29:03 +0000 |
commit | d2ac744489542a33a69d998bc34c43a60c5b8c7e (patch) | |
tree | 98999ec5b15b312c0dbd506f7d74b813afe2899e /include | |
parent | 587974e54f507325d3fc93e69aeca62a60c66346 (diff) |
-improvement : function l10n renamed raw_l10n, new function l10n uses raw_l10n and returns a string with
all html entities transcoded. We should use l10n everywere instead of $lang['...']
git-svn-id: http://piwigo.org/svn/trunk@1102 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.inc.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index e09c12589..47eed7c7c 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -747,7 +747,7 @@ function get_name_from_file($filename) * @param string key * @return string */ -function l10n($key) +function raw_l10n($key) { global $lang, $conf; @@ -758,6 +758,16 @@ function l10n($key) return isset($lang[$key]) ? $lang[$key] : $key; } +/** + * Like l10n but converts html entities + * + * @param string key + * @return string + */ +function l10n($key) +{ + return htmlentities(raw_l10n($key),ENT_QUOTES); +} /** * returns the corresponding value from $themeconf if existing. Else, the |