steffen: server/kolab-resource-handlers/kolab-resource-handlers/resmgr kolabmailtransport.php, 1.3.2.4, 1.3.2.5 misc.php, 1.4.2.1, 1.4.2.2
cvs at intevation.de
cvs at intevation.de
Mon May 22 13:07:50 CEST 2006
Author: steffen
Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr
In directory doto:/tmp/cvs-serv17287
Modified Files:
Tag: kolab_2_0_branch
kolabmailtransport.php misc.php
Log Message:
Backport of: Fix for Issue1195 (error message in bounce)
Index: kolabmailtransport.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr/kolabmailtransport.php,v
retrieving revision 1.3.2.4
retrieving revision 1.3.2.5
diff -u -d -r1.3.2.4 -r1.3.2.5
--- kolabmailtransport.php 8 Mar 2006 20:19:42 -0000 1.3.2.4
+++ kolabmailtransport.php 22 May 2006 11:07:48 -0000 1.3.2.5
@@ -42,7 +42,8 @@
}
if (PEAR::isError($error = $this->transport->mailFrom($sender))) {
- return new PEAR_Error('Failed to set sender: ' . $error->getMessage(), $this->transport->_code );
+ $resp = $this->transport->getResponse();
+ return new PEAR_Error('Failed to set sender: ' . $resp[1], $resp[0] );
}
if( !is_array( $recips ) ) $recips = array($recips);
@@ -50,9 +51,10 @@
$reciperrors = array();
foreach( $recips as $recip ) {
if (PEAR::isError($error = $this->transport->rcptTo($recip))) {
- $msg = "Failed to set recipient $recip: " . $error->getMessage(). ", code=".$this->transport->_code;;
- myLog($msg, RM_LOG_ERROR);
- $reciperrors[] = new PEAR_Error('Failed to set recipient: '.$error->getMessage(), $this->transport->_code);
+ $resp = $this->transport->getResponse();
+ $msg = "Failed to set recipient $recip: " .$resp[1]. ", code=".$resp[0];
+ myLog($msg, RM_LOG_ERROR);
+ $reciperrors[] = new PEAR_Error('Failed to set recipient: '.$resp[1], $resp[0]);
}
}
if( count($reciperrors) == count($recips) ) {
Index: misc.php
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/resmgr/misc.php,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -d -r1.4.2.1 -r1.4.2.2
--- misc.php 21 May 2006 12:09:18 -0000 1.4.2.1
+++ misc.php 22 May 2006 11:07:48 -0000 1.4.2.2
@@ -178,7 +178,7 @@
$i++;
}
$i--;
- if( is_array( $ret[$arg[1]] ) ) $ret[$arg[1]] = array_merge($ret[$arg[1]] ,$val);
+ if( array_key_exists($arg[1],$ret) && is_array( $ret[$arg[1]] ) ) $ret[$arg[1]] = array_merge($ret[$arg[1]] ,$val);
else if( count($val) == 1 ) $ret[$arg[1]] = $val[0];
else $ret[$arg[1]] = $val;
}
More information about the commits
mailing list