/** * Get the html body for notification * * @param Tracker_DateReminder $reminder Reminder that will send notifications * @param Tracker_Artifact $artifact * @param String $recipient The recipient who will receive the notification * @param BaseLanguage $language The language of the message * * @return String */ protected function getBodyHtml(Tracker_DateReminder $reminder, Tracker_Artifact $artifact, $recipient, BaseLanguage $language) { $format = Codendi_Mail_Interface::FORMAT_HTML; $hp = Codendi_HTMLPurifier::instance(); $protocol = $GLOBALS['sys_force_ssl'] ? 'https' : 'http'; $link = $protocol . '://' . $GLOBALS['sys_default_domain'] . TRACKER_BASE_URL . '/?aid=' . $artifact->getId(); $output = '<h1>' . $hp->purify($artifact->fetchMailTitle($recipient, $format, false)) . '</h1>' . PHP_EOL; $output .= $language->getText('plugin_tracker_date_reminder', 'body_header', array($hp->purify($GLOBALS['sys_name']), $hp->purify($reminder->getField()->getLabel()), $reminder->getFieldValue($artifact))); $output .= '<br>'; $output .= $language->getText('plugin_tracker_date_reminder', 'body_art_html_link', array($link)); $output .= '<br>'; return $output; }