Skip to content

Commit 379cd9e

Browse files
author
ybohaienko
committed
Merge branch '2.1-develop' into MAGETWO-81472
2 parents 5c8b6dd + 6103b6b commit 379cd9e

File tree

21 files changed

+208
-19
lines changed

21 files changed

+208
-19
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ public function execute()
6161
if (empty($result)) {
6262
$result[] = [
6363
'severity' => (string)\Magento\Framework\Notification\MessageInterface::SEVERITY_NOTICE,
64-
'text' => 'You have viewed and resolved all recent system notices. '
65-
. 'Please refresh the web page to clear the notice alert.',
64+
'text' => __(
65+
'You have viewed and resolved all recent system notices. '
66+
. 'Please refresh the web page to clear the notice alert.'
67+
)
6668
];
6769
}
6870
$this->getResponse()->representJson($this->jsonHelper->jsonEncode($result));

app/code/Magento/AdminNotification/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ Severity,Severity
4949
"Date Added","Date Added"
5050
Message,Message
5151
Actions,Actions
52+
"You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert.","You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert."

app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function joinUrlRewrite()
311311
['request_path'],
312312
sprintf(
313313
'{{table}}.is_autogenerated = 1 AND {{table}}.store_id = %d AND {{table}}.entity_type = \'%s\'',
314-
$this->_storeManager->getStore()->getId(),
314+
$this->getStoreId(),
315315
CategoryUrlRewriteGenerator::ENTITY_TYPE
316316
),
317317
'left'

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ protected function getEntityPkName(\Magento\Eav\Model\Entity\AbstractEntity $ent
15351535
}
15361536

15371537
/**
1538-
* Add requere tax percent flag for product collection
1538+
* Add require tax percent flag for product collection
15391539
*
15401540
* @return $this
15411541
*/
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Catalog\Test\Unit\Model\ResourceModel\Category\Collection;
8+
9+
class UrlRewriteTest extends \PHPUnit_Framework_TestCase
10+
{
11+
/**
12+
* @var \PHPUnit_Framework_MockObject_MockObject
13+
*/
14+
protected $_model;
15+
16+
protected function setUp()
17+
{
18+
$this->_model = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Category\Collection::class)
19+
->disableOriginalConstructor()
20+
->setMethods(['joinTable'])
21+
->getMock();
22+
}
23+
24+
public function testStoreIdUsedByUrlRewrite()
25+
{
26+
$cond = '{{table}}.is_autogenerated = 1 AND {{table}}.store_id = 100 AND {{table}}.entity_type = \'category\'';
27+
$this->_model->expects($this->once())
28+
->method('joinTable')
29+
->with(
30+
$this->anything(),
31+
$this->anything(),
32+
$this->anything(),
33+
$this->equalTo($cond),
34+
$this->anything()
35+
);
36+
$this->_model->setStoreId(100);
37+
$this->_model->joinUrlRewrite();
38+
}
39+
}

app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,8 @@ protected function _getSuperAttributeId($productId, $attributeId)
246246
{
247247
if (isset($this->_productSuperAttrs["{$productId}_{$attributeId}"])) {
248248
return $this->_productSuperAttrs["{$productId}_{$attributeId}"];
249-
} else {
250-
return null;
251249
}
250+
return null;
252251
}
253252

254253
/**

app/code/Magento/Multishipping/Block/Checkout/AbstractMultishipping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
/**
8-
* Mustishipping checkout base abstract block
8+
* Multishipping checkout base abstract block
99
*
1010
* @author Magento Core Team <core@magentocommerce.com>
1111
*/

app/code/Magento/Multishipping/Block/Checkout/Shipping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Quote\Model\Quote\Address;
1010

1111
/**
12-
* Mustishipping checkout shipping
12+
* Multishipping checkout shipping
1313
*
1414
* @author Magento Core Team <core@magentocommerce.com>
1515
*/

app/code/Magento/Quote/Model/Quote.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2363,13 +2363,17 @@ public function merge(Quote $quote)
23632363
* Trigger collect totals after loading, if required
23642364
*
23652365
* @return $this
2366+
* @throws \Exception
23662367
*/
23672368
protected function _afterLoad()
23682369
{
23692370
// collect totals and save me, if required
23702371
if (1 == $this->getData('trigger_recollect')) {
2371-
$this->collectTotals()->save();
2372+
$this->collectTotals()
2373+
->setTriggerRecollect(0)
2374+
->save();
23722375
}
2376+
23732377
return parent::_afterLoad();
23742378
}
23752379

app/code/Magento/Sales/Model/Order/Shipment/Item.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ public function getOrderItem()
146146
* Declare qty
147147
*
148148
* @param float $qty
149-
* @return \Magento\Sales\Model\Order\Invoice\Item
150-
* @throws \Magento\Framework\Exception\LocalizedException
149+
* @return $this
151150
*/
152151
public function setQty($qty)
153152
{
@@ -159,7 +158,6 @@ public function setQty($qty)
159158
* Applying qty to order item
160159
*
161160
* @return $this
162-
* @throws \Magento\Framework\Exception\LocalizedException
163161
*/
164162
public function register()
165163
{

0 commit comments

Comments
 (0)