* finish task #1571.
This commit is contained in:
@@ -940,7 +940,7 @@ class bug extends control
|
||||
|
||||
/* Send it. */
|
||||
$this->loadModel('mail')->send($toList, $productName . ':' . 'BUG #'. $bug->id . $this->lang->colon . $bug->title, $mailContent, $ccList);
|
||||
if($this->mail->isError()) echo js::error($this->mail->getError());
|
||||
if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ js::set('userList', array_keys($users));
|
||||
js::set('page', 'create');
|
||||
?>
|
||||
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform' class='ajaxForm'>
|
||||
<form method='post' enctype='multipart/form-data' id='dataform' class='ajaxForm'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->bug->create;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -243,6 +243,7 @@ class mailModel extends model
|
||||
{
|
||||
if(!$this->config->mail->turnon) return;
|
||||
|
||||
ob_start();
|
||||
/* Process toList and ccList, remove current user from them. If toList is empty, use the first cc as to. */
|
||||
if($includeMe == false)
|
||||
{
|
||||
@@ -283,6 +284,11 @@ class mailModel extends model
|
||||
{
|
||||
$this->errors[] = trim(strip_tags($e->getMessage()));
|
||||
}
|
||||
|
||||
$message = ob_get_contents();
|
||||
ob_clean();
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1194,7 +1194,7 @@ class project extends control
|
||||
|
||||
/* Send emails. */
|
||||
$this->loadModel('mail')->send($toList, $projectName . ':' . 'TASK#' . $task->id . $this->lang->colon . $task->name, $mailContent, $ccList);
|
||||
if($this->mail->isError()) echo js::error($this->mail->getError());
|
||||
if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -867,7 +867,7 @@ class story extends control
|
||||
|
||||
/* Send it. */
|
||||
$this->loadModel('mail')->send($toList, $productName . ':' . 'STORY #' . $story->id . $this->lang->colon . $story->title, $mailContent, $ccList);
|
||||
if($this->mail->isError()) echo js::error($this->mail->getError());
|
||||
if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
|
||||
}
|
||||
/**
|
||||
* The report page.
|
||||
|
||||
@@ -800,7 +800,7 @@ class task extends control
|
||||
|
||||
/* Send emails. */
|
||||
$this->loadModel('mail')->send($toList, $projectName . ':' . 'TASK#' . $task->id . $this->lang->colon . $task->name, $mailContent, $ccList);
|
||||
if($this->mail->isError()) echo js::error($this->mail->getError());
|
||||
if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include './header.html.php';?>
|
||||
<?php include '../../common/view/form.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform' class='ajaxForm'>
|
||||
<form method='post' enctype='multipart/form-data' id='dataform' class='ajaxForm'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->testcase->create;?></caption>
|
||||
<tr>
|
||||
|
||||
@@ -693,6 +693,6 @@ class testtask extends control
|
||||
$mailTitle = sprintf($this->lang->testtask->mail->edit->title, $this->app->user->realname, $testtaskID, $this->post->name);
|
||||
}
|
||||
$this->loadModel('mail')->send($this->post->owner, $mailTitle, $mailContent);
|
||||
if($this->mail->isError()) echo js::error($this->mail->getError());
|
||||
if($this->mail->isError()) trigger_error(join("\n", $this->mail->getError()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user