Skip to content

Commit 8c1632f

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-52660
2 parents 84121ef + 83f4f2e commit 8c1632f

File tree

276 files changed

+5019
-1442
lines changed

Some content is hidden

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

276 files changed

+5019
-1442
lines changed

.htaccess

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
DirectoryIndex index.php
3434

35+
<IfModule mod_php5.c>
3536
############################################
3637
## adjust memory limit
3738

@@ -53,7 +54,30 @@
5354
## disable user agent verification to not break multiple image upload
5455

5556
php_flag suhosin.session.cryptua off
57+
</IfModule>
58+
<IfModule mod_php7.c>
59+
############################################
60+
## adjust memory limit
61+
62+
php_value memory_limit 768M
63+
php_value max_execution_time 18000
64+
65+
############################################
66+
## disable automatic session start
67+
## before autoload was initialized
68+
69+
php_flag session.auto_start off
70+
71+
############################################
72+
## enable resulting html compression
73+
74+
#php_flag zlib.output_compression on
5675

76+
###########################################
77+
## disable user agent verification to not break multiple image upload
78+
79+
php_flag suhosin.session.cryptua off
80+
</IfModule>
5781
<IfModule mod_security.c>
5882
###########################################
5983
## disable POST processing to not break multiple image upload

.user.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
memory_limit = 768M
2+
max_execution_time = 18000
3+
session.auto_start = off
4+
suhosin.session.cryptua = off

app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,14 @@ CountryModel.prototype = {
6161
if (applyCountryElement && applyCountryElement.id) {
6262
var specifCountryElement = $(applyCountryElement.id.replace(/sallowspecific/, 'specificcountry'));
6363
var showMethodElement = $(applyCountryElement.id.replace(/sallowspecific/, 'showmethod'));
64+
// 'Use Default' checkbox of the related county list UI element
65+
var useDefaultElement = document.getElementById(specifCountryElement.id + '_inherit');
66+
6467
//var specifErrMsgElement = $(applyCountryElement.id.replace(/sallowspecific/, 'specificerrmsg'));
6568
if (specifCountryElement) {
6669
if (applyCountryElement.value == 1) {
67-
//if specific country element selected
68-
specifCountryElement.enable();
70+
// enable related country select only if its 'Use Default' checkbox is absent or is unchecked
71+
specifCountryElement.disabled = useDefaultElement ? useDefaultElement.checked : false;
6972
if (showMethodElement) {
7073
this.showElement(showMethodElement.up(1));
7174
}

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</label>
3535

3636
<div class="admin__field-control" data-role="grid-wrapper">
37-
<div class="admin__control-table-pagination" visible="!!$data.recordData().length">
37+
<div class="admin__control-table-pagination" visible="!!element.getRecordCount()">
3838
<div class="admin__data-grid-pager">
3939
<button class="action-previous" type="button" data-bind="attr: {title: $t('Previous Page')}, click: previousPage, disable: isFirst()"></button>
4040
<input class="admin__control-text" type="number" data-bind="attr: {id: ++ko.uid}, value: currentPage">
@@ -51,10 +51,10 @@
5151

5252
<th repeat="foreach: labels, item: '$label'"
5353
class="data-grid-th"
54-
translate="$label().label"
5554
visible="$label().visible"
5655
disable="$label().disabled"
5756
css="setClasses($label())">
57+
<span translate="$label().label"/>
5858
</th>
5959
</tr>
6060
</thead>

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,7 @@ protected function getBundleOptions()
342342
'selection_price_value' => '',
343343
'selection_qty' => '',
344344
],
345-
'links' => [
346-
'insertData' => '${ $.provider }:${ $.dataProvider }'
347-
],
345+
'links' => ['insertData' => '${ $.provider }:${ $.dataProvider }'],
348346
'source' => 'product',
349347
'addButton' => false,
350348
],
@@ -588,10 +586,7 @@ protected function getBundleSelections()
588586
'prefer' => 'radio',
589587
'value' => '0',
590588
'sortOrder' => 50,
591-
'valueMap' => [
592-
'false' => '0',
593-
'true' => '1'
594-
]
589+
'valueMap' => ['false' => '0', 'true' => '1']
595590
],
596591
],
597592
],
@@ -642,7 +637,8 @@ protected function getBundleSelections()
642637
'sortOrder' => 100,
643638
'validation' => [
644639
'required-entry' => true,
645-
'validate-zero-or-greater' => true
640+
'validate-number' => true,
641+
'validate-greater-than-zero' => true
646642
],
647643
'imports' => [
648644
'isInteger' => '${ $.provider }:${ $.parentScope }.selection_qty_is_integer'

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/Composite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function modifyData(array $data)
120120
'is_default' => ($productLink->getIsDefault()) ? '1' : '0',
121121
'selection_price_value' => $productLink->getPrice(),
122122
'selection_price_type' => $productLink->getPriceType(),
123-
'selection_qty' => (bool)$integerQty ? (int)$productLink->getQty() : $productLink->getQty(),
123+
'selection_qty' => $integerQty ? (int)$productLink->getQty() : $productLink->getQty(),
124124
'selection_can_change_qty' => $productLink->getCanChangeQuantity(),
125125
'selection_qty_is_integer' => (bool)$integerQty,
126126
'position' => $productLink->getPosition(),

app/code/Magento/Bundle/view/adminhtml/web/js/components/bundle-option-qty.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,28 @@ define([
1111
return Abstract.extend({
1212
defaults: {
1313
valueUpdate: 'input',
14-
isInteger: true
14+
isInteger: true,
15+
validation: {
16+
'validate-number': true
17+
}
1518
},
1619

1720
/**
18-
* update event
21+
* @inheritdoc
1922
*/
2023
onUpdate: function () {
21-
this.validation['validate-number'] = true;
2224
this.validation['validate-digits'] = this.isInteger;
23-
this.validate();
25+
this._super();
26+
},
27+
28+
/**
29+
* @inheritdoc
30+
*/
31+
hasChanged: function () {
32+
var notEqual = this.value() !== this.initialValue.toString();
33+
34+
return !this.visible() ? false : notEqual;
2435
}
36+
2537
});
2638
});

app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option/checkbox.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<input class="bundle-option-<?php /* @escapeNotVerified */ echo $_option->getId() ?> checkbox product bundle option change-container-classname"
3030
id="bundle-option-<?php /* @escapeNotVerified */ echo $_option->getId() ?>-<?php /* @escapeNotVerified */ echo $_selection->getSelectionId() ?>"
3131
type="checkbox"
32-
<?php if ($_option->getRequired()) echo 'data-validate="{\'validate-one-required-by-name\':\'input[name^=&quot;bundle_option[' . $_option->getId() . ']&quot;]:checked\'}"'?>
32+
<?php if ($_option->getRequired()) /* @escapeNotVerified */ echo 'data-validate="{\'validate-one-required-by-name\':\'input[name^=&quot;bundle_option[' . $_option->getId() . ']&quot;]:checked\'}"'?>
3333
name="bundle_option[<?php /* @escapeNotVerified */ echo $_option->getId() ?>][<?php /* @escapeNotVerified */ echo $_selection->getId() ?>]"
3434
data-selector="bundle_option[<?php /* @escapeNotVerified */ echo $_option->getId() ?>][<?php /* @escapeNotVerified */ echo $_selection->getId() ?>]"
3535
<?php if ($block->isSelected($_selection)) echo ' checked="checked"' ?>

app/code/Magento/Captcha/view/adminhtml/templates/default.phtml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77
// @codingStandardsIgnoreFile
88

9+
/** @var \Magento\Captcha\Block\Captcha\DefaultCaptcha $block */
10+
11+
/** @var \Magento\Captcha\Model\DefaultModel $captcha */
12+
$captcha = $block->getCaptchaModel();
913
?>
10-
<?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?>
11-
<?php /* @var $block \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?>
12-
<?php $captcha = $block->getCaptchaModel() ?>
1314
<div class="admin__field _required">
1415
<label for="captcha" class="admin__field-label">
15-
<span><?php /* @escapeNotVerified */ echo __('Please enter the letters from the image') ?></span>
16+
<span><?php echo $block->escapeHtml(__('Please enter the letters from the image')) ?></span>
1617
</label>
1718
<div class="admin__field-control">
1819
<input
@@ -23,7 +24,7 @@
2324
data-validate="{required:true}"/>
2425
<?php if ($captcha->isCaseSensitive()) :?>
2526
<div class="admin__field-note">
26-
<span><?php /* @escapeNotVerified */ echo __('<strong>Attention</strong>: Captcha is case sensitive.') ?></span>
27+
<span><?php echo $block->escapeHtml(__('<strong>Attention</strong>: Captcha is case sensitive.'), ['strong']) ?></span>
2728
</div>
2829
<?php endif; ?>
2930
</div>
@@ -33,7 +34,7 @@
3334
id="captcha-reload"
3435
class="captcha-reload"
3536
src="<?php echo $block->escapeUrl($block->getViewFileUrl('Magento_Captcha::reload.png')) ?>"
36-
alt="<?php /* @escapeNotVerified */ echo __('Reload captcha') ?>"/>
37+
alt="<?php echo $block->escapeHtmlAttr(__('Reload captcha')) ?>"/>
3738
<img
3839
id="<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>"
3940
width="<?php /* @noEscape */ echo (float) $block->getImgWidth() ?>"
@@ -44,7 +45,7 @@
4445
require(["prototype", "mage/captcha"], function(){
4546

4647
//<![CDATA[
47-
var captcha = new Captcha('<?php echo $block->escapeUrl($block->getRefreshUrl()) ?>', '<?php echo $block->escapeJs($block->getFormId()) ?>');
48+
var captcha = new Captcha('<?php echo $block->escapeJs($block->escapeUrl($block->getRefreshUrl())) ?>', '<?php echo $block->escapeJs($block->escapeHtml($block->getFormId())) ?>');
4849

4950
$('captcha-reload').observe('click', function () {
5051
captcha.refresh(this);

app/code/Magento/Captcha/view/frontend/templates/default.phtml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
// @codingStandardsIgnoreFile
88

9+
/** @var \Magento\Captcha\Block\Captcha\DefaultCaptcha $block */
10+
11+
/** @var \Magento\Captcha\Model\DefaultModel $captcha */
12+
$captcha = $block->getCaptchaModel();
913
?>
10-
<?php /* @var $captcha \Magento\Captcha\Model\DefaultModel */ ?>
11-
<?php /* @var $block \Magento\Captcha\Block\Captcha\DefaultCaptcha */ ?>
12-
<?php $captcha = $block->getCaptchaModel() ?>
1314
<div class="field captcha required" role="<?php echo $block->escapeHtmlAttr($block->getFormId())?>">
14-
<label for="captcha_<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?php /* @escapeNotVerified */ echo __('Please type the letters below')?></span></label>
15+
<label for="captcha_<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?php echo $block->escapeHtml(__('Please type the letters below')) ?></span></label>
1516
<div class="control captcha">
1617
<input name="<?php echo $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?php echo $block->escapeHtmlAttr($block->getFormId())?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>" />
1718
<div class="nested">
@@ -22,13 +23,13 @@
2223
"imageLoader": "<?php echo $block->escapeUrl($block->getViewFileUrl('images/loader-2.gif')) ?>",
2324
"type": "<?php echo $block->escapeHtmlAttr($block->getFormId()) ?>"}}'>
2425
<div class="control captcha-image">
25-
<img alt="<?php /* @escapeNotVerified */ echo __('Please type the letters below')?>" class="captcha-img" height="<?php /* @noEscape */ echo (float) $block->getImgHeight() ?>" src="<?php echo $block->escapeUrl($captcha->getImgSrc()) ?>"/>
26-
<button type="button" class="action reload captcha-reload" title="<?php /* @escapeNotVerified */ echo __('Reload captcha') ?>"><span><?php /* @escapeNotVerified */ echo __('Reload captcha') ?></span></button>
26+
<img alt="<?php echo $block->escapeHtmlAttr(__('Please type the letters below')) ?>" class="captcha-img" height="<?php /* @noEscape */ echo (float) $block->getImgHeight() ?>" src="<?php echo $block->escapeUrl($captcha->getImgSrc()) ?>"/>
27+
<button type="button" class="action reload captcha-reload" title="<?php echo $block->escapeHtmlAttr(__('Reload captcha')) ?>"><span><?php echo $block->escapeHtml(__('Reload captcha')) ?></span></button>
2728
</div>
2829
</div>
2930
<?php if ($captcha->isCaseSensitive()) :?>
3031
<div class="captcha-note note">
31-
<?php /* @escapeNotVerified */ echo __('<strong>Attention</strong>: Captcha is case sensitive.') ?>
32+
<?php echo $block->escapeHtml(__('<strong>Attention</strong>: Captcha is case sensitive.'), ['strong']) ?>
3233
</div>
3334
<?php endif; ?>
3435
</div>

0 commit comments

Comments
 (0)