* fix the error when sendmail a bug.

This commit is contained in:
wangchunsheng
2010-02-20 11:38:48 +00:00
parent f602943cf2
commit 3facbcea81
2 changed files with 4 additions and 3 deletions

View File

@@ -153,6 +153,7 @@ class actionModel extends model
/* 打印修改记录。*/
public function printChanges($objectType, $histories)
{
if(empty($histories)) return;
$maxLength = 0;
foreach($histories as $history)
{

View File

@@ -403,14 +403,14 @@ class bug extends control
}
/* 获得action信息。*/
$action = $this->action->getById($actionID);
$histories = $this->action->getHistory($actionID);
$action = $this->action->getById($actionID);
$history = $this->action->getHistory($actionID);
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
if(strtolower($action->action) == 'opened') $action->comment = $bug->steps;
/* 赋值,获得邮件内容。*/
$this->assign('bug', $bug);
$this->assign('action', $action);
$this->assign('histories', $histories);
$mailContent = $this->parse($this->moduleName, 'sendmail');
/* 发信。*/