function sqimap_get_flags ($imap_stream, $i) {
$read = sqimap_run_command ($imap_stream, "FETCH $i:$i FLAGS", true, $response, $message);
if (ereg("FLAGS(.*)", $read[0], $regs)) {
- return explode(" ", trim(ereg_replace('[\\(\\)\\\\]', '', $regs[1])));
+ return explode(' ', trim(ereg_replace('[\\(\\)\\\\]', '', $regs[1])));
}
return Array('None');
}
$result_flags[$id2index[$regs[1]]] = explode(" ", trim(ereg_replace('[\\(\\)\\\\]', '', $regs[2])));
} else {
set_up_language($squirrelmail_language);
- echo "<br><b><font color=$color[2]>\n";
- echo _("ERROR : Could not complete request.");
- echo "</b><br>\n";
- echo _("Unknown response from IMAP server: ");
- echo $result_list[$i][0] . "</font><br>\n";
+ echo "<br><b><font color=$color[2]>\n" .
+ _("ERROR : Could not complete request.") .
+ "</b><br>\n" .
+ _("Unknown response from IMAP server: ") .
+ $result_list[$i][0] . "</font><br>\n";
exit;
}
}
return $header;
}
+/****************************************************************************
+ ** Wrapper function that reformats the entity header information.
+ ****************************************************************************/
+function sqimap_get_ent_header ($imap_stream, $id, $mailbox, $ent) {
+ $read = sqimap_run_command ($imap_stream, "FETCH $id:$id BODY[$ent.HEADER]", true, $response, $message);
+ $header = sqimap_get_header($imap_stream, $read);
+ $header->id = $id;
+ $header->mailbox = $mailbox;
+ return $header;
+}
+
+
/****************************************************************************
** Wrapper function that returns entity headers for use by decodeMime
****************************************************************************/