* [misc] skip files.
This commit is contained in:
@@ -317,7 +317,7 @@ class bugModel extends model
|
||||
{
|
||||
$oldBug = $this->fetchByID($bug->id);
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug, 'deleteFiles,renameFiles,comment')
|
||||
$this->dao->update(TABLE_BUG)->data($bug, 'deleteFiles,renameFiles,files,comment')
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->edit->requiredFields, 'notempty')
|
||||
->checkIF(!empty($bug->resolvedBy), 'resolution', 'notempty')
|
||||
|
||||
@@ -558,7 +558,7 @@ class buildModel extends model
|
||||
if(!$project->hasProduct) $requiredFields = str_replace('product,', '', $requiredFields);
|
||||
|
||||
$build = $this->loadModel('file')->processImgURL($build, $this->config->build->editor->edit['id'], (string)$this->post->uid);
|
||||
$this->dao->update(TABLE_BUILD)->data($build, 'deleteFiles,renameFiles')
|
||||
$this->dao->update(TABLE_BUILD)->data($build, 'deleteFiles,renameFiles,files')
|
||||
->autoCheck()
|
||||
->batchCheck($requiredFields, 'notempty')
|
||||
->where('id')->eq($buildID)
|
||||
|
||||
@@ -97,7 +97,7 @@ class designModel extends model
|
||||
if(!$oldDesign) return false;
|
||||
|
||||
$design = $this->loadModel('file')->processImgURL($design, 'desc', (string)$this->post->uid);
|
||||
$this->dao->update(TABLE_DESIGN)->data($design, 'deleteFiles,renameFiles')->autoCheck()->batchCheck($this->config->design->edit->requiredFields, 'notempty')->where('id')->eq($designID)->exec();
|
||||
$this->dao->update(TABLE_DESIGN)->data($design, 'deleteFiles,renameFiles,files')->autoCheck()->batchCheck($this->config->design->edit->requiredFields, 'notempty')->where('id')->eq($designID)->exec();
|
||||
|
||||
if(dao::isError()) return false;
|
||||
|
||||
|
||||
@@ -478,7 +478,7 @@ class releaseModel extends model
|
||||
|
||||
if($release->status == 'wait') $release->releasedDate = null;
|
||||
|
||||
$this->dao->update(TABLE_RELEASE)->data($release, 'deleteFiles,renameFiles')
|
||||
$this->dao->update(TABLE_RELEASE)->data($release, 'deleteFiles,renameFiles,files')
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
|
||||
->check('name', 'unique', "`id` != '{$oldRelease->id}' AND `system` = '{$release->system}' AND `deleted` = '0'")
|
||||
|
||||
@@ -772,7 +772,7 @@ class storyModel extends model
|
||||
public function change(int $storyID, object $story): array|false
|
||||
{
|
||||
$oldStory = $this->getById($storyID);
|
||||
$this->dao->update(TABLE_STORY)->data($story, 'spec,verify,deleteFiles,renameFiles,relievedTwins,reviewer,reviewerHasChanged')
|
||||
$this->dao->update(TABLE_STORY)->data($story, 'spec,verify,deleteFiles,renameFiles,files,relievedTwins,reviewer,reviewerHasChanged')
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->{$oldStory->type}->change->requiredFields, 'notempty')
|
||||
->checkFlow()
|
||||
|
||||
+1
-1
@@ -439,7 +439,7 @@ class taskTao extends taskModel
|
||||
$task->lastEditedDate = helper::now();
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_TASK)->data($task, 'deleteFiles,renameFiles')
|
||||
$this->dao->update(TABLE_TASK)->data($task, 'deleteFiles,renameFiles,files')
|
||||
->autoCheck()
|
||||
->batchCheckIF($task->status != 'cancel', $requiredFields, 'notempty')
|
||||
->checkIF(!helper::isZeroDate($task->deadline), 'deadline', 'ge', $task->estStarted)
|
||||
|
||||
@@ -48,7 +48,7 @@ class testreportModel extends model
|
||||
*/
|
||||
public function update(object $report, object $oldReport): array|bool
|
||||
{
|
||||
$this->dao->update(TABLE_TESTREPORT)->data($report, 'deleteFiles,renameFiles')->autocheck()
|
||||
$this->dao->update(TABLE_TESTREPORT)->data($report, 'deleteFiles,renameFiles,files')->autocheck()
|
||||
->batchCheck($this->config->testreport->edit->requiredFields, 'notempty')
|
||||
->batchCheck('begin,end', 'notempty')
|
||||
->check('end', 'ge', $report->begin)
|
||||
|
||||
@@ -662,7 +662,7 @@ class testtaskModel extends model
|
||||
*/
|
||||
public function update(object $task, object $oldTask): array|bool
|
||||
{
|
||||
$this->dao->update(TABLE_TESTTASK)->data($task, 'deleteFiles,renameFiles')
|
||||
$this->dao->update(TABLE_TESTTASK)->data($task, 'deleteFiles,renameFiles,files')
|
||||
->autoCheck()
|
||||
->batchcheck($this->config->testtask->edit->requiredFields, 'notempty')
|
||||
->checkIF($task->end != '', 'end', 'ge', $task->begin)
|
||||
|
||||
Reference in New Issue
Block a user