* code for task#1541.

This commit is contained in:
zhujinyong
2013-07-15 00:16:07 +00:00
parent 44d6401495
commit ba9e613f1d
4 changed files with 18 additions and 9 deletions
+10 -4
View File
@@ -76,16 +76,22 @@ class api extends control
$param = '';
if($action == 'extendModel')
{
foreach($_POST as $key => $value) $param .= ',' . $key . '=' . $value;
$param = ltrim($param, ',');
if(!isset($_POST['noparam']))
{
foreach($_POST as $key => $value) $param .= ',' . $key . '=' . $value;
$param = ltrim($param, ',');
}
$url = rtrim($host, '/') . inlink('getModel', "moduleName={$method->className}&methodName={$method->methodName}&params=$param", 'json');
$url .= $this->config->requestType == "PATH_INFO" ? '?' : '&';
$url .= $this->config->sessionVar . '=' . session_id();
}
else
{
foreach($_POST as $key => $value) $param .= '&' . $key . '=' . $value;
$param = ltrim($param, '&');
if(!isset($_POST['noparam']))
{
foreach($_POST as $key => $value) $param .= '&' . $key . '=' . $value;
$param = ltrim($param, '&');
}
$url = rtrim($host, '/') . $this->createLink($method->className, $method->methodName, $param, 'json');
$url .= $this->config->requestType == "PATH_INFO" ? '?' : '&';
$url .= $this->config->sessionVar . '=' . session_id();