$cChar = $sThreadResponse{$i};
switch ($cChar) {
case '(': // new sub thread
+ // correction for a subthread of a thread with no parents in thread
+ if (!count($aUidSubThread) && $j > 0) {
+ --$l;
+ }
$aDepthStack[$j] = $l;
++$j;
break;
* @return array $aMessageList associative array with messages. Key is the UID, value is an associative array
* @author Marc Groot Koerkamp
*/
-function parseFetch($aResponse,$aMessageList = array()) {
+function parseFetch(&$aResponse,$aMessageList = array()) {
for ($j=0,$iCnt=count($aResponse);$j<$iCnt;++$j) {
$aMsg = array();
$msgi = '';
}
$aMessageList[$msgi] = $aMsg;
+ $aResponse[$j] = NULL;
}
return $aMessageList;
}
if ($read) {
if (preg_match('/.+FLAGS\s\((.*)\)\s/AUi',$read[0],$regs)) {
if (trim($regs[1])) {
- $flags = preg_split('/ /', $regs[1],-1,'PREG_SPLIT_NI_EMPTY');
+ $flags = preg_split('/ /', $regs[1],-1,PREG_SPLIT_NO_EMPTY);
}
}
} else {
$msg->rfc822_header = $rfc822_header;
return $msg;
}
-
-?>