* Add id for checking unique field.
This commit is contained in:
@@ -469,6 +469,7 @@ class executionModel extends model
|
||||
|
||||
/* Get the data from the post. */
|
||||
$execution = fixer::input('post')
|
||||
->add('id', $executionID)
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', helper::now())
|
||||
->setIF(helper::isZeroDate($this->post->begin), 'begin', '')
|
||||
@@ -621,6 +622,7 @@ class executionModel extends model
|
||||
|
||||
$executionID = (int)$executionID;
|
||||
$executions[$executionID] = new stdClass();
|
||||
$executions[$executionID]->id = $executionID;
|
||||
$executions[$executionID]->name = $executionName;
|
||||
$executions[$executionID]->code = $executionCode;
|
||||
$executions[$executionID]->PM = $data->PMs[$executionID];
|
||||
@@ -753,6 +755,7 @@ class executionModel extends model
|
||||
$now = helper::now();
|
||||
|
||||
$execution = fixer::input('post')
|
||||
->add('id', $executionID)
|
||||
->setDefault('status', 'doing')
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
@@ -786,6 +789,7 @@ class executionModel extends model
|
||||
$now = helper::now();
|
||||
|
||||
$execution = fixer::input('post')
|
||||
->add('id', $executionID)
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->remove('comment')
|
||||
@@ -816,6 +820,7 @@ class executionModel extends model
|
||||
$now = helper::now();
|
||||
|
||||
$execution = fixer::input('post')
|
||||
->add('id', $executionID)
|
||||
->setDefault('status', 'suspended')
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
@@ -843,6 +848,7 @@ class executionModel extends model
|
||||
$now = helper::now();
|
||||
|
||||
$execution = fixer::input('post')
|
||||
->add('id', $executionID)
|
||||
->setDefault('realEnd', '')
|
||||
->setDefault('status', 'doing')
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
@@ -913,6 +919,7 @@ class executionModel extends model
|
||||
$now = helper::now();
|
||||
|
||||
$execution = fixer::input('post')
|
||||
->add('id', $executionID)
|
||||
->setDefault('status', 'closed')
|
||||
->setDefault('closedBy', $this->app->user->account)
|
||||
->setDefault('closedDate', $now)
|
||||
|
||||
Reference in New Issue
Block a user