Little optimization in search screen when there is only one result.

This commit is contained in:
Anne-Cath
2023-11-10 14:09:01 +01:00
parent 336b5da2a7
commit 79a9960235

View File

@@ -1911,6 +1911,7 @@ class MenuBlock extends DisplayBlock
// Check concurrent lock (can only be lock if we are handling a single object
$bLocked = false;
if ($iSetCount === 1) {
$oSet->OptimizeColumnLoad(array($this->GetFilter()->GetClassAlias() => array()));
$oObj = $oSet->Fetch();
if (false === is_null($oObj)) {
if (MetaModel::GetConfig()->Get('concurrent_lock_enabled')) {