Skip to content

Commit f553937

Browse files
Merge pull request #157 from magento-okapis/API-Bug-Fixes
[Okapis] Bug Fixes
2 parents 63eeefa + 3fe2de0 commit f553937

File tree

31 files changed

+484
-62
lines changed

31 files changed

+484
-62
lines changed

app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstract
1818
public function render(\Magento\Framework\DataObject $row)
1919
{
2020
return '<span class="grid-row-title">' .
21-
$row->getTitle() .
21+
$this->escapeHtml($row->getTitle()) .
2222
'</span>' .
23-
($row->getDescription() ? '<br />' .
24-
$row->getDescription() : '');
23+
($row->getDescription() ? '<br />' . $this->escapeHtml($row->getDescription()) : '');
2524
}
2625
}

app/code/Magento/Catalog/Model/Layer/FilterList.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class FilterList
3030
* @var string[]
3131
*/
3232
protected $filterTypes = [
33-
self::CATEGORY_FILTER => 'Magento\Catalog\Model\Layer\Filter\Category',
34-
self::ATTRIBUTE_FILTER => 'Magento\Catalog\Model\Layer\Filter\Attribute',
35-
self::PRICE_FILTER => 'Magento\Catalog\Model\Layer\Filter\Price',
36-
self::DECIMAL_FILTER => 'Magento\Catalog\Model\Layer\Filter\Decimal',
33+
self::CATEGORY_FILTER => \Magento\Catalog\Model\Layer\Filter\Category::class,
34+
self::ATTRIBUTE_FILTER => \Magento\Catalog\Model\Layer\Filter\Attribute::class,
35+
self::PRICE_FILTER => \Magento\Catalog\Model\Layer\Filter\Price::class,
36+
self::DECIMAL_FILTER => \Magento\Catalog\Model\Layer\Filter\Decimal::class,
3737
];
3838

3939
/**

app/code/Magento/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ public function getAllOptions()
6363
if ($cache = $this->_configCacheType->load($cacheKey)) {
6464
$options = unserialize($cache);
6565
} else {
66-
$collection = $this->_countryFactory->create()->getResourceCollection()->loadByStore();
67-
$options = $collection->toOptionArray();
66+
/** @var \Magento\Directory\Model\Country $country */
67+
$country = $this->_countryFactory->create();
68+
/** @var \Magento\Directory\Model\ResourceModel\Country\Collection $collection */
69+
$collection = $country->getResourceCollection();
70+
$options = $collection->load()->toOptionArray();
6871
$this->_configCacheType->save(serialize($options), $cacheKey);
6972
}
7073
return $options;

app/code/Magento/Integration/etc/crontab.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
99
<group id="default">
1010
<job name="outdated_authentication_failures_cleanup" instance="Magento\Integration\Cron\CleanExpiredAuthenticationFailures" method="execute">
11-
<schedule>0 1 * * *</schedule>
11+
<schedule>* * * * *</schedule>
1212
</job>
1313
</group>
1414
</config>

app/code/Magento/LayeredNavigation/Block/Navigation.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function __construct(
5959
*/
6060
protected function _prepareLayout()
6161
{
62-
$this->renderer = $this->getChildBlock('renderer');
6362
foreach ($this->filterList->getFilters($this->_catalogLayer) as $filter) {
6463
$filter->apply($this->getRequest());
6564
}

app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ public function testGetStateHtml()
7171
$stateHtml = 'I feel good';
7272
$this->filterListMock->expects($this->any())->method('getFilters')->will($this->returnValue([]));
7373
$this->layoutMock->expects($this->at(0))->method('getChildName')
74-
->with(null, 'renderer');
75-
$this->layoutMock->expects($this->at(1))->method('getChildName')
7674
->with(null, 'state')
7775
->will($this->returnValue('state block'));
7876

app/code/Magento/Sales/Model/Order/Email/Sender/CreditmemoSender.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ public function send(Creditmemo $creditmemo, $forceSyncMode = false)
126126
$this->creditmemoResource->saveAttribute($creditmemo, ['send_email', 'email_sent']);
127127
return true;
128128
}
129+
} else {
130+
$creditmemo->setEmailSent(null);
131+
$this->creditmemoResource->saveAttribute($creditmemo, 'email_sent');
129132
}
130133

131134
$this->creditmemoResource->saveAttribute($creditmemo, 'send_email');

app/code/Magento/Sales/Model/Order/Email/Sender/InvoiceSender.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ public function send(Invoice $invoice, $forceSyncMode = false)
126126
$this->invoiceResource->saveAttribute($invoice, ['send_email', 'email_sent']);
127127
return true;
128128
}
129+
} else {
130+
$invoice->setEmailSent(null);
131+
$this->invoiceResource->saveAttribute($invoice, 'email_sent');
129132
}
130133

131134
$this->invoiceResource->saveAttribute($invoice, 'send_email');

app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ public function send(Order $order, $forceSyncMode = false)
104104
$this->orderResource->saveAttribute($order, ['send_email', 'email_sent']);
105105
return true;
106106
}
107+
} else {
108+
$order->setEmailSent(null);
109+
$this->orderResource->saveAttribute($order, 'email_sent');
107110
}
108111

109112
$this->orderResource->saveAttribute($order, 'send_email');

app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ public function send(Shipment $shipment, $forceSyncMode = false)
126126
$this->shipmentResource->saveAttribute($shipment, ['send_email', 'email_sent']);
127127
return true;
128128
}
129+
} else {
130+
$shipment->setEmailSent(null);
131+
$this->shipmentResource->saveAttribute($shipment, 'email_sent');
129132
}
130133

131134
$this->shipmentResource->saveAttribute($shipment, 'send_email');

0 commit comments

Comments
 (0)