mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
Do not perform time consuming computations for building the menus if there are too many objects in a list (limit is configurable).
SVN:1.2.1[2343]
This commit is contained in:
@@ -1181,7 +1181,8 @@ class MenuBlock extends DisplayBlock
|
||||
$aStates = MetaModel::EnumStates($sClass);
|
||||
// Do not perform time consuming computations if there are too may objects in the list
|
||||
$iLimit = MetaModel::GetConfig()->Get('complex_actions_limit');
|
||||
if (($iLimit > 0) && ($oSet->Count() < $iLimit) && (count($aStates) > 0))
|
||||
|
||||
if ((count($aStates) > 0) && (($iLimit == 0) || ($oSet->Count() < $iLimit)))
|
||||
{
|
||||
// Life cycle actions may be available... if all objects are in the same state
|
||||
$oSet->Rewind();
|
||||
|
||||
Reference in New Issue
Block a user