aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-06-17 22:56:35 +0000
committerrub <rub@piwigo.org>2006-06-17 22:56:35 +0000
commit7457a64443e25650728bcbe47f4649e21c04f4e6 (patch)
tree1f2404f7bec5e2eea871f0161a9db1cb23d58294 /include/functions.inc.php
parent006eecb3d663c6d37f370dc0402434fbc0422d7d (diff)
Issue ID 0000407: accents are not allowed in mail headers
git-svn-id: http://piwigo.org/svn/trunk@1361 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index f8f65c031..12fe7200d 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -819,6 +819,23 @@ function l10n($key)
}
/**
+ * Translate string in string ascii7bits
+ * It's possible to do that with iconv_substr but this fonction is not avaible on all the providers.
+ *
+ * @param string str
+ * @return string
+ */
+function str_translate_to_ascii7bits($str)
+{
+ global $lang_table_translate_ascii7bits;
+
+ $src_table = array_keys($lang_table_translate_ascii7bits);
+ $dst_table = array_values($lang_table_translate_ascii7bits);
+
+ return str_replace($src_table , $dst_table, $str);
+}
+
+/**
* returns the corresponding value from $themeconf if existing. Else, the
* key is returned
*