Skip to content

Commit

Permalink
Changed Validation to get store for block #11601
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagolima-bm authored and dmanners committed Nov 1, 2017
1 parent b0add65 commit fca3b5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/Cms/Model/ResourceModel/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ 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('store_id');
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 fca3b5e

Please sign in to comment.