* adjust for getURI in flow.
This commit is contained in:
@@ -47,6 +47,14 @@ class router extends baseRouter
|
||||
*/
|
||||
public $rawParams;
|
||||
|
||||
/**
|
||||
* 原始URI
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $rawURI;
|
||||
|
||||
/**
|
||||
* 标记是否是工作流
|
||||
* Whether the tag is a workflow
|
||||
@@ -422,6 +430,8 @@ class router extends baseRouter
|
||||
*/
|
||||
public function setFlowURI($moduleName, $methodName)
|
||||
{
|
||||
$this->rawURI = $this->URI;
|
||||
|
||||
$this->setModuleName($moduleName);
|
||||
$this->setMethodName($methodName);
|
||||
|
||||
@@ -495,6 +505,25 @@ class router extends baseRouter
|
||||
if($this->get->display == 'card') $this->viewType = 'xhtml';
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取$URL。
|
||||
* Get the $URL.
|
||||
*
|
||||
* @param bool $full true, the URI contains the webRoot, else only hte URI.
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getURI($full = false)
|
||||
{
|
||||
$URI = !empty($this->rawURI) ? $this->rawURI : $this->URI;
|
||||
if($full and $this->config->requestType == 'PATH_INFO')
|
||||
{
|
||||
if($URI) return $this->config->webRoot . $URI . '.' . $this->viewType;
|
||||
return $this->config->webRoot;
|
||||
}
|
||||
return $URI;
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果$this->isFlow的值为true,说明这个请求需要工作流引擎来处理,则要根据工作流引擎的需要重新设置参数。
|
||||
* If the values of $this->isFlow is true, indicating that the request needs to be processed
|
||||
|
||||
Reference in New Issue
Block a user