for ($i=0; $i < count($body_ary); $i++) {
$line = $body_ary[$i];
$line = charset_decode($charset, $line);
- $line = str_replace("\t", " ", $line);
+ $line = str_replace("\t", ' ', $line);
if (strlen($line) - 2 >= $wrap_at) {
$line = sqWordWrap($line, $wrap_at);
}
- $line = str_replace(" ", " ", $line);
+ $line = str_replace(' ', ' ', $line);
$line = nl2br($line);
- $line = parseEmail ($line);
+ // Removed parseEmail and integrated it into parseUrl
+ // This line is no longer needed.
+ // $line = parseEmail ($line);
$line = parseUrl ($line);
-
- $line = "^^$line"; // gotta do this because if not, strpos() returns 0
- // which in PHP is the same as false. Now it returns 2
- if (strpos(trim(str_replace(" ", "", $line)), ">>") == 2) {
- $line = substr($line, 2);
+
+ $test_line = str_replace(' ', '', $line);
+ if (strpos($test_line, '>>') === 0) {
$line = "<FONT COLOR=FF0000>$line</FONT>\n";
- } else if (strpos(trim(str_replace(" ", "", $line)), ">") == 2) {
- $line = substr($line, 2);
+ } else if (strpos($test_line, '>') === 0) {
$line = "<FONT COLOR=800000>$line</FONT>\n";
- } else {
- $line = substr($line, 2);
- }
-
- $body_ary[$i] = "<tt>$line</tt><br>";
+ }
+
+ if ($line)
+ {
+ $line = '<tt>' . $line . '</tt>';
+ }
+
+ $body_ary[$i] = $line . '<br>';
}
$body = implode("\n", $body_ary);
-
+
return $body;
}
/* SquirrelMail version number -- DO NOT CHANGE */
- $version = "0.5pre2";
+ $version = "0.5";
function find_mailbox_name ($mailbox) {