diff --git a/util/automated-search.php b/util/automated-search.php index 4425a8b..022408d 100644 --- a/util/automated-search.php +++ b/util/automated-search.php @@ -110,9 +110,7 @@ $language = new Language(); Registry::set('language', $language); -extract($language->data); -$title = $text_automated_search; if(ENABLE_SYSLOG == 1) { openlog("piler-automated-search", LOG_PID, LOG_MAIL); } @@ -187,6 +185,7 @@ } } else { + $data['id'] = ''; do_search($data, $automated_search_recipients); } @@ -195,7 +194,16 @@ global $options; global $dry_run; global $webuidir; - global $title; + global $search_expression; + global $page_len; + + $lang = Registry::get('language'); + extract($lang->data); + + $page = 0; + $title = $text_automated_search; + + if($data['id'] != '') { $title .= $data['id']; } $search = new ModelSearchSearch(); $mail = new ModelMailMail(); @@ -213,7 +221,8 @@ { $msg = "From: " . SMTP_FROMADDR . EOL; $msg .= "To: " . ADMIN_EMAIL . EOL; - $msg .= "Subject: =?UTF-8?Q?" . preg_replace("/\n/", "", my_qp_encode($title . " " . $data['id'])) . "?=" . EOL; + $msg .= "Date: " . date(DATE_RFC2822) . EOL; + $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; diff --git a/webui/view/theme/default/templates/search/auto.tpl b/webui/view/theme/default/templates/search/auto.tpl index 163ead3..cc268f3 100644 --- a/webui/view/theme/default/templates/search/auto.tpl +++ b/webui/view/theme/default/templates/search/auto.tpl @@ -12,7 +12,7 @@
:
- :