* task#674

This commit is contained in:
wangchunsheng
2011-12-23 13:20:56 +00:00
parent 74688efe9b
commit 73bf5b9e07
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ $lang->action->desc->bugconfirmed= '$date, 由 <strong>$actor</strong> 确认Bug
$lang->action->desc->frombug = '$date, 由 <strong>$actor</strong> Bug转化而来,Bug编号为 <strong>$extra</strong>。';
$lang->action->desc->started = '$date, 由 <strong>$actor</strong> 启动。' . "\n";
$lang->action->desc->canceled = '$date, 由 <strong>$actor</strong> 取消。' . "\n";
$lang->action->desc->svncommited = '$date, <strong>$actor</strong> 提交代码,版本为<strong>#$extra</strong>' . "\n";
$lang->action->desc->svncommited = '$date, 由 <strong>$actor</strong> 提交代码,版本为<strong>#$extra</strong>' . "\n";
$lang->action->desc->finished = '$date, 由 <strong>$actor</strong> 完成。' . "\n";
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />' . "\n";
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:' . "\n" . '<blockquote>%s</blockquote>' . "\n";
+3 -1
View File
@@ -98,13 +98,15 @@ class actionModel extends model
*/
public function getList($objectType, $objectID)
{
$actions = $this->dao->select('*')->from(TABLE_ACTION)
$commiters = $this->dao->select('commiter, realname')->from(TABLE_USER)->where("commiter != ''")->fetchPairs();
$actions = $this->dao->select('*')->from(TABLE_ACTION)
->where('objectType')->eq($objectType)
->andWhere('objectID')->eq($objectID)
->orderBy('date, id')->fetchAll('id');
$histories = $this->getHistory(array_keys($actions));
foreach($actions as $actionID => $action)
{
if(strtolower($action->action) == 'svncommited' and isset($commiters[$action->actor])) $action->actor = $commiters[$action->actor];
$action->history = isset($histories[$actionID]) ? $histories[$actionID] : array();
$actions[$actionID] = $action;
}