Permalink
Browse files

fix project name in mail about create/update task

  • Loading branch information...
1 parent 50540ce commit c23df203c831d9c37c4ed9c68770cb4e05fd30ba @greywolfs greywolfs committed Feb 28, 2013
Showing with 5 additions and 5 deletions.
  1. +1 −4 classes/w2p/Output/EmailManager.class.php
  2. +4 −1 modules/tasks/tasks.class.php
@@ -171,11 +171,8 @@ public function getFileNotifyContacts(CFile $file)
return $this->getFileNotify($file);
}
- public function getTaskNotify(CTask $task, $user)
+ public function getTaskNotify(CTask $task, $user, $projname)
{
- $project = new CProject();
- $projname = $project->load($task->task_project)->project_name;
-
$body = $this->_AppUI->_('Project', UI_OUTPUT_RAW) . ":\t" . $projname . "\n";
$body .= $this->_AppUI->_('Task', UI_OUTPUT_RAW) . ":\t\t" . $task->task_name . "\n";
//TODO: Priority not working for some reason, will wait till later
@@ -1215,6 +1215,9 @@ public function notify($comment = '')
$mail = new w2p_Utilities_Mail();
+ $project = new CProject();
+ $projname = $project->load($this->task_project)->project_name;
+
$mail->Subject($projname . '::' . $this->task_name . ' ' . $this->_AppUI->_($this->_action, UI_OUTPUT_RAW), $locale_char_set);
// c = creator
@@ -1252,7 +1255,7 @@ public function notify($comment = '')
if ($mail->ValidEmail($row['assignee_email'])) {
$emailManager = new w2p_Output_EmailManager($this->_AppUI);
- $body = $emailManager->getTaskNotify($this, $row);
+ $body = $emailManager->getTaskNotify($this, $row, $projname);
$mail->Body($body, (isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : ''));

0 comments on commit c23df20

Please sign in to comment.