diff options
author | lawrance <lawrance@FreeBSD.org> | 2006-02-09 21:33:18 +0800 |
---|---|---|
committer | lawrance <lawrance@FreeBSD.org> | 2006-02-09 21:33:18 +0800 |
commit | af3a48d113a91c447f5883307e91918880b90264 (patch) | |
tree | 7fabbbacbc1bf8105da50ead59bf461bd831d4ea /mail/squirrelmail | |
parent | 5008fc60e79a61f07dbc85b54d125317c6e58b57 (diff) | |
download | freebsd-ports-gnome-af3a48d113a91c447f5883307e91918880b90264.tar.gz freebsd-ports-gnome-af3a48d113a91c447f5883307e91918880b90264.tar.zst freebsd-ports-gnome-af3a48d113a91c447f5883307e91918880b90264.zip |
Update to work with PHP5.
PR: ports/92892
Submitted by: Simon Dick <simond@irrelevant.org> (maintainer)
Diffstat (limited to 'mail/squirrelmail')
4 files changed, 107 insertions, 2 deletions
diff --git a/mail/squirrelmail/Makefile b/mail/squirrelmail/Makefile index 24e54b427828..36312f1c3601 100644 --- a/mail/squirrelmail/Makefile +++ b/mail/squirrelmail/Makefile @@ -7,7 +7,7 @@ PORTNAME= squirrelmail PORTVERSION?= 1.4.5 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= mail www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= squirrelmail @@ -69,7 +69,10 @@ post-patch: slaveport-post-patch ${WRKSRC}/src/search.php.orig \ ${WRKSRC}/class/mime/Rfc822Header.class.php.orig \ ${WRKSRC}/functions/imap_messages.php.orig \ - ${WRKSRC}/plugins/listcommands/setup.php.orig + ${WRKSRC}/plugins/listcommands/setup.php.orig \ + ${WRKSRC}/class/mime/Message.class.php.orig \ + ${WRKSRC}/class/deliver/Deliver.class.php.orig \ + ${WRKSRC}/functions/imap_general.php.orig .endif @${SED} -e "s;%%SQUIRRELDIR%%;${SQUIRRELDIR};g" \ ${MASTERDIR}/pkg-install > ${PKGINSTALL} diff --git a/mail/squirrelmail/files/patch-class-deliver-Deliver.class.php b/mail/squirrelmail/files/patch-class-deliver-Deliver.class.php new file mode 100644 index 000000000000..0162e47ec06b --- /dev/null +++ b/mail/squirrelmail/files/patch-class-deliver-Deliver.class.php @@ -0,0 +1,24 @@ +diff -u -r1.18.2.22 -r1.18.2.23 +--- class/deliver/Deliver.class.php 2005/06/03 19:51:11 1.18.2.22 ++++ class/deliver/Deliver.class.php 2005/07/20 09:00:08 1.18.2.23 +@@ -8,7 +8,7 @@ + * This contains all the functions needed to send messages through + * a delivery backend. + * +- * $Id: Deliver.class.php,v 1.18.2.22 2005/06/03 19:51:11 pdontthink Exp $ ++ * $Id: Deliver.class.php,v 1.18.2.23 2005/07/20 09:00:08 tokul Exp $ + * + * @author Marc Groot Koerkamp + * @package squirrelmail +@@ -447,7 +447,10 @@ + + /* Insert the rest of the header fields */ + $header[] = 'Message-ID: '. $message_id . $rn; +- if ($reply_rfc822_header->message_id) { ++ if (is_object($reply_rfc822_header) && ++ isset($reply_rfc822_header->message_id) && ++ $reply_rfc822_header->message_id) { ++ //if ($reply_rfc822_header->message_id) { + $rep_message_id = $reply_rfc822_header->message_id; + // $this->strip_crlf($message_id); + $header[] = 'In-Reply-To: '.$rep_message_id . $rn; diff --git a/mail/squirrelmail/files/patch-class-mime-Message.class.php b/mail/squirrelmail/files/patch-class-mime-Message.class.php new file mode 100644 index 000000000000..65d2a867072b --- /dev/null +++ b/mail/squirrelmail/files/patch-class-mime-Message.class.php @@ -0,0 +1,57 @@ +diff -u -r1.17.2.8 -r1.17.2.10 +--- class/mime/Message.class.php 2004/12/27 15:03:42 1.17.2.8 ++++ class/mime/Message.class.php 2005/07/21 15:41:05 1.17.2.10 +@@ -8,7 +8,7 @@ + * + This contains functions needed to handle mime messages. + * +- * $Id: Message.class.php,v 1.17.2.8 2004/12/27 15:03:42 kink Exp $ ++ * $Id: Message.class.php,v 1.17.2.10 2005/07/21 15:41:05 tokul Exp $ + */ + + class Message { +@@ -673,9 +673,9 @@ + } + } else { /* Treat as multipart/mixed */ + foreach ($this->entities as $ent) { +- if((strtolower($ent->header->disposition->name) != 'attachment') && +- (!isset($ent->header->parameters['filename'])) && +- (!isset($ent->header->parameters['name'])) && ++ if(!(is_object($ent->header->disposition) && strtolower($ent->header->disposition->name) == 'attachment') && ++ (!isset($ent->header->parameters['filename'])) && ++ (!isset($ent->header->parameters['name'])) && + (($ent->type0 != 'message') && ($ent->type1 != 'rfc822'))) { + $entity = $ent->findDisplayEntity($entity, $alt_order, $strict); + $found = true; +@@ -688,9 +688,10 @@ + foreach ($alt_order as $alt) { + if( ($alt == $type) && isset($this->entity_id) ) { + if ((count($this->entities) == 0) && +- (!isset($ent->header->parameters['filename'])) && +- (!isset($ent->header->parameters['name'])) && +- (strtolower($this->header->disposition->name) != 'attachment')) { ++ (!isset($this->header->parameters['filename'])) && ++ (!isset($this->header->parameters['name'])) && ++ (isset($this->header->disposition) && is_object($this->header->disposition) && ++ strtolower($this->header->disposition->name) != 'attachment')) { + $entity[] = $this->entity_id; + $found = true; + } +@@ -699,7 +700,7 @@ + } + if(!$found) { + foreach ($this->entities as $ent) { +- if((strtolower($ent->header->disposition->name) != 'attachment') && ++ if(!(is_object($ent->header->disposition) && strtolower($ent->header->disposition->name) == 'attachment') && + (($ent->type0 != 'message') && ($ent->type1 != 'rfc822'))) { + $entity = $ent->findDisplayEntity($entity, $alt_order, $strict); + $found = true; +@@ -711,7 +712,7 @@ + in_array($this->type1, array('plain', 'html', 'message')) && + isset($this->entity_id)) { + if (count($this->entities) == 0) { +- if (strtolower($this->header->disposition->name) != 'attachment') { ++ if (!is_object($this->header->disposition) || strtolower($this->header->disposition->name) != 'attachment') { + $entity[] = $this->entity_id; + } + } diff --git a/mail/squirrelmail/files/patch-functions-imap_general.php b/mail/squirrelmail/files/patch-functions-imap_general.php new file mode 100644 index 000000000000..e148c6ce0861 --- /dev/null +++ b/mail/squirrelmail/files/patch-functions-imap_general.php @@ -0,0 +1,21 @@ +diff -u -r1.140.2.29 -r1.140.2.30 +--- functions/imap_general.php 2005/05/20 10:37:34 1.140.2.29 ++++ functions/imap_general.php 2005/11/27 08:32:37 1.140.2.30 +@@ -8,7 +8,7 @@ + * + * This implements all functions that do general IMAP functions. + * +- * @version $Id: imap_general.php,v 1.140.2.29 2005/05/20 10:37:34 kink Exp $ ++ * @version $Id: imap_general.php,v 1.140.2.30 2005/11/27 08:32:37 tokul Exp $ + * @package squirrelmail + * @subpackage imap + */ +@@ -888,7 +888,7 @@ + * Saves a message to a given folder -- used for saving sent messages + */ + function sqimap_append ($imap_stream, $sent_folder, $length) { +- fputs ($imap_stream, sqimap_session_id() . " APPEND \"$sent_folder\" (\\Seen) \{$length}\r\n"); ++ fputs ($imap_stream, sqimap_session_id() . " APPEND \"$sent_folder\" (\\Seen) {".$length."}\r\n"); + $tmp = fgets ($imap_stream, 1024); + sqimap_append_checkresponse($tmp, $sent_folder); + } |