From 17978b829b351f1980489d8a023ccf7d4e24e6c8 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Tue, 24 Dec 2019 15:08:10 +0100 Subject: [PATCH] Internal: Simplify classes FQN --- .../portal/src/Controller/BrowseBrickController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/src/Controller/BrowseBrickController.php b/datamodels/2.x/itop-portal-base/portal/src/Controller/BrowseBrickController.php index 2c26ece52f..adbb7d87ba 100644 --- a/datamodels/2.x/itop-portal-base/portal/src/Controller/BrowseBrickController.php +++ b/datamodels/2.x/itop-portal-base/portal/src/Controller/BrowseBrickController.php @@ -20,7 +20,9 @@ namespace Combodo\iTop\Portal\Controller; +use AttributeLinkedSetIndirect; use Combodo\iTop\Portal\Helper\BrowseBrickHelper; +use DBObjectSearch; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -133,10 +135,10 @@ class BrowseBrickController extends BrickController $aRealiasingMap = array(); $oParentAtt = MetaModel::GetAttributeDef($aLevelsProperties[$aLevelsPropertiesKeys[$i + 1]]['search']->GetClass(), $aLevelsProperties[$aLevelsPropertiesKeys[$i + 1]]['parent_att']); // If we work on a n:n link - if($oParentAtt instanceof \AttributeLinkedSetIndirect) + if($oParentAtt instanceof AttributeLinkedSetIndirect) { // Create a DBSearch from Link class - $oSubSearch = new \DBObjectSearch($oParentAtt->GetLinkedClass()); + $oSubSearch = new DBObjectSearch($oParentAtt->GetLinkedClass()); // Join it to the bottom query $oSubSearch = $oSubSearch->Join($aLevelsProperties[$aLevelsPropertiesKeys[$i + 1]]['search'], DBSearch::JOIN_POINTING_TO, $oParentAtt->GetExtKeyToMe(), TREE_OPERATOR_EQUALS, $aRealiasingMap); @@ -332,7 +334,7 @@ class BrowseBrickController extends BrickController { $sParentAttCode = $aLevelsProperties[$aLevelProperties['levels'][0]]['parent_att']; $oParentAtt = MetaModel::GetAttributeDef($oQuery->GetClass(), $sParentAttCode); - if($oParentAtt instanceof \AttributeLinkedSetIndirect) + if($oParentAtt instanceof AttributeLinkedSetIndirect) { $oQuery->AddConditionAdvanced($sParentAttCode.'->'.$oParentAtt->GetExtKeyToRemote(), $sNodeId); }