Skip to content

Commit b89e484

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/develop' into MAGETWO-39769-pk-autoincrement
2 parents db71778 + 4517819 commit b89e484

File tree

328 files changed

+15225
-1778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

328 files changed

+15225
-1778
lines changed

app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,19 @@ protected function _prepareCollection()
8484
return parent::_prepareCollection();
8585
}
8686

87+
/**
88+
* Process collection after loading
89+
*
90+
* @return $this
91+
*/
92+
protected function _afterLoadCollection()
93+
{
94+
foreach ($this->getCollection() as $item) {
95+
$item->getCustomer() ?: $item->setCustomer('Guest');
96+
}
97+
return $this;
98+
}
99+
87100
/**
88101
* Prepares page sizes for dashboard grid with las 5 orders
89102
*

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function isWebsiteSelected(\Magento\Store\Model\Website $website)
211211
public function getWebsiteId()
212212
{
213213
if (!$this->hasData('website_id')) {
214-
$this->setData('website_id', $this->getRequest()->getParam($this->getWebsiteVarName()));
214+
$this->setData('website_id', (int)$this->getRequest()->getParam($this->getWebsiteVarName()));
215215
}
216216
return $this->getData('website_id');
217217
}
@@ -289,7 +289,7 @@ public function isStoreGroupSelected(\Magento\Store\Model\Group $group)
289289
public function getStoreGroupId()
290290
{
291291
if (!$this->hasData('store_group_id')) {
292-
$this->setData('store_group_id', $this->getRequest()->getParam($this->getStoreGroupVarName()));
292+
$this->setData('store_group_id', (int)$this->getRequest()->getParam($this->getStoreGroupVarName()));
293293
}
294294
return $this->getData('store_group_id');
295295
}
@@ -339,7 +339,7 @@ public function getStores($group)
339339
public function getStoreId()
340340
{
341341
if (!$this->hasData('store_id')) {
342-
$this->setData('store_id', $this->getRequest()->getParam($this->getStoreVarName()));
342+
$this->setData('store_id', (int)$this->getRequest()->getParam($this->getStoreVarName()));
343343
}
344344
return $this->getData('store_id');
345345
}

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ require(['jquery'], function(jQuery){
174174
if (confirm("<?php /* @escapeNotVerified */ echo __('Please confirm scope switching. All data that hasn\'t been saved will be lost.') ?>")) {
175175
reload();
176176
} else {
177-
obj.value = '<?php /* @escapeNotVerified */ echo $block->getStoreId() ?>';
177+
obj.value = '<?php echo $block->escapeHtml($block->getStoreId()) ?>';
178178
}
179179
<?php else: ?>
180180
reload();

app/code/Magento/Catalog/Api/CategoryManagementInterface.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ public function getTree($rootCategoryId = null, $depth = null);
3333
* @throws \Magento\Framework\Exception\NoSuchEntityException
3434
*/
3535
public function move($categoryId, $parentId, $afterId = null);
36+
37+
/**
38+
* Provide the number of category count
39+
*
40+
* @return int
41+
*/
42+
public function getCount();
3643
}

0 commit comments

Comments
 (0)