* task#647, adjust the commiters in dynamic method.
This commit is contained in:
@@ -95,7 +95,7 @@ $lang->action->label->bugconfirmed = 'confirmed';
|
||||
$lang->action->label->tostory = 'converted to story';
|
||||
$lang->action->label->frombug = 'converted from bug';
|
||||
$lang->action->label->totask = 'converted to task';
|
||||
$lang->action->label->svncommited = 'commited svn';
|
||||
$lang->action->label->svncommited = 'commited code';
|
||||
$lang->action->label->linked2plan = 'link to plan';
|
||||
$lang->action->label->unlinkedfromplan = 'unlink from plan';
|
||||
$lang->action->label->linked2project = 'link to project';
|
||||
|
||||
@@ -95,7 +95,7 @@ $lang->action->label->bugconfirmed = '确认了';
|
||||
$lang->action->label->tostory = '转需求';
|
||||
$lang->action->label->frombug = '转需求';
|
||||
$lang->action->label->totask = '转任务';
|
||||
$lang->action->label->svncommited = '提交Svn';
|
||||
$lang->action->label->svncommited = '提交代码';
|
||||
$lang->action->label->linked2plan = '关联计划';
|
||||
$lang->action->label->unlinkedfromplan = '移除计划';
|
||||
$lang->action->label->linked2project = '关联项目';
|
||||
|
||||
+10
-1
@@ -98,7 +98,7 @@ class actionModel extends model
|
||||
*/
|
||||
public function getList($objectType, $objectID)
|
||||
{
|
||||
$commiters = $this->dao->select('commiter, realname')->from(TABLE_USER)->where("commiter != ''")->fetchPairs();
|
||||
$commiters = $this->loadModel('user')->getCommiters();
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('objectType')->eq($objectType)
|
||||
->andWhere('objectID')->eq($objectID)
|
||||
@@ -272,9 +272,11 @@ class actionModel extends model
|
||||
*/
|
||||
public function getDynamic($account = 'all', $period = 'all', $orderBy = 'date_desc', $pager = null, $productID = 'all', $projectID = 'all')
|
||||
{
|
||||
/* Computer the begin and end date of a period. */
|
||||
$period = $this->computeBeginAndEnd($period);
|
||||
extract($period);
|
||||
|
||||
/* Get actions. */
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where('date')->gt($begin)
|
||||
->andWhere('date')->lt($end)
|
||||
@@ -287,6 +289,9 @@ class actionModel extends model
|
||||
|
||||
if(!$actions) return array();
|
||||
|
||||
/* Get commiters. */
|
||||
$commiters = $this->loadModel('user')->getCommiters();
|
||||
|
||||
/* Group actions by objectType, and get there name field. */
|
||||
foreach($actions as $object) $objectTypes[$object->objectType][] = $object->objectID;
|
||||
foreach($objectTypes as $objectType => $objectIds)
|
||||
@@ -336,6 +341,10 @@ class actionModel extends model
|
||||
$action->objectLabel = '';
|
||||
continue;
|
||||
}
|
||||
elseif($actionType == 'svncommited')
|
||||
{
|
||||
$action->actor = isset($commiters[$action->actor]) ? $commiters[$action->actor] : $action->actor;
|
||||
}
|
||||
|
||||
/* Other actions, create a link. */
|
||||
if(strpos($action->objectLabel, '|') !== false)
|
||||
|
||||
Reference in New Issue
Block a user