Version 1.0.1 -- DEVELOPMENT
----------------------------
+- Sped up "no sorting" even more
- Fixed problems with sending messages
- Fixed some pass-by-reference calls that caused problems with newer PHP versions
- Fixed bug that didn't display last folder subscribed to
$j = 0;
if ($sort == 6) {
$end = $startMessage + $show_num - 1;
+ if ($numMessages < $show_num)
+ $end_loop = $numMessages;
+ else
+ $end_loop = $show_num;
} else {
$end = $numMessages;
+ $end_loop = $end;
}
if ($end > $numMessages) $end = $numMessages;
- while ($j < $end) {
- $date[$j] = ereg_replace(' ', ' ', $date[$j]);
- $tmpdate = explode(' ', trim($date[$j]));
+ while ($j < $end_loop) {
+ if (isset($date[$j])) {
+ $date[$j] = ereg_replace(' ', ' ', $date[$j]);
+ $tmpdate = explode(' ', trim($date[$j]));
+ } else {
+ $tmpdate = $date = array("","","","","","");
+ }
$messages[$j]['TIME_STAMP'] = getTimeStamp($tmpdate);
$messages[$j]['DATE_STRING'] = getDateString($messages[$j]['TIME_STAMP']);
$i = 0;
$j = 0;
while ($j < $numMessages) {
- if ($messages[$j]['FLAG_DELETED'] == true) {
+ if (isset($messages[$j]['FLAG_DELETED']) && $messages[$j]['FLAG_DELETED'] == true) {
$j++;
continue;
}
if ($message->header->entity_id == $ent_id && strlen($ent_id) == strlen($message->header->entity_id)) {
return $message;
} else {
- for ($i = 0; $message->entities[$i]; $i++) {
+ for ($i = 0; isset($message->entities[$i]); $i++) {
$msg = getEntity ($message->entities[$i], $ent_id);
if ($msg)
return $msg;
fwrite($file, "$pref[$i]", 1024);
}
}
- for ($i=0; $i < count($hlt); $i++) {
- fwrite($file, "highlight$i=$hlt[$i]");
+ if (isset($htl)) {
+ for ($i=0; $i < count($hlt); $i++) {
+ fwrite($file, "highlight$i=$hlt[$i]");
+ }
}
-
fclose($file);
}
$selected_input = "";
- if (isset($message_highlight_list[$theid]["color"]))
- {
- for ($i=0; $i < 14; $i++) {
- if ($color_list[$i] == $message_highlight_list[$theid]["color"]) {
- $selected_choose = " checked";
- ${"selected".$i} = " selected";
- continue;
- }
- }
+ for ($i=0; $i < 14; $i++) {
+ ${"selected".$i} = "";
+ }
+ if (isset($message_highlight_list[$theid]["color"])) {
+ for ($i=0; $i < 14; $i++) {
+ if ($color_list[$i] == $message_highlight_list[$theid]["color"]) {
+ $selected_choose = " checked";
+ ${"selected".$i} = " selected";
+ continue;
+ }
+ }
}
if (!isset($message_highlight_list[$theid]["color"]))
$selected_choose = " checked";
echo " </b></td>\n";
echo " <td width=75%>\n";
echo " <select name=match_type>\n";
- if ($message_highlight_list[$theid]["match_type"] == "from") echo " <option value=\"from\" selected>From\n";
+ if (isset($message_highlight_list[$theid]["match_type"]) && $message_highlight_list[$theid]["match_type"] == "from") echo " <option value=\"from\" selected>From\n";
else echo " <option value=\"from\">From\n";
- if ($message_highlight_list[$theid]["match_type"] == "to") echo " <option value=\"to\" selected>To\n";
+ if (isset($message_highlight_list[$theid]["match_type"]) && $message_highlight_list[$theid]["match_type"] == "to") echo " <option value=\"to\" selected>To\n";
else echo " <option value=\"to\">To\n";
- if ($message_highlight_list[$theid]["match_type"] == "cc") echo " <option value=\"cc\" selected>Cc\n";
+ if (isset($message_highlight_list[$theid]["match_type"]) && $message_highlight_list[$theid]["match_type"] == "cc") echo " <option value=\"cc\" selected>Cc\n";
else echo " <option value=\"cc\">Cc\n";
- if ($message_highlight_list[$theid]["match_type"] == "to_cc") echo " <option value=\"to_cc\" selected>To or Cc\n";
+ if (isset($message_highlight_list[$theid]["match_type"]) && $message_highlight_list[$theid]["match_type"] == "to_cc") echo " <option value=\"to_cc\" selected>To or Cc\n";
else echo " <option value=\"to_cc\">To or Cc\n";
- if ($message_highlight_list[$theid]["match_type"] == "subject") echo " <option value=\"subject\" selected>Subject\n";
+ if (isset($message_highlight_list[$theid]["match_type"]) && $message_highlight_list[$theid]["match_type"] == "subject") echo " <option value=\"subject\" selected>Subject\n";
else echo " <option value=\"subject\">Subject\n";
echo " </select>\n";
if (isset($message_highlight_list[$theid]["value"]))
echo "<br>";
echo "<table width=100% cellpadding=2 cellspacing=0 border=0 align=center>\n";
echo " <TR><TD BGCOLOR=\"$color[9]\" WIDTH=100%><center><b>" . _("Viewing full header") . "</b> - ";
- if ($where && $what) {
+ if (isset($where) && isset($what)) {
// Got here from a search
echo "<a href=\"read_body.php?mailbox=".urlencode($mailbox)."&passed_id=$passed_id&where=".urlencode($where)."&what=".urlencode($what)."\">";
} else {
echo "<table width=99% cellpadding=2 cellspacing=0 border=0 align=center>\n";
echo "<tr><td>";
+ $cnum = 0;
for ($i=1; $i < count($read)-1; $i++) {
$line = htmlspecialchars($read[$i]);
if (eregi("^>", $line)) {
}
}
for ($i=0; $i < count($second); $i = $j) {
- $f = $first[$i];
- $s = nl2br($second[$i]);
+ if (isset($first[$i]))
+ $f = $first[$i];
+ if (isset($second[$i]))
+ $s = nl2br($second[$i]);
$j = $i + 1;
while ($first[$j] == "" && $j < count($first)) {
$s .= " " . nl2br($second[$j]);
$j++;
}
parseEmail($s);
- echo "<nobr><tt><b>$f</b>$s</tt></nobr>";
+ if (isset($f)) echo "<nobr><tt><b>$f</b>$s</tt></nobr>";
}
echo "</td></tr></table>\n";
echo "</body></html>";