mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
Optimizations: DBObjectSet::Count does it without loading all the data + possibility to specify LIMIT + restored the query cache (was inoperant) + improved the debug reports + added two settings (query_cache_enabled and debug_queries)
SVN:trunk[756]
This commit is contained in:
@@ -438,7 +438,6 @@ abstract class cmdbAbstractObject extends CMDBObject
|
||||
$aAttribs[$sAttCode] = array('label' => MetaModel::GetLabel($sClassName, $sAttCode), 'description' => MetaModel::GetDescription($sClassName, $sAttCode));
|
||||
}
|
||||
$aValues = array();
|
||||
$oSet->Seek(0);
|
||||
$bDisplayLimit = isset($aExtraParams['display_limit']) ? $aExtraParams['display_limit'] : true;
|
||||
$iMaxObjects = -1;
|
||||
if ($bDisplayLimit)
|
||||
@@ -446,8 +445,10 @@ abstract class cmdbAbstractObject extends CMDBObject
|
||||
if ($oSet->Count() > utils::GetConfig()->GetMaxDisplayLimit())
|
||||
{
|
||||
$iMaxObjects = utils::GetConfig()->GetMinDisplayLimit();
|
||||
$oSet->SetLimit($iMaxObjects);
|
||||
}
|
||||
}
|
||||
$oSet->Seek(0);
|
||||
while (($oObj = $oSet->Fetch()) && ($iMaxObjects != 0))
|
||||
{
|
||||
$aRow = array();
|
||||
|
||||
Reference in New Issue
Block a user