Skip to content

Commit

Permalink
Merge pull request #1658 from magento-engcom/2.1-develop-prs
Browse files Browse the repository at this point in the history
Public Pull Requests

#11804 [Backport 2.1-develop] #8236 FIX CMS blocks by @thiagolima-bm
  • Loading branch information
Oleksii Korshenko authored Nov 3, 2017
2 parents 476a1e9 + 0f682e1 commit 9bc8f13
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 9bc8f13

Please sign in to comment.