kb fix
This commit is contained in:
@@ -33,6 +33,9 @@
|
||||
"Article": "Article"
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"portals": "If not empty then this article will be available only in specified portals. If empty then it will available in all portals."
|
||||
},
|
||||
"presetFilters": {
|
||||
"published": "Published"
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@
|
||||
"options": ["Article"]
|
||||
},
|
||||
"portals": {
|
||||
"type": "linkMultiple"
|
||||
"type": "linkMultiple",
|
||||
"tooltip": true
|
||||
},
|
||||
"publishDate": {
|
||||
"type": "date"
|
||||
|
||||
@@ -46,9 +46,14 @@ class KnowledgeBaseArticle extends \Espo\Core\SelectManagers\Base
|
||||
$this->filterPublished($result);
|
||||
|
||||
$this->setDistinct(true, $result);
|
||||
$this->addJoin('portals', $result);
|
||||
$this->addAndWhere(array(
|
||||
'portals.id' => $this->getUser()->get('portalId')
|
||||
$this->addLeftJoin('portals', $result);
|
||||
$this->addOrWhere(array(
|
||||
array(
|
||||
'portals.id' => $this->getUser()->get('portalId')
|
||||
),
|
||||
array(
|
||||
'portals.id' => null
|
||||
)
|
||||
), $result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user