From 7103cdebffa24ffc0cb8cc3ed26fa520d29a0604 Mon Sep 17 00:00:00 2001 From: "Olivier Perez [a570709]" <olivier.perez@worldline.com> Date: Thu, 13 Aug 2015 10:40:16 +0200 Subject: [PATCH] Fix part of #87 Use HTML tag for links in mails --- create_classic_poll.php | 4 ++-- create_date_poll.php | 4 ++-- studs.php | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/create_classic_poll.php b/create_classic_poll.php index 21c652be..0df4a69a 100644 --- a/create_classic_poll.php +++ b/create_classic_poll.php @@ -102,10 +102,10 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || ( $message = __('Mail', "This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll."); $message .= '<br/><br/>'; $message .= Utils::htmlEscape($_SESSION['form']->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($_SESSION['form']->title) . '".<br/>'; - $message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/>%s'; + $message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/><a href="%1$s">%1$s</a>'; $message_admin = __('Mail', "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above"); - $message_admin .= ' :<br/><br/>%s'; + $message_admin .= ' :<br/><br/><a href="%1$s">%1$s</a>'; $message = sprintf($message, Utils::getUrlSondage($poll_id)); $message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true)); diff --git a/create_date_poll.php b/create_date_poll.php index d33e48f1..76cd6290 100644 --- a/create_date_poll.php +++ b/create_date_poll.php @@ -99,10 +99,10 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) || $message = __('Mail', "This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll."); $message .= '<br/><br/>'; $message .= Utils::htmlEscape($_SESSION['form']->admin_name) . ' ' . __('Mail', 'hast just created a poll called') . ' : "' . Utils::htmlEscape($_SESSION['form']->title) . '".<br/>'; - $message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/>%s'; + $message .= __('Mail', 'Thanks for filling the poll at the link above') . ' :<br/><br/><a href="%1$s">%1$s</a>'; $message_admin = __('Mail', "This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above"); - $message_admin .= ' :<br/><br/>%s'; + $message_admin .= ' :<br/><br/><a href="%1$s">%1$s</a>'; $message = sprintf($message, Utils::getUrlSondage($poll_id)); $message_admin = sprintf($message_admin, Utils::getUrlSondage($admin_poll_id, true)); diff --git a/studs.php b/studs.php index 7270fd1e..8f793f1c 100644 --- a/studs.php +++ b/studs.php @@ -80,7 +80,8 @@ function sendUpdateNotification($poll, $mailService, $name, $type) { $message .= __('Mail', "wrote a comment.\nYou can find your poll at the link") . " :\n\n"; break; } - $message .= Utils::getUrlSondage($poll->admin_id, true) . "\n\n"; + $urlSondage = Utils::getUrlSondage($poll->admin_id, true); + $message .= '<a href="' . $urlSondage . '">' . $urlSondage . '</a>' . "\n\n"; $messageTypeKey = $type . '-' . $poll->id; $mailService->send($poll->admin_mail, $subject, $message, $messageTypeKey); -- GitLab