1: <?php
2: 3: 4: 5: 6: 7:
8: class Ansel_Report_letter extends Ansel_Report {
9:
10: 11: 12:
13: function report($message, $users = array())
14: {
15: if (!empty($users)) {
16:
17: $admins = array($users);
18: } elseif (empty($GLOBALS['conf']['report_content']['users'])) {
19: $admins = $this->getAdmins();
20: if (empty($admins)) {
21: return true;
22: }
23: } else {
24: $admins = $GLOBALS['conf']['report_content']['users'];
25: }
26:
27: $title = $this->getTitle();
28: $message = $this->getMessage($message);
29:
30: return $GLOBALS['registry']->callByPackage(
31: 'letter', 'sendMessage', array($admins,
32: array('title' => $title,
33: 'content' => $message)));
34: }
35: }
36: