Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Sep 2012 16:41:30 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r303979 - head/mail/squirrelmail/files
Message-ID:  <201209091641.q89GfU9M007378@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Sun Sep  9 16:41:29 2012
New Revision: 303979
URL: http://svn.freebsd.org/changeset/ports/303979

Log:
  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.

Added:
  head/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php   (contents, props changed)

Added: head/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/squirrelmail/files/patch-plugins-mail_fetch-functions.php	Sun Sep  9 16:41:29 2012	(r303979)
@@ -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 ) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209091641.q89GfU9M007378>