From 36e07e1cbdf79e714f75f8a6b8c41927177dec5a Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Thu, 11 Feb 2010 03:17:04 +0000 Subject: [PATCH] + add the feature of sendmail of story. --- module/bug/control.php | 4 +-- module/common/mail.html.php | 24 +++----------- module/story/control.php | 49 ++++++++++++++++++++++++++++- module/story/model.php | 11 +++++++ module/story/view/sendmail.html.php | 34 ++++++++++++++++++++ 5 files changed, 100 insertions(+), 22 deletions(-) create mode 100644 module/story/view/sendmail.html.php diff --git a/module/bug/control.php b/module/bug/control.php index fc95441074..31fdda94c4 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -375,11 +375,11 @@ class bug extends control die(html::select('bug', $bugs, '', 'class=select-1')); } - /* 发送变量。*/ + /* 发送邮件。*/ private function sendmail($bugID, $actionID) { /* 设定toList和ccList。*/ - $bug = $this->bug->getByID($bugID); + $bug = $this->bug->getByID($bugID); $toList = $bug->assignedTo; $ccList = trim($bug->mailto, ','); if($toList == '') diff --git a/module/common/mail.html.php b/module/common/mail.html.php index ad47c05dda..3b27ccda5a 100644 --- a/module/common/mail.html.php +++ b/module/common/mail.html.php @@ -1,23 +1,9 @@ -date, $action->action by $action->actor"; ?> -comment) or !empty($histories)):?> +actor])) $action->actor = $users[$action->actor];?> +action->printAction($action);?> +comment) or !empty($action->history)):?>
-id] as $history) - { - if($history->diff != '') - { - echo "CHANGE $history->field, the diff is:
" . nl2br($history->diff) . "
"; - } - else - { - echo "CHANGE $history->field FROM '$history->old' TO '$history->new' .
"; - } - } -} -echo nl2br($action->comment); -?> +
action->printChanges($action->objectType, $action->history);?>
+comment and $action->history) echo '
'; echo nl2br($action->comment);?>