Skip to content

Commit 373cbfd

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-48935: disable flags for category and product flat tables
1 parent 0e2a4ad commit 373cbfd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Catalog/Observer/AddCatalogToTopmenuItemsObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected function _addCategoriesToMenu($categories, $parentCategoryNode, $block
7575
$categoryNode = new \Magento\Framework\Data\Tree\Node($categoryData, 'id', $tree, $parentCategoryNode);
7676
$parentCategoryNode->addChild($categoryNode);
7777

78-
if ($this->categoryFlatState->isFlatEnabled() && $category->getUseFlatResource()) {
78+
if ($this->categoryFlatState->isAvailable() && $category->getUseFlatResource()) {
7979
$subcategories = (array)$category->getChildrenNodes();
8080
} else {
8181
$subcategories = $category->getChildren();

app/code/Magento/Catalog/Test/Unit/Observer/AddCatalogToTopmenuItemsObserverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function setUp()
5454

5555
$this->_categoryFlatState = $this->getMock(
5656
'\Magento\Catalog\Model\Indexer\Category\Flat\State',
57-
['isFlatEnabled'],
57+
['isAvailable'],
5858
[],
5959
'',
6060
false
@@ -168,7 +168,7 @@ public function testAddCatalogToTopMenuItemsWithFlat()
168168
->will($this->returnValue(true));
169169

170170
$this->_categoryFlatState->expects($this->once())
171-
->method('isFlatEnabled')
171+
->method('isAvailable')
172172
->will($this->returnValue(true));
173173

174174
$this->_observer->execute($observer);

0 commit comments

Comments
 (0)