* [refac] optimize code.
This commit is contained in:
@@ -807,17 +807,17 @@ class weeklyModel extends model
|
||||
{
|
||||
/* Set milestone report data. */
|
||||
$report = new stdclass();
|
||||
$report->addedBy = 'system';
|
||||
$report->addedDate = helper::now();
|
||||
$report->addedBy = 'system';
|
||||
$report->addedDate = helper::now();
|
||||
$report->templateType = 'projectReport';
|
||||
$report->module = 'milestone';
|
||||
|
||||
$stages = $this->dao->select('id,name,project')->from(TABLE_PROJECT)->where('type')->eq('stage')->andWhere('milestone')->eq('1')->fetchAll('id');
|
||||
foreach($stages as $stageID => $stage)
|
||||
{
|
||||
$report->project = $stage->project;
|
||||
$report->execution = $stageID;
|
||||
$report->title = sprintf($this->lang->weekly->milestoneTitle, $stage->name);
|
||||
$report->templateType = 'projectReport';
|
||||
$report->module = 'milestone';
|
||||
$report->project = $stage->project;
|
||||
$report->execution = $stageID;
|
||||
$report->title = sprintf($this->lang->weekly->milestoneTitle, $stage->name);
|
||||
$this->dao->insert(TABLE_DOC)->data($report)->exec();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user