Skip to content

Commit

Permalink
MAGETWO-83101: [Backport 2.3-develop] #8236 FIX CMS blocks #11805
Browse files Browse the repository at this point in the history
  • Loading branch information
ishakhsuvarov authored Nov 2, 2017
2 parents 1781feb + c0ad13c commit da2fd77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/Cms/Model/ResourceModel/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ public function getIsUniqueBlockToStores(AbstractModel $object)
$entityMetadata = $this->metadataPool->getMetadata(BlockInterface::class);
$linkField = $entityMetadata->getLinkField();

if ($this->_storeManager->hasSingleStore()) {
if ($this->_storeManager->isSingleStoreMode()) {
$stores = [Store::DEFAULT_STORE_ID];
} else {
$stores = (array)$object->getData('stores');
$stores = (array)$object->getData('store_id');
}

$select = $this->getConnection()->select()
Expand Down Expand Up @@ -230,7 +230,7 @@ public function lookupStoreIds($id)
'cbs.' . $linkField . ' = cb.' . $linkField,
[]
)
->where('cb.' . $entityMetadata->getIdentifierField() . ' = :block_id');
->where('cb.' . $entityMetadata->getIdentifierField() . ' = :block_id');

return $connection->fetchCol($select, ['block_id' => (int)$id]);
}
Expand Down

0 comments on commit da2fd77

Please sign in to comment.