Duplicate strings. "Modify Server" and "Modify a Server". Leaving only
[squirrelmail.git] / functions / imap_utf7_local.php
index 9515f21d6f12a3c115e0af1882a09d25feb5b103..c2c9ae538d97f1239848477a1e4c28cea8775b26 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * imap_general.php
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * This implements all functions that do general imap functions.
  */
 
 function imap_utf7_encode_local($s) {
+    global $languages, $squirrelmail_language;
+    
+    if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
+        function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
+        return $languages[$squirrelmail_language]['XTRA_CODE']('utf7-imap_encode', $s);
+    }
+    
        $b64_s = '';    // buffer for substring to be base64-encoded
        $utf7_s = '';   // imap-utf7-encoded string
        for ($i = 0; $i < strlen($s); $i++) {
@@ -45,6 +52,13 @@ function imap_utf7_encode_local($s) {
 }
 
 function imap_utf7_decode_local($s) {
+    global $languages, $squirrelmail_language;
+    
+    if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
+        function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) {
+        return $languages[$squirrelmail_language]['XTRA_CODE']('utf7-imap_decode', $s);
+    }
+    
        $b64_s = '';
        $iso_8859_1_s = '';
        for ($i = 0, $len = strlen($s); $i < $len; $i++) {
@@ -159,4 +173,4 @@ function decodeBASE64($s) {
        return $d;
 }
 
-?>
+?>
\ No newline at end of file