mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:31:58 +01:00
util: automated-search.php fix
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
d71174a62b
commit
460e711d3c
@ -215,6 +215,8 @@ function do_search($data = array(), $automated_search_recipients = array())
|
||||
$a['date1'] = $a['date2'] = date("Y.m.d", time() - 86400);
|
||||
}
|
||||
|
||||
$boundary = "--=_NextPart_000_ABCDEFGHI";
|
||||
|
||||
list ($n, $total_found, $all_ids, $messages) = $search->search_messages($a, 0);
|
||||
|
||||
if($dry_run == 0)
|
||||
@ -225,13 +227,19 @@ function do_search($data = array(), $automated_search_recipients = array())
|
||||
$msg .= "Subject: =?UTF-8?Q?" . preg_replace("/\n/", "", my_qp_encode($title)) . "?=" . EOL;
|
||||
$msg .= "Message-ID: <" . generate_random_string(25) . '@' . SITE_NAME . ">" . EOL;
|
||||
$msg .= "MIME-Version: 1.0" . EOL;
|
||||
$msg .= "Content-Type: text/html; charset=\"utf-8\"" . EOL;
|
||||
$msg .= "Content-Type: multipart/alternative;" . EOL;
|
||||
$msg .= "\tboundary=\"$boundary\"" . EOL;
|
||||
$msg .= EOL . EOL;
|
||||
|
||||
$msg .= "--$boundary" . EOL;
|
||||
$msg .= "Content-Type: text/html; charset=\"utf-8\"" . EOL . EOL;
|
||||
|
||||
ob_start();
|
||||
include($webuidir . "/view/theme/default/templates/search/auto.tpl");
|
||||
$msg .= ob_get_contents();
|
||||
|
||||
$msg .= "--" . $boundary . EOL . EOL;
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
$x = $mail->send_smtp_email(SMARTHOST, SMARTHOST_PORT, SMTP_DOMAIN, SMTP_FROMADDR, $automated_search_recipients, $msg);
|
||||
|
@ -47,7 +47,7 @@
|
||||
<td id="c4_r<?php print $i; ?>" class="resultcell from"><?php if($message['from'] != $message['shortfrom']) { ?><span title="<?php print $message['from']; ?>"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></td>
|
||||
<td id="c5_r<?php print $i; ?>" class="resultcell to"><?php if($message['to'] != $message['shortto']) { ?><span title="<?php print $message['to']; ?>"><?php print $message['shortto']; ?> <i class=" muted icon-group"></i></span><?php } else { print $message['to']; } ?></td>
|
||||
|
||||
<td id="c6_r<?php print $i; ?>" class="resultcell subject"><a href="<?php print SITE_URL; ?>/message.php/a<?php print $message['id']; ?>"><?php print $message['subject']; ?></a></td>
|
||||
<td id="c6_r<?php print $i; ?>" class="resultcell subject"><a href="<?php print SITE_URL; ?>message.php/a<?php print $message['id']; ?>"><?php print $message['subject']; ?></a></td>
|
||||
|
||||
<td id="c7_r<?php print $i; ?>" class="resultcell size"><?php print $message['size']; ?></td>
|
||||
<td align="center" id="c8_r<?php print $i; ?>" class="resultcell end"><?php if($message['spam'] == 1) { ?>!<?php } else { ?> <?php } ?></td>
|
||||
|
Loading…
Reference in New Issue
Block a user