Skip to content

Commit

Permalink
move load out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbeaty committed Oct 16, 2024
1 parent f084d1e commit 22f68bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Set/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ public function getGroupTreeJson()
/* @var $entity_type Mage_Eav_Model_Entity_Type */
$entity_type = Mage::registry('entity_type');

$hiddenAttributes = Mage::helper('eav')->getHiddenAttributes($entity_type->getEntityTypeCode());

/* @var $node Mage_Eav_Model_Entity_Attribute_Group */
foreach ($groups as $node) {
$item = [];
Expand All @@ -194,8 +196,6 @@ public function getGroupTreeJson()
$item['allowDrop'] = true;
$item['allowDrag'] = true;

$hiddenAttributes = Mage::helper('eav')->getHiddenAttributes($entity_type->getEntityTypeCode());

/** @var Mage_Eav_Model_Entity_Attribute $nodeChildren */
$nodeChildren = Mage::getResourceModel($entity_type->getEntityAttributeCollection());
$nodeChildren->setEntityTypeFilter($entity_type->getEntityTypeId())
Expand Down

0 comments on commit 22f68bd

Please sign in to comment.