Merge remote-tracking branch 'origin/release-20.0'
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
global $app;
|
||||
$config->sonarqube->form = new stdclass();
|
||||
$config->sonarqube->form->create = array();
|
||||
$config->sonarqube->form->create['appType'] = array('type' => 'string', 'required' => true, 'default' => 'sonarqube');
|
||||
@@ -8,7 +7,6 @@ $config->sonarqube->form->create['name'] = array('type' => 'string', 'req
|
||||
$config->sonarqube->form->create['url'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->sonarqube->form->create['account'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->sonarqube->form->create['password'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->sonarqube->form->create['createdBy'] = array('type' => 'string', 'required' => false, 'default' => $app->user->account);
|
||||
$config->sonarqube->form->create['createdDate'] = array('type' => 'string', 'required' => false, 'default' => helper::now());
|
||||
$config->sonarqube->form->create['private'] = array('type' => 'string', 'required' => false, 'default' => uniqid());
|
||||
|
||||
@@ -17,7 +15,6 @@ $config->sonarqube->form->edit['name'] = array('type' => 'string', 'requir
|
||||
$config->sonarqube->form->edit['url'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->sonarqube->form->edit['account'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->sonarqube->form->edit['password'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->sonarqube->form->edit['editedBy'] = array('type' => 'string', 'required' => false, 'default' => $app->user->account);
|
||||
$config->sonarqube->form->edit['editedDate'] = array('type' => 'string', 'required' => false, 'default' => helper::now());
|
||||
|
||||
$config->sonarqube->form->createProject['projectName'] = array('type' => 'string', 'required' => true);
|
||||
|
||||
@@ -137,7 +137,9 @@ class sonarqube extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$sonarqube = form::data($this->config->sonarqube->form->create)->get();
|
||||
$sonarqube = form::data($this->config->sonarqube->form->create)
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->get();
|
||||
$this->checkToken($sonarqube, 0);
|
||||
$sonarqubeID = $this->loadModel('pipeline')->create($sonarqube);
|
||||
|
||||
@@ -199,7 +201,9 @@ class sonarqube extends control
|
||||
$oldSonarQube->password = $this->post->password;
|
||||
$this->checkToken($oldSonarQube, $sonarqubeID);
|
||||
|
||||
$sonarqube = form::data($this->config->sonarqube->form->edit)->get();
|
||||
$sonarqube = form::data($this->config->sonarqube->form->edit)
|
||||
->add('editedBy', $this->app->user->account)
|
||||
->get();
|
||||
$sonarqube->token = $oldSonarQube->token;
|
||||
$this->pipeline->update($sonarqubeID, $sonarqube);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
Reference in New Issue
Block a user