Skip to content
Permalink
Browse files

Added a default translation to activity emails so people with custom …

…domains don't see strange text.
  • Loading branch information...
tburry committed Nov 6, 2011
1 parent 6e3a27c commit bc67476a2364f45d9aa14311e5f0576a4bbc176e
Showing with 10 additions and 12 deletions.
  1. +10 −12 applications/dashboard/models/class.activitymodel.php
@@ -550,14 +550,14 @@ public function SendNotification($ActivityID, $Story = '', $Force = FALSE) {
$Email->Subject(sprintf(T('[%1$s] %2$s'), Gdn::Config('Garden.Title'), $ActivityHeadline));
$Email->To($User->Email, $User->Name);
//$Email->From(Gdn::Config('Garden.SupportEmail'), Gdn::Config('Garden.SupportName'));
$Email->Message(
sprintf(
$Story == '' ? T('EmailNotification') : T('EmailStoryNotification'),
$Message = sprintf(
$Story == '' ? T('EmailNotification', "%1\$s\n\n%2\$s") : T('EmailStoryNotification', "%3\$s\n\n%2\$s"),
$ActivityHeadline,
ExternalUrl($Activity->Route == '' ? '/' : $Activity->Route),
$Story
)
);
);
$Email->Message($Message);
$Notification = array('ActivityID' => $ActivityID, 'User' => $User, 'Email' => $Email, 'Route' => $Activity->Route, 'Story' => $Story, 'Headline' => $ActivityHeadline, 'Activity' => $Activity);
$this->EventArguments = $Notification;
@@ -689,15 +689,13 @@ public function QueueNotification($ActivityID, $Story = '', $Position = 'last',
$Email = new Gdn_Email();
$Email->Subject(sprintf(T('[%1$s] %2$s'), Gdn::Config('Garden.Title'), $ActivityHeadline));
$Email->To($User->Email, $User->Name);
//$Email->From(Gdn::Config('Garden.SupportEmail'), Gdn::Config('Garden.SupportName'));
$Email->Message(
sprintf(
$Story == '' ? T('EmailNotification') : T('EmailStoryNotification'),
$Message = sprintf(
$Story == '' ? T('EmailNotification', "%1\$s\n\n%2\$s") : T('EmailStoryNotification', "%3\$s\n\n%2\$s"),
$ActivityHeadline,
ExternalUrl($Activity->Route == '' ? '/' : $Activity->Route, TRUE),
ExternalUrl($Activity->Route == '' ? '/' : $Activity->Route),
$Story
)
);
);
$Email->Message($Message);
if (!array_key_exists($User->UserID, $this->_NotificationQueue))
$this->_NotificationQueue[$User->UserID] = array();

0 comments on commit bc67476

Please sign in to comment.
You can’t perform that action at this time.