N°1420 - Limit count

SVN:2.4[5839]
This commit is contained in:
Eric Espié
2018-06-08 09:30:10 +00:00
parent 3a34417a7d
commit 3480d478b0
3 changed files with 4 additions and 5 deletions

View File

@@ -118,8 +118,7 @@ class ApplicationContext
$oSearchFilter = new DBObjectSearch('Organization');
$oSearchFilter->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', true);
$oSet = new CMDBObjectSet($oSearchFilter);
$iCount = $oSet->Count();
if ($iCount == 1)
if ($oSet->Count(2) == 1)
{
// Only one possible value for org_id, set it in the context
$oOrg = $oSet->Fetch();