[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[14359] branches/SM-1_4-STABLE/squirrelmail/ functions
From:       kink () users ! sourceforge ! net
Date:       2013-05-16 12:14:49
Message-ID: E1Ucx57-0007Zi-5w () sfp-svn-4 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 14359
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=14359&view=rev
Author:   kink
Date:     2013-05-16 12:14:48 +0000 (Thu, 16 May 2013)
Log Message:
-----------
Remove use of deprecated /e modifier in preg_replace.

This modifier starts generating Deprecated notices from PHP 5.5.

Modified Paths:
--------------
    branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php
    branches/SM-1_4-STABLE/squirrelmail/functions/decode/us_ascii.php
    branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1251.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1255.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1256.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_1.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_15.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_2.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_7.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_9.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_r.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_u.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/tis_620.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/us_ascii.php
    branches/SM-1_4-STABLE/squirrelmail/functions/encode/utf_8.php
    branches/SM-1_4-STABLE/squirrelmail/functions/mime.php

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/decode/iso_8859_1.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -23,12 +23,16 @@
     if (! sq_is8bit($string,'iso-8859-1'))
         return $string;
 
-    $string = preg_replace("/([\201-\237])/e","'&#' . ord('\\1') . ';'",$string);
+    $string = preg_replace_callback("/([\201-\237])/",
+    create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';'),
+    $string);
 
     /* I don't want to use 0xA0 (\240) in any ranges. RH73 may dislike it */
     $string = str_replace("\240", ' ', $string);
 
-    $string = preg_replace("/([\241-\377])/e","'&#' . ord('\\1') . ';'",$string);
+    $string = preg_replace_callback("/([\241-\377])/",
+    create_function ('$matches', 'return \'&#\' . ord($matches[1]) . \';\';'),
+    $string);
     return $string;
 }
 

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/decode/us_ascii.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/decode/us_ascii.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/decode/us_ascii.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -26,11 +26,11 @@
     if (! sq_is8bit($string,'us-ascii'))
         return $string;
 
-    $string = preg_replace("/([\201-\237])/e","'?'",$string);
+    $string = preg_replace("/([\201-\237])/","'?'",$string);
 
     /* I don't want to use 0xA0 (\240) in any ranges. RH73 may dislike it */
     $string = str_replace("\240", '?', $string);
 
-    $string = preg_replace("/([\241-\377])/e","'?'",$string);
+    $string = preg_replace("/([\241-\377])/","'?'",$string);
     return $string;
 }

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/decode/utf_8.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -60,31 +60,31 @@
 
     // decode six byte unicode characters
     /* (i think currently there is no such symbol)
-    $string = preg_replace("/([\374-\375])([\200-\277])([\200-\277])([\200-\277])([\200-\277])([\200-\277])/e",
                
-    "'&#'.((ord('\\1')-252)*1073741824+(ord('\\2')-200)*16777216+(ord('\\3')-200)*262144+(ord('\\4')-128)*4096+(ord('\\5')-128)*64+(ord('\\6')-128)).';'",
 +    $string = preg_replace_callback("/([\374-\375])([\200-\277])([\200-\277])([\200-\277])([\200-\277])([\200-\277])/",
 +    create_function ('$matches', 'return \
\'&#\'.((ord($matches[1])-252)*1073741824+(ord($matches[2])-200)*16777216+(ord($matche \
s[3])-200)*262144+(ord($matches[4])-128)*4096+(ord($matches[5])-128)*64+(ord($matches[6])-128)).\';\';'),
  $string);
     */
 
     // decode five byte unicode characters
     /* (i think currently there is no such symbol)
-    $string = preg_replace("/([\370-\373])([\200-\277])([\200-\277])([\200-\277])([\200-\277])/e",
                
-    "'&#'.((ord('\\1')-248)*16777216+(ord('\\2')-200)*262144+(ord('\\3')-128)*4096+(ord('\\4')-128)*64+(ord('\\5')-128)).';'",
 +    $string = preg_replace_callback("/([\370-\373])([\200-\277])([\200-\277])([\200-\277])([\200-\277])/",
 +    create_function ('$matches', 'return \
\'&#\'.((ord($matches[1])-248)*16777216+(ord($matches[2])-200)*262144+(ord($matches[3])-128)*4096+(ord($matches[4])-128)*64+(ord($matches[5])-128)).\';\';'),
  $string);
     */
-
+    
     // decode four byte unicode characters
-    $string = preg_replace("/([\360-\367])([\200-\277])([\200-\277])([\200-\277])/e",
                
-    "'&#'.((ord('\\1')-240)*262144+(ord('\\2')-128)*4096+(ord('\\3')-128)*64+(ord('\\4')-128)).';'",
 +    $string = preg_replace_callback("/([\360-\367])([\200-\277])([\200-\277])([\200-\277])/",
 +    create_function ('$matches', 'return \
\'&#\'.((ord($matches[1])-240)*262144+(ord($matches[2])-128)*4096+(ord($matches[3])-128)*64+(ord($matches[4])-128)).\';\';'),
  $string);
 
     // decode three byte unicode characters
-    $string = preg_replace("/([\340-\357])([\200-\277])([\200-\277])/e",
-    "'&#'.((ord('\\1')-224)*4096+(ord('\\2')-128)*64+(ord('\\3')-128)).';'",
+    $string = preg_replace_callback("/([\340-\357])([\200-\277])([\200-\277])/",
+    create_function ('$matches', 'return \
\'&#\'.((ord($matches[1])-224)*4096+(ord($matches[2])-128)*64+(ord($matches[3])-128)).\';\';'),
  $string);
 
     // decode two byte unicode characters
-    $string = preg_replace("/([\300-\337])([\200-\277])/e",
-    "'&#'.((ord('\\1')-192)*64+(ord('\\2')-128)).';'",
+    $string = preg_replace_callback("/([\300-\337])([\200-\277])/",
+    create_function ('$matches', 'return \
\'&#\'.((ord($matches[1])-192)*64+(ord($matches[2])-128)).\';\';'),  $string);
 
     // remove broken unicode

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1251.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1251.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1251.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetocp1251('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/", 'unicodetocp1251', $string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/cp1251.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string cp1251 character
  */
-function unicodetocp1251($var) {
+function unicodetocp1251($matches) {
+    $var = $matches[1];
 
     $cp1251chars=array('160' => "\xA0",
                        '164' => "\xA4",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1255.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1255.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1255.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetocp1255('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetocp1255',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/cp1255.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string cp1255 character
  */
-function unicodetocp1255($var) {
+function unicodetocp1255($matches) {
+    $var = $matches[1];
 
     $cp1255chars=array('160' => "\xA0",
                        '161' => "\xA1",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1256.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1256.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/cp1256.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetocp1256('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetocp1256',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/cp1256.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string cp1256 character
  */
-function unicodetocp1256($var) {
+function unicodetocp1256($matches) {
+    $var = $matches[1];
 
     $cp1256chars=array('160' => "\xA0",
                        '162' => "\xA2",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_1.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_1.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_1.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88591('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetoiso88591',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/iso_8859_1.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string iso-8859-1 character
  */
-function unicodetoiso88591($var) {
+function unicodetoiso88591($matches) {
+    $var = $matches[1];
 
     if ($var < 256) {
         $ret = chr ($var);

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_15.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_15.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_15.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetoiso885915('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetoiso885915',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/iso_8859_15.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string iso-8859-15 character
  */
-function unicodetoiso885915($var) {
+function unicodetoiso885915($matches) {
+    $var = $matches[1];
 
     $iso885915chars=array('160' => "\xA0",
                           '161' => "\xA1",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_2.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_2.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_2.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88592('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetoiso88592',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/iso_8859_2.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string iso-8859-2 character
  */
-function unicodetoiso88592($var) {
+function unicodetoiso88592($matches) {
+    $var = $matches[1];
 
     $iso88592chars=array('160' => "\xA0",
                         '164' => "\xA4",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_7.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_7.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_7.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88597('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetoiso88597',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/iso_8859_7.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string iso-8859-7 character
  */
-function unicodetoiso88597($var) {
+function unicodetoiso88597($matches) {
+    $var = $matches[1];
 
     $iso88597chars=array('160' => "\xA0",
                          '163' => "\xA3",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_9.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_9.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/iso_8859_9.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88599('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetoiso88599',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/iso_8859_9.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string iso-8859-9 character
  */
-function unicodetoiso88599($var) {
+function unicodetoiso88599($matches) {
+    $var = $matches[1];
 
     $iso88599chars=array('160' => "\xA0",
                          '161' => "\xA1",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_r.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_r.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_r.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetokoi8r('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetokoi8r',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/koi8_r.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string koi8-r character
  */
-function unicodetokoi8r($var) {
+function unicodetokoi8r($matches) {
+    $var = $matches[1];
 
     $koi8rchars=array('160' => "\x9A",
                       '169' => "\xBF",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_u.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_u.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/koi8_u.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetokoi8u('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetokoi8u',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/koi8_u.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string koi8-u character
  */
-function unicodetokoi8u($var) {
+function unicodetokoi8u($matches) {
+    $var = $matches[1];
 
     $koi8uchars=array('160' => "\x9A",
                       '169' => "\xBF",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/tis_620.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/tis_620.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/tis_620.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetotis620('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetotis620',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/tis_620.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string tis-620 character
  */
-function unicodetotis620($var) {
+function unicodetotis620($matches) {
+    $var = $matches[1];
 
     $tis620chars=array('3585' => "\xA1",
                        '3586' => "\xA2",

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/us_ascii.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/us_ascii.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/us_ascii.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -22,7 +22,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetousascii('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetousascii',$string);
 
     return $string;
 }
@@ -35,10 +35,11 @@
  * Don't use it or make sure, that functions/encode/us_ascii.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string us-ascii character
  */
-function unicodetousascii($var) {
+function unicodetousascii($matches) {
+    $var = $matches[1];
 
     if ($var < 128) {
         $ret = chr ($var);

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/encode/utf_8.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/encode/utf_8.php	2013-05-15 \
                20:33:11 UTC (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/encode/utf_8.php	2013-05-16 \
12:14:48 UTC (rev 14359) @@ -26,7 +26,7 @@
    // don't run encoding function, if there is no encoded characters
    if (! preg_match("'&#[0-9]+;'",$string) ) return $string;
 
-    $string=preg_replace("/&#([0-9]+);/e","unicodetoutf8('\\1')",$string);
+    $string=preg_replace_callback("/&#([0-9]+);/",'unicodetoutf8',$string);
 
     return $string;
 }
@@ -39,10 +39,11 @@
  * Don't use it or make sure, that functions/encode/utf_8.php is
  * included.
  *
- * @param int $var decimal unicode value
+ * @param array $matches array with first element a decimal unicode value
  * @return string utf8 character
  */
-function unicodetoutf8($var) {
+function unicodetoutf8($matches) {
+    $var = $matches[1];
 
     if ($var < 128) {
         $ret = chr ($var);

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/mime.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/mime.php	2013-05-15 20:33:11 UTC \
                (rev 14358)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/mime.php	2013-05-16 12:14:48 UTC \
(rev 14359) @@ -708,7 +708,8 @@
                     break;
                 case 'Q':
                     $replace = str_replace('_', ' ', $res[4]);
-                    $replace = preg_replace('/=([0-9a-f]{2})/ie', \
'chr(hexdec("\1"))', +                    $replace = \
preg_replace_callback('/=([0-9a-f]{2})/i', +                            \
create_function ('$matches', 'return chr(hexdec($matches[1]));'),  $replace);
                     if ($can_be_encoded) {
                         // string is converted from one charset to another. \
sanitizing depends on $htmlsave

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic