N°1420 - Performances enhancement (enhance counts)

SVN:trunk[5844]
This commit is contained in:
Eric Espié
2018-06-08 13:13:33 +00:00
parent 04b8fe3326
commit f920851420
5 changed files with 78 additions and 20 deletions

View File

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