| @@ 255-267 (lines=13) @@ | ||
| 252 | * @param \Notifications_Task $task |
|
| 253 | * @param mixed[] $bodies |
|
| 254 | */ |
|
| 255 | protected function _send_daily_email(\ElkArte\sources\subs\MentionType\Mention_Type_Interface $obj, \Notifications_Task $task, $bodies) |
|
| 256 | { |
|
| 257 | foreach ($bodies as $body) |
|
| 258 | { |
|
| 259 | $this->_insert_delayed(array( |
|
| 260 | $task['notification_type'], |
|
| 261 | $body['id_member_to'], |
|
| 262 | $task['log_time'], |
|
| 263 | 'd', |
|
| 264 | $body['body'] |
|
| 265 | )); |
|
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | /** |
|
| 270 | * Stores data in the database to send a weekly digest. |
|
| @@ 276-288 (lines=13) @@ | ||
| 273 | * @param \Notifications_Task $task |
|
| 274 | * @param mixed[] $bodies |
|
| 275 | */ |
|
| 276 | protected function _send_weekly_email(\ElkArte\sources\subs\MentionType\Mention_Type_Interface $obj, \Notifications_Task $task, $bodies) |
|
| 277 | { |
|
| 278 | foreach ($bodies as $body) |
|
| 279 | { |
|
| 280 | $this->_insert_delayed(array( |
|
| 281 | $task['notification_type'], |
|
| 282 | $body['id_member_to'], |
|
| 283 | $task['log_time'], |
|
| 284 | 'w', |
|
| 285 | $body['body'] |
|
| 286 | )); |
|
| 287 | } |
|
| 288 | } |
|
| 289 | ||
| 290 | /** |
|
| 291 | * Do the insert into the database for daily and weekly digests. |
|