* change score module

This commit is contained in:
滔哥
2017-10-31 11:13:09 +08:00
parent 09395f45e8
commit e3ea70b43a
26 changed files with 200 additions and 163 deletions
+7 -7
View File
@@ -85,7 +85,7 @@ class bugModel extends model
$bugID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
$this->file->saveUpload('bug', $bugID);
empty($bug->case) ? $this->loadModel('score')->score('bug', 'create', $bugID) : $this->loadModel('score')->score('bug', 'createFormCase', $bug->case);
empty($bug->case) ? $this->loadModel('score')->create('bug', 'create', $bugID) : $this->loadModel('score')->create('bug', 'createFormCase', $bug->case);
return array('status' => 'created', 'id' => $bugID);
}
return false;
@@ -200,7 +200,7 @@ class bugModel extends model
$this->dao->insert(TABLE_BUG)->data($bug)->autoCheck()->batchCheck($this->config->bug->create->requiredFields, 'notempty')->exec();
$bugID = $this->dao->lastInsertID();
$this->loadModel('score')->score('bug', 'create', $bugID);
$this->loadModel('score')->create('bug', 'create', $bugID);
if(!empty($data->uploadImage[$i]) and !empty($file))
{
$file['objectType'] = 'bug';
@@ -224,7 +224,7 @@ class bugModel extends model
if(is_dir($realPath)) $classFile->removeDir($realPath);
unset($_SESSION['bugImagesFile']);
}
$this->loadModel('score')->score('ajax', 'batchCreate');
$this->loadModel('score')->create('ajax', 'batchCreate');
return $actions;
}
@@ -655,7 +655,7 @@ class bugModel extends model
}
}
}
$this->loadModel('score')->score('ajax', 'batchEdit');
$this->loadModel('score')->create('ajax', 'batchEdit');
return $allChanges;
}
@@ -759,7 +759,7 @@ class bugModel extends model
->get();
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
$this->loadModel('score')->score('bug', 'confirmBug', $oldBug);
$this->loadModel('score')->create('bug', 'confirmBug', $oldBug);
if(!dao::isError()) return common::createChanges($oldBug, $bug);
}
@@ -848,7 +848,7 @@ class bugModel extends model
->checkIF($bug->resolution == 'fixed', 'resolvedBuild','notempty')
->where('id')->eq((int)$bugID)
->exec();
$this->loadModel('score')->score('bug', 'resolve', $oldBug);
$this->loadModel('score')->create('bug', 'resolve', $oldBug);
/* Link bug to build and release. */
$this->linkBugToBuild($bugID, $bug->resolvedBuild);
}
@@ -1855,7 +1855,7 @@ class bugModel extends model
$condition = "`type`='bug' and account='{$this->app->user->account}'";
$this->dao->insert(TABLE_USERTPL)->data($template)->batchCheck('title, content', 'notempty')->check('title', 'unique', $condition)->exec();
$this->loadModel('score')->score('bug', 'saveTplModal', $this->dao->lastInsertID());
$this->loadModel('score')->create('bug', 'saveTplModal', $this->dao->lastInsertID());
}
/**