* Modify actionID return.

This commit is contained in:
caoyanyi
2022-01-13 05:22:04 +00:00
parent e2d8d506b3
commit 5d2892e415
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -129,13 +129,14 @@ class pipelineModel extends model
* @param string $id the id to be deleted
* @param string $object the action object
* @access public
* @return bool
* @return int
*/
public function delete($id, $object = 'gitlab')
{
$this->dao->update(TABLE_PIPELINE)->set('deleted')->eq(1)->where('id')->eq($id)->exec();
$this->loadModel('action')->create($object, $id, 'deleted', '', ACTIONMODEL::CAN_UNDELETED);
return true;
$actionID = $this->dao->lastInsertID();
return $actionID;
}
}
+1 -1
View File
@@ -114,7 +114,7 @@ class sonarqube extends control
$oldSonarQube = $this->sonarqube->getByID($sonarqubeID);
$this->loadModel('action');
$this->loadModel('pipeline')->delete($sonarqubeID, 'sonarqube');
$actionID = $this->loadModel('pipeline')->delete($sonarqubeID, 'sonarqube');
$sonarQube = $this->sonarqube->getByID($sonarqubeID);
$changes = common::createChanges($oldSonarQube, $sonarQube);