Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 52776c1

Browse files
author
mgrauer
committed
Correct gmail action from tracker notification
1 parent 57a50d6 commit 52776c1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/tracker/Notification.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function sendEmail($params)
174174
$thresholdValue = $notification['value'];
175175
$thresholdComparison = $notification['comparison'];
176176
$scalarValue = $scalar['value'];
177-
$subject = 'Threshold Alert: '.$producerName.': '.$trendName.' value '.$scalarValue.' '.$thresholdComparison.' '.$thresholdValue;
177+
$subject = 'Threshold Alert: '.$producerName.': '.$trendName;
178178

179179
$body = 'Hello,<br/><br/>This email was sent because a submitted scalar value exceeded a threshold that you specified.<br/><br/>';
180180
$body .= '<b>Community:</b> <a href="'.$fullUrl.'/community/'.$producerDao->getCommunityId(
@@ -185,17 +185,17 @@ public function sendEmail($params)
185185
).'">'.htmlspecialchars($trendDao->getDisplayName(), ENT_QUOTES, 'UTF-8').'</a><br/>';
186186
$body .= 'Visit the above Trend link to change or disable notifications.<br/>';
187187
$body .= '<b>Value:</b> '.htmlspecialchars($scalarValue, ENT_QUOTES, 'UTF-8').'<br/>';
188-
$body .= '<b>Threshold:</b> '.htmlspecialchars($thresholdComparison, ENT_QUOTES, 'UTF-8').' '.htmlspecialchars($thresholdValue, ENT_QUOTES, 'UTF-8').'<br/>';
188+
$body .= '<b>Threshold:</b> '.htmlspecialchars($thresholdComparison, ENT_QUOTES, 'UTF-8').' '.htmlspecialchars($thresholdValue, ENT_QUOTES, 'UTF-8').'<br/>'.PHP_EOL;
189189

190190
// Add gmail "View Action".
191191
$trendTrackerUrl = $fullUrl.'/'.$this->moduleName.'/trend/view?trendId='.$trendDao->getKey();
192-
$body .= '<div itemscope itemtype="http://schema.org/EmailMessage">';
193-
$body .= ' <div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">';
194-
$body .= ' <link itemprop="target" href="'.$trendTrackerUrl.'"/>';
195-
$body .= ' <meta itemprop="name" content="View trend plot"/>';
196-
$body .= ' </div>';
197-
$body .= ' <meta itemprop="description" content="View the trend plot"/>';
198-
$body .= '</div>';
192+
$body .= '<div itemscope itemtype="http://schema.org/EmailMessage">'.PHP_EOL;
193+
$body .= ' <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">'.PHP_EOL;
194+
$body .= ' <link itemprop="url" href="'.$trendTrackerUrl.'"/>'.PHP_EOL;
195+
$body .= ' <meta itemprop="name" content="View trend"/>'.PHP_EOL;
196+
$body .= ' </div>'.PHP_EOL;
197+
$body .= ' <meta itemprop="description" content="View the trend plot"/>'.PHP_EOL;
198+
$body .= '</div>'.PHP_EOL;
199199

200200
Zend_Registry::get('notifier')->callback(
201201
'CALLBACK_CORE_SEND_MAIL_MESSAGE',

0 commit comments

Comments
 (0)