Merge branch 'liyuchun_fixbug' into 'master'
* Fix bug for cli. See merge request easycorp/zentaopms!3607
This commit is contained in:
@@ -2075,6 +2075,19 @@ class baseRouter
|
||||
$defaultParams[$name] = $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据PATH_INFO或者GET方式设置请求的参数。
|
||||
* Set params according PATH_INFO or GET.
|
||||
*/
|
||||
if($this->config->requestType != 'GET')
|
||||
{
|
||||
$this->setParamsByPathInfo($defaultParams);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setParamsByGET($defaultParams);
|
||||
}
|
||||
|
||||
if ('cli' === PHP_SAPI)
|
||||
{
|
||||
if ($this->params)
|
||||
@@ -2088,19 +2101,6 @@ class baseRouter
|
||||
}
|
||||
else
|
||||
{
|
||||
/**
|
||||
* 根据PATH_INFO或者GET方式设置请求的参数。
|
||||
* Set params according PATH_INFO or GET.
|
||||
*/
|
||||
if($this->config->requestType != 'GET')
|
||||
{
|
||||
$this->setParamsByPathInfo($defaultParams);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setParamsByGET($defaultParams);
|
||||
}
|
||||
|
||||
if($this->config->framework->filterParam == 2)
|
||||
{
|
||||
$_GET = validater::filterParam($_GET, 'get');
|
||||
|
||||
@@ -204,6 +204,7 @@ class repoModel extends model
|
||||
{
|
||||
if($this->post->gitlabHost == '') dao::$errors['gitlabHost'] = sprintf($this->lang->error->notempty, $this->lang->repo->gitlabHost);
|
||||
if($this->post->gitlabProject == '') dao::$errors['gitlabProject'] = sprintf($this->lang->error->notempty, $this->lang->repo->gitlabProject);
|
||||
if(dao::isError()) return false;
|
||||
}
|
||||
|
||||
$data = fixer::input('post')
|
||||
|
||||
Reference in New Issue
Block a user