Skip to content

Commit 5b140fa

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-88187' into 2.3-develop-pr7
2 parents 224f467 + 302a251 commit 5b140fa

File tree

36 files changed

+277
-568
lines changed

36 files changed

+277
-568
lines changed

app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function render(\Magento\Framework\DataObject $row)
2727
$this->getUrl('adminhtml/*/editGroup', ['group_id' => $row->getGroupId()]) .
2828
'">' .
2929
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
30-
'</a>';
30+
'</a><br />'
31+
. '(' . __('Code') . ': ' . $row->getGroupCode() . ')';
3132
}
3233
}

app/code/Magento/Backend/Block/System/Store/Grid/Render/Store.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function render(\Magento\Framework\DataObject $row)
2727
$this->getUrl('adminhtml/*/editStore', ['store_id' => $row->getStoreId()]) .
2828
'">' .
2929
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
30-
'</a>';
30+
'</a><br />' .
31+
'(' . __('Code') . ': ' . $row->getStoreCode() . ')';
3132
}
3233
}

app/code/Magento/Backend/Block/System/Store/Grid/Render/Website.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function render(\Magento\Framework\DataObject $row)
2424
$this->getUrl('adminhtml/*/editWebsite', ['website_id' => $row->getWebsiteId()]) .
2525
'">' .
2626
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
27-
'</a>';
27+
'</a><br />' .
28+
'(' . __('Code') . ': ' . $row->getCode() . ')';
2829
}
2930
}

app/code/Magento/CatalogUrlRewrite/Model/Storage/DbStorage.php

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,37 @@
1212
class DbStorage extends BaseDbStorage
1313
{
1414
/**
15-
* @param array $data
16-
* @return \Magento\Framework\DB\Select
15+
* {@inheritDoc}
1716
*/
1817
protected function prepareSelect(array $data)
1918
{
19+
$metadata = [];
20+
if (array_key_exists(UrlRewrite::METADATA, $data)) {
21+
$metadata = $data[UrlRewrite::METADATA];
22+
unset($data[UrlRewrite::METADATA]);
23+
}
24+
2025
$select = $this->connection->select();
21-
$select->from(['url_rewrite' => $this->resource->getTableName('url_rewrite')])
22-
->joinLeft(
23-
['relation' => $this->resource->getTableName(Product::TABLE_NAME)],
24-
'url_rewrite.url_rewrite_id = relation.url_rewrite_id'
25-
)
26-
->where('url_rewrite.entity_id IN (?)', $data['entity_id'])
27-
->where('url_rewrite.entity_type = ?', $data['entity_type'])
28-
->where('url_rewrite.store_id IN (?)', $data['store_id']);
29-
if (empty($data[UrlRewrite::METADATA]['category_id'])) {
26+
$select->from([
27+
'url_rewrite' => $this->resource->getTableName(self::TABLE_NAME)
28+
]);
29+
$select->joinLeft(
30+
['relation' => $this->resource->getTableName(Product::TABLE_NAME)],
31+
'url_rewrite.url_rewrite_id = relation.url_rewrite_id'
32+
);
33+
34+
foreach ($data as $column => $value) {
35+
$select->where('url_rewrite.' . $column . ' IN (?)', $value);
36+
}
37+
if (empty($metadata['category_id'])) {
3038
$select->where('relation.category_id IS NULL');
3139
} else {
32-
$select->where('relation.category_id = ?', $data[UrlRewrite::METADATA]['category_id']);
40+
$select->where(
41+
'relation.category_id = ?',
42+
$metadata['category_id']
43+
);
3344
}
45+
3446
return $select;
3547
}
3648
}

app/code/Magento/Checkout/view/frontend/web/js/model/step-navigator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ define([
144144
*/
145145
navigateTo: function (code, scrollToElementId) {
146146
var sortedItems = steps().sort(this.sortItems),
147-
bodyElem = $.browser.safari || $.browser.chrome ? $('body') : $('html');
147+
bodyElem = $('body');
148148

149149
scrollToElementId = scrollToElementId || null;
150150

app/code/Magento/Checkout/view/frontend/web/js/view/progress-bar.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ define([
88
'underscore',
99
'ko',
1010
'uiComponent',
11-
'Magento_Checkout/js/model/step-navigator',
12-
'jquery/jquery.hashchange'
11+
'Magento_Checkout/js/model/step-navigator'
1312
], function ($, _, ko, Component, stepNavigator) {
1413
'use strict';
1514

@@ -25,7 +24,7 @@ define([
2524
/** @inheritdoc */
2625
initialize: function () {
2726
this._super();
28-
$(window).hashchange(_.bind(stepNavigator.handleHash, stepNavigator));
27+
window.addEventListener('hashchange', _.bind(stepNavigator.handleHash, stepNavigator));
2928
stepNavigator.handleHash();
3029
},
3130

app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
require([
3333
"jquery",
3434
"uiRegistry",
35-
"jquery/jquery.hashchange",
3635
"mage/mage",
3736
"prototype",
3837
"mage/adminhtml/form",
@@ -379,7 +378,7 @@ require([
379378
return false;
380379
};
381380

382-
jQuery(window).hashchange(handleHash);
381+
window.addEventListener('hashchange', handleHash);
383382
handleHash();
384383

385384
registry.set('adminSystemConfig', adminSystemConfig);

app/code/Magento/Integration/Controller/Adminhtml/Integration/LoginSuccessCallback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ class LoginSuccessCallback extends \Magento\Integration\Controller\Adminhtml\Int
1515
*/
1616
public function execute()
1717
{
18-
$this->getResponse()->setBody('<script>setTimeout("self.close()",1000);</script>');
18+
$this->getResponse()->setBody('<script>setTimeout(self.close.bind(this), 1000);</script>');
1919
}
2020
}

app/code/Magento/PageCache/etc/varnish4.vcl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,13 @@ sub vcl_deliver {
187187
unset resp.http.Age;
188188
}
189189

190+
# Not letting browser to cache non-static files.
191+
if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
192+
set resp.http.Pragma = "no-cache";
193+
set resp.http.Expires = "-1";
194+
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
195+
}
196+
190197
unset resp.http.X-Magento-Debug;
191198
unset resp.http.X-Magento-Tags;
192199
unset resp.http.X-Powered-By;

app/code/Magento/PageCache/etc/varnish5.vcl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ sub vcl_deliver {
188188
unset resp.http.Age;
189189
}
190190

191+
# Not letting browser to cache non-static files.
192+
if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
193+
set resp.http.Pragma = "no-cache";
194+
set resp.http.Expires = "-1";
195+
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";
196+
}
197+
191198
unset resp.http.X-Magento-Debug;
192199
unset resp.http.X-Magento-Tags;
193200
unset resp.http.X-Powered-By;

0 commit comments

Comments
 (0)