Merge branch 'master' into lite
This commit is contained in:
@@ -1964,23 +1964,37 @@ class baseRouter
|
||||
$defaultParams[$name] = $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据PATH_INFO或者GET方式设置请求的参数。
|
||||
* Set params according PATH_INFO or GET.
|
||||
*/
|
||||
if($this->config->requestType != 'GET')
|
||||
if ('cli' === PHP_SAPI)
|
||||
{
|
||||
$this->setParamsByPathInfo($defaultParams);
|
||||
if ($this->params)
|
||||
{
|
||||
$this->params = array_merge($defaultParams, $this->params);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->params = $defaultParams;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setParamsByGET($defaultParams);
|
||||
}
|
||||
/**
|
||||
* 根据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');
|
||||
$_COOKIE = validater::filterParam($_COOKIE, 'cookie');
|
||||
if($this->config->framework->filterParam == 2)
|
||||
{
|
||||
$_GET = validater::filterParam($_GET, 'get');
|
||||
$_COOKIE = validater::filterParam($_COOKIE, 'cookie');
|
||||
}
|
||||
}
|
||||
|
||||
/* 调用该方法 Call the method. */
|
||||
|
||||
Reference in New Issue
Block a user