diff --git a/module/api/control.php b/module/api/control.php index 8d6119d57e..b338cac69b 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -167,7 +167,7 @@ class api extends control if(!strpos($this->server->http_referer, 'space') and !strpos($this->server->http_referer, 'api')) setCookie("docSpaceParam", '', $this->config->cookieLife, $this->config->webRoot, '', false, true); /* Get all api doc libraries. */ - $libs = $this->doc->getApiLibs($libID); + $libs = $this->doc->getApiLibs($libID, $this->objectType, $this->objectID); $api = $this->api->getLibById($apiID, $version, $release); if($api) { @@ -183,7 +183,7 @@ class api extends control } /* Crumbs links array. */ - $lib = zget($libs, $libID); + $lib = zget($libs, $libID); $type = $lib->product ? 'product' : ($lib->project ? 'project' : 'unlink'); $methodName = $type != 'unlink' ? $type . 'Space' : 'index'; diff --git a/module/doc/model.php b/module/doc/model.php index 95d3d5f976..7a6611d5a6 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -47,13 +47,13 @@ class docModel extends model $libs = $this->dao->select('*')->from(TABLE_DOCLIB) ->where('deleted')->eq(0) ->andWhere('type')->eq('api') - ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() - ->beginIF(!empty($objectType) && $objectID > 0 and $objectType != 'nolink')->andWhere($objectType)->eq($objectID)->fi() + ->beginIF(!empty($objectType) and $objectID > 0 and $objectType != 'nolink')->andWhere($objectType)->eq($objectID)->fi() ->beginIF($objectType == 'nolink') ->andWhere('product')->eq(0) ->andWhere('project')->eq(0) ->andWhere('execution')->eq(0) ->fi() + ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() ->orderBy('order_asc, id_asc') ->fetchAll('id');