* $Id$
*/
+require_once('../functions/strings.php');
+
define('PG_SEL_MAX', 10); /* Default value for page_selector_max. */
function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start_msg, $where, $what) {
global $default_use_priority;
global $message_highlight_list;
global $index_order;
+ global $pos; /* Search postion (if any) */
$color_string = $color[4];
if ($GLOBALS['alt_index_colors']) {
}
$msg = $msgs[$key];
- $senderName = sqimap_find_displayable_name($msg['FROM']);
+ /**
+ * This is done in case you're looking into Sent folders,
+ * because you can have multi receiver.
+ */
+ $sendersName = split(',', $msg['FROM']);
+ $senderName = '';
+ for ($index = 0 ; $index < count($sendersName) ; $index++) {
+ if ($senderName != '') {
+ $senderName .= ', ';
+ }
+ $senderName .= sqimap_find_displayable_name($sendersName[$index]);
+ }
+
if( $mailbox == 'None' ) {
// $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
$boxes = sqimap_mailbox_list($imapConnection);
}
if ($where && $what) {
- $search_stuff = '&where='.urlencode($where).'&what='.urlencode($what);
+ if( !isset( $pos ) || $pos == '' ) {
+ $pos = '0';
+ }
+ $search_stuff = "&pos=" . urlencode( $pos ) . "&where=".urlencode($where).'&what='.urlencode($what);
}
$checked = ($checkall == 1 ?' checked' : '');
while ($j < $end_loop) {
if (isset($date[$j])) {
- $date[$j] = ereg_replace(' ', ' ', $date[$j]);
+ $date[$j] = str_replace(' ', ' ', $date[$j]);
$tmpdate = explode(' ', trim($date[$j]));
} else {
$tmpdate = $date = array('', '', '', '', '', '');