private static function _simple_calendar($id, $data, $recurrences, $subject, $message, $diff, $type = "") { $deliveries_rec = self::_calc_offset($recurrences, $diff); $delivery = strtotime($diff, $data["begin"]); if (!empty($deliveries_rec)) { $delivery = array_shift($deliveries_rec); } $begin = $data["begin"]; foreach ($recurrences as $recurrence) { if ($recurrence > $delivery) { $begin = $recurrence; break; } } $message = sprintf($message, modify::recurrences($data["recurs"], array(4, $delivery))); $subject = sprintf($subject, modify::shortdatetimeformat($begin)); db_notification_add("simple_calendar|" . $id . $type, $data["notification"], $subject, $message, $delivery, $deliveries_rec); }