case "subject":
$text = stripslashes($text);
- $text = html_entities($text);
+ $text = banana_htmlentities($text);
return banana_catchFormats($text);
default:
static public function formatDate($text)
{
- return utf8_encode(strftime("%A %d %B %Y, %H:%M (fuseau serveur)", strtotime($text)));
+ return strftime("%A %d %B %Y, %H:%M (fuseau serveur)", strtotime($text));
}
public function translateHeaders()
if (isset($refs['references'])) {
$text = str_replace('><', '> <', $refs['references']);
return preg_split('/\s/', strtr($text, Banana::$spool->ids));
- } elseif (isset($refs['in-reply-to'])) {
+ } elseif (isset($refs['in-reply-to']) && isset(Banana::$spool->ids[$refs['in-reply-to']])) {
return array(Banana::$spool->ids[$refs['in-reply-to']]);
} else {
return array();
exit;
}
- public function getFormattedBody($type = null)
+ public function getFormattedBody(&$reqtype = null)
{
$types = Banana::$msgshow_mimeparts;
- if (!is_null($type)) {
- array_unshift($types, $type);
+ if (!is_null($reqtype)) {
+ array_unshift($types, $reqtype);
}
foreach ($types as $type) {
@list($type, $subtype) = explode('/', $type);
if (empty($parts)) {
continue;
}
+ $reqtype = implode('/', $parts[0]->getType());
return $parts[0]->toHtml();
}
return null;