summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
85c0ca7)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6695
7612ce4b-ef26-0410-bec9-
ea0150e637f0
- sqimap_create_stream() was not obeying passed params properly. Fixed.
- Fix non selectable inbox.
- Add src/configtest.php script which checks for common errors in the config.
- sqimap_create_stream() was not obeying passed params properly. Fixed.
- Fix non selectable inbox.
- Add src/configtest.php script which checks for common errors in the config.
+ - Improve display of some unparsable/absent dates (#891354).
* @package squirrelmail
*/
class Rfc822Header {
* @package squirrelmail
*/
class Rfc822Header {
$subject = '',
$from = array(),
$sender = '',
$subject = '',
$from = array(),
$sender = '',
if (is_array($hdr)) {
$hdr = implode('', $hdr);
}
if (is_array($hdr)) {
$hdr = implode('', $hdr);
}
- /* First we unfold the header */
- $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $hdr));
+ /* First we replace \r\n by \n and unfold the header */
+ $hdr = trim(str_replace(array("\r\n", "\n\t", "\n "),array("\n", ' ', ' '), $hdr));
/* Now we can make a new header array with */
/* each element representing a headerline */
/* Now we can make a new header array with */
/* each element representing a headerline */
- $hdr = explode("\r\n" , $hdr);
+ $hdr = explode("\n" , $hdr);
foreach ($hdr as $line) {
$pos = strpos($line, ':');
if ($pos > 0) {
foreach ($hdr as $line) {
$pos = strpos($line, ':');
if ($pos > 0) {
* Since the day of week is optional, this check is needed.
*/
if (count($dateParts) <2) {
* Since the day of week is optional, this check is needed.
*/
if (count($dateParts) <2) {
}
/* remove day of week */
}
/* remove day of week */
$i = 0;
foreach ($read_list as $r) {
$i = 0;
foreach ($read_list as $r) {
+ /* initialize/reset vars */
$subject = _("(no subject)");
$from = _("Unknown sender");
$priority = 0;
$messageid = '<>';
$subject = _("(no subject)");
$from = _("Unknown sender");
$priority = 0;
$messageid = '<>';
- $cc = $to = $date = $type[0] = $type[1] = $inrepto = '';
+ $type = array('','');
+ $cc = $to = $inrepto = '';
+ // use unset because we do isset below
+ unset($date);
$flag_seen = $flag_answered = $flag_deleted = $flag_flagged = false;
$read = implode('',$r);
$flag_seen = $flag_answered = $flag_deleted = $flag_flagged = false;
$read = implode('',$r);
$i = strpos($read,'{',$i);
$header = parseString($read,$i);
if ($header === false) break 3;
$i = strpos($read,'{',$i);
$header = parseString($read,$i);
if ($header === false) break 3;
- /* First we unfold the header */
- $hdr = trim(str_replace(array("\r\n\t", "\r\n "),array(' ', ' '), $header));
+ /* First we replace all \r\n by \n, and unfold the header */
+ $hdr = trim(str_replace(array("\r\n", "\n\t", "\n "),array("\n", ' ', ' '), $header));
/* Now we can make a new header array with */
/* each element representing a headerline */
/* Now we can make a new header array with */
/* each element representing a headerline */
- $hdr = explode("\r\n" , $hdr);
+ $hdr = explode("\n" , $hdr);
foreach ($hdr as $line) {
$pos = strpos($line, ':');
if ($pos > 0) {
foreach ($hdr as $line) {
$pos = strpos($line, ':');
if ($pos > 0) {
if(!is_array($type)) {
$type[0] = 'text';
}
if(!is_array($type)) {
$type[0] = 'text';
}
- if (!isset($type[1])) {
- $type[1] = '';
- }
$date = str_replace(' ', ' ', $date);
$tmpdate = explode(' ', trim($date));
} else {
$date = str_replace(' ', ' ', $date);
$tmpdate = explode(' ', trim($date));
} else {
- $tmpdate = $date = array('', '', '', '', '', '');
+ $tmpdate = $date = array();
}
if ($uid_support) {
$msgi ="$unique_id";
}
if ($uid_support) {
$msgi ="$unique_id";