Skip to content

Commit 1dc6c4e

Browse files
author
Olexandr Lysenko
committed
Merge remote-tracking branch 'origin' into bugfixes
2 parents 2c6676e + ada45cc commit 1dc6c4e

File tree

192 files changed

+1924
-777
lines changed

Some content is hidden

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

192 files changed

+1924
-777
lines changed

app/code/Magento/Catalog/Model/Product/Image.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,7 @@ public function setBaseFile($file)
498498
$path = [
499499
$this->_catalogProductMediaConfig->getBaseMediaPath(),
500500
'cache',
501-
$this->_storeManager->getStore()->getId(),
502-
$path[] = $this->getDestinationSubdir(),
501+
$this->getDestinationSubdir(),
503502
];
504503
if (!empty($this->_width) || !empty($this->_height)) {
505504
$path[] = "{$this->_width}x{$this->_height}";

app/code/Magento/Catalog/Test/Unit/Model/Product/ImageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function testSetGetBaseFile()
180180
$this->image->setBaseFile('/somefile.png');
181181
$this->assertEquals('catalog/product/somefile.png', $this->image->getBaseFile());
182182
$this->assertEquals(
183-
'catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png',
183+
'catalog/product/cache//beff4985b56e3afdbeabfc89641a4582/somefile.png',
184184
$this->image->getNewFile()
185185
);
186186
}
@@ -302,7 +302,7 @@ public function testGetUrl()
302302
$this->testSetGetBaseFile();
303303
$url = $this->image->getUrl();
304304
$this->assertEquals(
305-
'http://magento.com/media/catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png',
305+
'http://magento.com/media/catalog/product/cache//beff4985b56e3afdbeabfc89641a4582/somefile.png',
306306
$url
307307
);
308308
}

app/code/Magento/CatalogInventory/Setup/UpgradeData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(
5454
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
5555
{
5656
$setup->startSetup();
57-
if (version_compare($context->getVersion(), '2.0.2') < 0) {
57+
if (version_compare($context->getVersion(), '2.2.0') < 0) {
5858
$this->upgradeCatalogInventoryStockItem($setup);
5959
}
6060
$setup->endSetup();

app/code/Magento/CatalogInventory/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_CatalogInventory" setup_version="2.0.2">
9+
<module name="Magento_CatalogInventory" setup_version="2.2.0">
1010
<sequence>
1111
<module name="Magento_Catalog"/>
1212
</sequence>

app/code/Magento/CatalogWidget/view/frontend/templates/product/widget/content/grid.phtml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
$mode = 'grid';
1616

1717
$image = 'new_products_content_widget_grid';
18-
$title = $block->getTitle() ? __($block->getTitle()) : '';
1918
$items = $block->getProductCollection()->getItems();
2019

2120
$showWishlist = true;
@@ -25,9 +24,9 @@
2524
$description = false;
2625
?>
2726
<div class="block widget block-products-list <?php /* @noEscape */ echo $mode; ?>">
28-
<?php if ($title): ?>
27+
<?php if ($block->getTitle()): ?>
2928
<div class="block-title">
30-
<strong><?php echo $block->escapeHtml($title); ?></strong>
29+
<strong><?php echo $block->escapeHtml(__($block->getTitle())); ?></strong>
3130
</div>
3231
<?php endif ?>
3332
<div class="block-content">
@@ -64,27 +63,23 @@
6463
<div class="actions-primary">
6564
<?php if ($_item->isSaleable()): ?>
6665
<?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
67-
<button class="action tocart primary"
68-
data-mage-init='{"redirectUrl":{"url":"<?php echo $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}'
69-
type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
70-
<span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
66+
<button class="action tocart primary" data-mage-init='{"redirectUrl":{"url":"<?php echo $block->escapeUrl($block->getAddToCartUrl($_item)) ?>"}}' type="button" title="<?php echo $block->escapeHtmlAttr(__('Add to Cart')) ?>">
67+
<span><?php echo $block->escapeHtml(__('Add to Cart')) ?></span>
7168
</button>
7269
<?php else: ?>
7370
<?php
7471
$postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper');
7572
$postData = $postDataHelper->getPostData($block->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
7673
?>
77-
<button class="action tocart primary"
78-
data-post='<?php /* @noEscape */ echo $postData; ?>'
79-
type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>">
80-
<span><?php /* @escapeNotVerified */ echo __('Add to Cart') ?></span>
74+
<button class="action tocart primary" data-post='<?php /* @noEscape */ echo $postData; ?>' type="button" title="<?php echo $block->escapeHtmlAttr(__('Add to Cart')) ?>">
75+
<span><?php echo $block->escapeHtml(__('Add to Cart')) ?></span>
8176
</button>
8277
<?php endif; ?>
8378
<?php else: ?>
8479
<?php if ($_item->getIsSalable()): ?>
85-
<div class="stock available"><span><?php /* @escapeNotVerified */ echo __('In stock') ?></span></div>
80+
<div class="stock available"><span><?php echo $block->escapeHtml(__('In stock')) ?></span></div>
8681
<?php else: ?>
87-
<div class="stock unavailable"><span><?php /* @escapeNotVerified */ echo __('Out of stock') ?></span></div>
82+
<div class="stock unavailable"><span><?php echo $block->escapeHtml(__('Out of stock')) ?></span></div>
8883
<?php endif; ?>
8984
<?php endif; ?>
9085
</div>
@@ -93,18 +88,14 @@
9388
<div class="actions-secondary" data-role="add-to-links">
9489
<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
9590
<a href="#"
96-
data-post='<?php /* @noEscape */ echo $block->getAddToWishlistParams($_item); ?>'
97-
class="action towishlist" data-action="add-to-wishlist"
98-
title="<?php /* @escapeNotVerified */ echo __('Add to Wish List') ?>">
99-
<span><?php /* @escapeNotVerified */ echo __('Add to Wish List') ?></span>
91+
data-post='<?php /* @noEscape */ echo $block->getAddToWishlistParams($_item); ?>' class="action towishlist" data-action="add-to-wishlist" title="<?php echo $block->escapeHtmlAttr(__('Add to Wish List')) ?>">
92+
<span><?php echo $block->escapeHtml(__('Add to Wish List')) ?></span>
10093
</a>
10194
<?php endif; ?>
10295
<?php if ($block->getAddToCompareUrl() && $showCompare): ?>
10396
<?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
104-
<a href="#" class="action tocompare"
105-
data-post='<?php /* @noEscape */ echo $compareHelper->getPostDataParams($_item);?>'
106-
title="<?php /* @escapeNotVerified */ echo __('Add to Compare') ?>">
107-
<span><?php /* @escapeNotVerified */ echo __('Add to Compare') ?></span>
97+
<a href="#" class="action tocompare" data-post='<?php /* @noEscape */ echo $compareHelper->getPostDataParams($_item);?>' title="<?php echo $block->escapeHtmlAttr(__('Add to Compare')) ?>">
98+
<span><?php echo $block->escapeHtml(__('Add to Compare')) ?></span>
10899
</a>
109100
<?php endif; ?>
110101
</div>

app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ $_height = $block->getImagesHeight();
2121
<?php endif; ?>
2222
</p>
2323
<?php if ($block->getFileWidth($file)): ?>
24-
<small><?php echo $block->escapeHtml($block->getFileWidth($file)) ?>x<?php echo $block->escapeHtml($block->getFileHeight($file)) ?> <?php /* @escapeNotVerified */ echo __('px.') ?></small><br/>
24+
<small><?php echo $block->escapeHtml($block->getFileWidth($file)) ?>x<?php echo $block->escapeHtml($block->getFileHeight($file)) ?> <?php echo $block->escapeHtml(__('px.')) ?></small><br/>
2525
<?php endif; ?>
2626
<small><?php echo $block->escapeHtml($block->getFileShortName($file)); ?></small>
2727
</div>
2828
<?php endforeach; ?>
2929
<?php else: ?>
30-
<div class="empty"><?php /* @escapeNotVerified */ echo __('No files found') ?></div>
30+
<div class="empty"><?php echo $block->escapeHtml(__('No files found')) ?></div>
3131
<?php endif; ?>

app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<div id="<?php echo $block->getHtmlId() ?>" class="uploader">
1313
<span class="fileinput-button form-buttons">
14-
<span><?php /* @escapeNotVerified */ echo __('Browse Files...') ?></span>
14+
<span><?php echo $block->escapeHtml(__('Browse Files...')) ?></span>
1515
<input class="fileupload" type="file" name="<?php echo $block->escapeHtmlAttr($block->getConfig()->getFileField()) ?>" data-url="<?php echo $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple>
1616
</span>
1717
<div class="clear"></div>

app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<div class="tree-panel" >
1212
<div class="categories-side-col">
1313
<div class="tree-actions">
14-
<a onclick="jQuery('[data-role=tree]').jstree('close_all');"><?php /* @escapeNotVerified */ echo __('Collapse All'); ?></a>
14+
<a onclick="jQuery('[data-role=tree]').jstree('close_all');"><?php echo $block->escapeHtml(__('Collapse All')) ?></a>
1515
<span class="separator">|</span>
16-
<a onclick="jQuery('[data-role=tree]').jstree('open_all');"><?php /* @escapeNotVerified */ echo __('Expand All'); ?></a>
16+
<a onclick="jQuery('[data-role=tree]').jstree('open_all');"><?php echo $block->escapeHtml(__('Expand All')) ?></a>
1717
</div>
1818
</div>
1919
<div data-role="tree" data-mage-init='<?php echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getTreeWidgetOptions())); ?>'>

app/code/Magento/Cms/view/frontend/templates/widget/link/link_block.phtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
* Copyright © 2016 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
/**
8+
* @var \Magento\Cms\Block\Widget\Page\Link $block
9+
*/
610
?>
711
<div class="widget block block-cms-link">
8-
<a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes() ?>>
12+
<a <?php /* @noEscape */ echo $block->getLinkAttributes() ?>>
913
<span><?php echo $block->escapeHtml($block->getLabel()) ?></span>
1014
</a>
1115
</div>

app/code/Magento/Cms/view/frontend/templates/widget/link/link_inline.phtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
* Copyright © 2016 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
7+
/**
8+
* @var \Magento\Cms\Block\Widget\Page\Link $block
9+
*/
610
?>
711
<span class="widget block block-cms-link-inline">
8-
<a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes() ?>>
12+
<a <?php /* @noEscape */ echo $block->getLinkAttributes() ?>>
913
<span><?php echo $block->escapeHtml($block->getLabel()) ?></span>
1014
</a>
1115
</span>

0 commit comments

Comments
 (0)