* Add unitcase.
This commit is contained in:
@@ -375,9 +375,12 @@ class apiModel extends model
|
||||
public function getApiListByRelease($release, $where = '1 = 1 ')
|
||||
{
|
||||
$strJoin = array();
|
||||
foreach($release->snap['apis'] as $api)
|
||||
if(isset($release->snap['apis']))
|
||||
{
|
||||
$strJoin[] = "(spec.doc = {$api['id']} and spec.version = {$api['version']} )";
|
||||
foreach($release->snap['apis'] as $api)
|
||||
{
|
||||
$strJoin[] = "(spec.doc = {$api['id']} and spec.version = {$api['version']} )";
|
||||
}
|
||||
}
|
||||
|
||||
if($strJoin) $where .= 'and (' . implode(' or ', $strJoin) . ')';
|
||||
@@ -404,7 +407,7 @@ class apiModel extends model
|
||||
$rel = $this->getRelease(0, 'byId', $release);
|
||||
|
||||
$where = "1=1 and lib = $libID ";
|
||||
if($moduleID > 0)
|
||||
if($moduleID > 0 and isset($rel->snap['modules']))
|
||||
{
|
||||
$sub = array();
|
||||
foreach($rel->snap['modules'] as $module)
|
||||
|
||||
Reference in New Issue
Block a user