v4.3.6-cvs
----------
+[mms] When replying to list, correctly extract e-mail address if multiple
+ entries exist in the List-Post header (Bug #8719).
[mms] For messages marked as innocent but not moved to Inbox, don't report
them as deleted within the current mailbox (Bug #8221).
[jan] Don't show address book preference group if address books are disabled
}
/**
- * Parse the information in a mailing list headers.
+ * Parse the information in mailing list headers.
*
* @param string $data The header text to process.
- * @param boolean $raw Should the raw URL be returned instead of linking
- * the header value?
+ * @param array $opts Additional options:
+ * <pre>
+ * 'email' - (boolean) Only return e-mail values.
+ * DEFAULT: false
+ * 'raw' - (boolean) Should the raw URL be returned instead of linking
+ * the header value?
+ * DEFAULT: false
+ * </pre>
*
* @return string The header value.
*/
- public function parseListHeaders($data, $raw = false)
+ public function parseListHeaders($data, $opts = array())
{
$output = '';
* that appears in a header that we can adequately handle. */
if (stristr($match, 'mailto:') !== false) {
$match = substr($match, strpos($match, ':') + 1);
- if ($raw) {
+ if (!empty($opts['raw'])) {
return $match;
}
$output = Horde::link(IMP::composeLink($match)) . $match . '</a>';
$output .= ' ' . $comments[1];
}
break;
- } else {
+ } elseif (empty($data['email'])) {
if ($url = Horde_Text_Filter::filter($match, 'linkurls', array('callback' => 'Horde::externalUrl'))) {
- if ($raw) {
+ if (!empty($opts['raw'])) {
return $match;
}
$output = $url;
* list. */
if (($val = $headers->getValue('list-post')) &&
($val != 'NO')) {
- $ret['reply_list'] = $this->parseListHeaders($val, true);
+ $ret['reply_list'] = $this->parseListHeaders($val, array('email' => true, 'raw' => true));
}
}