Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -63,8 +63,9 @@ class job extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->job->create();
|
||||
$jobID = $this->job->create();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $jobID));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
class jobModel extends model
|
||||
{
|
||||
/**
|
||||
* Get by id.
|
||||
*
|
||||
* @param int $id
|
||||
* Get by id.
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -25,7 +25,7 @@ class jobModel extends model
|
||||
|
||||
/**
|
||||
* Get job list.
|
||||
*
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
@@ -44,7 +44,7 @@ class jobModel extends model
|
||||
|
||||
/**
|
||||
* Get list by triggerType field.
|
||||
*
|
||||
*
|
||||
* @param string $triggerType
|
||||
* @param array $repoIdList
|
||||
* @access public
|
||||
@@ -107,7 +107,7 @@ class jobModel extends model
|
||||
|
||||
/**
|
||||
* Create a job.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -164,13 +164,13 @@ class jobModel extends model
|
||||
|
||||
$id = $this->dao->lastInsertId();
|
||||
$this->initJob($id, $job, $this->post->repoType);
|
||||
return true;
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a job.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -236,10 +236,10 @@ class jobModel extends model
|
||||
|
||||
/**
|
||||
* Init when create or update job.
|
||||
*
|
||||
* @param int $id
|
||||
* @param object $job
|
||||
* @param string $repoType
|
||||
*
|
||||
* @param int $id
|
||||
* @param object $job
|
||||
* @param string $repoType
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -281,8 +281,8 @@ class jobModel extends model
|
||||
|
||||
/**
|
||||
* Exec job.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @param int $id
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -321,6 +321,7 @@ class product extends control
|
||||
$this->loadModel('action')->create('product', $productID, 'opened');
|
||||
|
||||
$this->executeHooks($productID);
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $productID));
|
||||
|
||||
$openApp = $this->app->openApp;
|
||||
$moduleName = $openApp == 'program'? 'program' : $this->moduleName;
|
||||
|
||||
@@ -54,6 +54,7 @@ class productplan extends control
|
||||
|
||||
$this->executeHooks($planID);
|
||||
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $planID));
|
||||
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => 'parent.refreshPlan()'));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('productplan', 'browse', "productID=$productID&branch=$branchID")));
|
||||
}
|
||||
|
||||
@@ -124,10 +124,11 @@ class program extends control
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$projectID = $this->program->create();
|
||||
$programID = $this->program->create();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $programID));
|
||||
|
||||
$this->loadModel('action')->create('program', $projectID, 'opened');
|
||||
$this->loadModel('action')->create('program', $programID, 'opened');
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,8 @@ class projectrelease extends control
|
||||
$this->loadModel('action')->create('release', $releaseID, 'opened');
|
||||
|
||||
$this->executeHooks($releaseID);
|
||||
if($this->viewType == 'json') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $releaseID));
|
||||
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user