aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2012-09-10 00:41:29 +0800
committeradamw <adamw@FreeBSD.org>2012-09-10 00:41:29 +0800
commitec98e08c133aa1d04db4cd34bd38390bf07c1eea (patch)
treee414db5bd8cb8017a69415a1b930c012fb75d41a /mail
parent4b26502babb4e3e6f6f9034e30b365efa57a5722 (diff)
downloadfreebsd-ports-gnome-ec98e08c133aa1d04db4cd34bd38390bf07c1eea.tar.gz
freebsd-ports-gnome-ec98e08c133aa1d04db4cd34bd38390bf07c1eea.tar.zst
freebsd-ports-gnome-ec98e08c133aa1d04db4cd34bd38390bf07c1eea.zip
Don't clobber php54's hex2bin(). This resolves a compatability issue
between squirrelmail and php54, though others remain. This patch was adapted from the squirrelmail SVN repo.
Diffstat (limited to 'mail')
-rw-r--r--mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php b/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php
new file mode 100644
index 000000000000..bb1d04ce9e7d
--- /dev/null
+++ b/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php
@@ -0,0 +1,33 @@
+--- plugins/mail_fetch/functions.php.old 2012-09-08 17:58:39.000000000 -0400
++++ plugins/mail_fetch/functions.php 2012-09-08 18:01:06.000000000 -0400
+@@ -92,15 +92,22 @@
+ return '';
+ }
+
+-function hex2bin( $data ) {
+- /* Original code by josh@superfork.com */
++/**
++ * hex2bin - convert a hexadecimal string into binary
++ * Part of php54, so don't try to clobber it
++ */
++if ( ! function_exists('hex2bin') ) {
++ function hex2bin( $data ) {
+
+- $len = strlen($data);
+- $newdata = '';
+- for( $i=0; $i < $len; $i += 2 ) {
+- $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) );
+- }
+- return $newdata;
++ /* Original code by josh@superfork.com */
++
++ $len = strlen($data);
++ $newdata = '';
++ for( $i=0; $i < $len; $i += 2 ) {
++ $newdata .= pack( "C", hexdec( substr( $data, $i, 2) ) );
++ }
++ return $newdata;
++ }
+ }
+
+ function mf_keyED( $txt ) {