This commit is contained in:
tianshujie
2023-04-24 20:31:52 +08:00
parent 99956b799d
commit 5de561dc41
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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';
+2 -2
View File
@@ -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');