Skip to content

Commit ac71783

Browse files
committed
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-92952
2 parents 855c001 + a305b70 commit ac71783

File tree

92 files changed

+1470
-519
lines changed

Some content is hidden

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

92 files changed

+1470
-519
lines changed

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<?= /* @escapeNotVerified */ $edition ?>
1818
class="logo">
1919
<img class="logo-img" src="<?= /* @escapeNotVerified */ $block->getViewFileUrl($logoSrc) ?>"
20-
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
20+
alt="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>" title="<?= $block->escapeHtml(__('Magento Admin Panel')) ?>"/>
2121
</a>
2222
<?php break; ?>
2323
<?php case 'user': ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<?php foreach ($block->getValues()->getAttributeBackend()->getImageTypes() as $type): ?>
3535
<td class="gallery" align="center" style="vertical-align:bottom;">
3636
<a href="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>" target="_blank" onclick="imagePreview('<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>');return false;">
37-
<img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>" src="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>?<?= /* @escapeNotVerified */ time() ?>" alt="<?= /* @escapeNotVerified */ $image->getValue() ?>" height="25" class="small-image-preview v-middle"/></a><br/>
37+
<img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= /* @escapeNotVerified */ $type ?>_<?= /* @escapeNotVerified */ $image->getValueId() ?>" src="<?= /* @escapeNotVerified */ $image->setType($type)->getSourceUrl() ?>?<?= /* @escapeNotVerified */ time() ?>" alt="<?= /* @escapeNotVerified */ $image->getValue() ?>" title="<?= /* @escapeNotVerified */ $image->getValue() ?>" height="25" class="small-image-preview v-middle"/></a><br/>
3838
<input type="file" name="<?= /* @escapeNotVerified */ $block->getElement()->getName() ?>_<?= /* @escapeNotVerified */ $type ?>[<?= /* @escapeNotVerified */ $image->getValueId() ?>]" size="1"></td>
3939
<?php endforeach; ?>
4040
<td class="gallery" align="center" style="vertical-align:bottom;"><input type="input" name="<?= /* @escapeNotVerified */ $block->getElement()->getParentName() ?>[position][<?= /* @escapeNotVerified */ $image->getValueId() ?>]" value="<?= /* @escapeNotVerified */ $image->getPosition() ?>" id="<?= $block->getElement()->getHtmlId() ?>_position_<?= /* @escapeNotVerified */ $image->getValueId() ?>" size="3"/></td>

app/code/Magento/Braintree/view/frontend/templates/paypal/button.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ $config = [
2929
class="action-braintree-paypal-logo" disabled>
3030
<img class="braintree-paypal-button-hidden"
3131
src="https://checkout.paypal.com/pwpp/2.17.6/images/pay-with-paypal.png"
32-
alt="Pay with PayPal"/>
32+
alt="<?= $block->escapeHtml(__('Pay with PayPal')) ?>"
33+
title="<?= $block->escapeHtml(__('Pay with PayPal')) ?>"/>
3334
</button>
3435
</div>

app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" />
1313
<label class="label" data-bind="attr: {'for': getCode()}">
1414
<!-- PayPal Logo -->
15-
<img data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')}"
15+
<img data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')}, title: $t('Acceptance Mark')}"
1616
class="payment-icon"/>
1717
<!-- PayPal Logo -->
1818
<span text="getTitle()"></span>

app/code/Magento/Captcha/view/frontend/web/template/checkout/captcha.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<div class="control captcha-image">
1616
<img data-bind="attr: {
1717
alt: $t('Please type the letters and numbers below'),
18+
title: $t('Please type the letters and numbers below'),
1819
height: imageHeight(),
1920
src: getImageSource(),
2021
}"

app/code/Magento/Catalog/Controller/Adminhtml/Category/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function imagePreprocessing($data)
279279
continue;
280280
}
281281

282-
$data[$attributeCode] = false;
282+
$data[$attributeCode] = '';
283283
}
284284

285285
return $data;

app/code/Magento/Catalog/Model/Indexer/Category/Product/TableMaintainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function getMainTable(int $storeId)
143143
public function createTablesForStore(int $storeId)
144144
{
145145
$mainTableName = $this->getMainTable($storeId);
146-
//Create index table for store based on on main replica table
146+
//Create index table for store based on main replica table
147147
//Using main replica table is necessary for backward capability and TableResolver plugin work
148148
$this->createTable(
149149
$this->getTable(AbstractAction::MAIN_INDEX_TABLE . $this->additionalTableSuffix),

app/code/Magento/Catalog/Model/Layer/Filter/AbstractFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ protected function _createItem($label, $value, $count = 0)
241241
}
242242

243243
/**
244-
* Get all product ids from from collection with applied filters
244+
* Get all product ids from collection with applied filters
245245
*
246246
* @return array
247247
*/

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

Lines changed: 58 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -160,63 +160,74 @@ protected function createBaseLoadSelect($entityId, $storeId, $attributeId)
160160
public function createBatchBaseSelect($storeId, $attributeId)
161161
{
162162
$linkField = $this->metadata->getLinkField();
163+
$conn = $this->getConnection();
163164

164-
$positionCheckSql = $this->getConnection()->getCheckSql(
165+
$positionCheckSql = $conn->getCheckSql(
165166
'value.position IS NULL',
166167
'default_value.position',
167168
'value.position'
168169
);
169170

170171
$mainTableAlias = $this->getMainTableAlias();
171172

172-
$select = $this->getConnection()->select()->from(
173-
[$mainTableAlias => $this->getMainTable()],
174-
[
175-
'value_id',
176-
'file' => 'value',
177-
'media_type'
178-
]
179-
)->joinInner(
180-
['entity' => $this->getTable(self::GALLERY_VALUE_TO_ENTITY_TABLE)],
181-
$mainTableAlias . '.value_id = entity.value_id',
182-
[$linkField]
183-
)->joinLeft(
184-
['value' => $this->getTable(self::GALLERY_VALUE_TABLE)],
185-
implode(
186-
' AND ',
187-
[
188-
$mainTableAlias . '.value_id = value.value_id',
189-
$this->getConnection()->quoteInto('value.store_id = ?', (int)$storeId),
190-
'value.' . $linkField . ' = entity.' . $linkField,
191-
]
192-
),
193-
[]
194-
)->joinLeft(
195-
['default_value' => $this->getTable(self::GALLERY_VALUE_TABLE)],
196-
implode(
197-
' AND ',
173+
$storeCondition = $conn->quoteInto('value.store_id = ?', (int)$storeId);
174+
$defStoreCondition = $conn->quoteInto('default_value.store_id = ?', Store::DEFAULT_STORE_ID);
175+
$select = $conn->select()
176+
->from(
177+
[$mainTableAlias => $this->getMainTable()],
198178
[
199-
$mainTableAlias . '.value_id = default_value.value_id',
200-
$this->getConnection()->quoteInto('default_value.store_id = ?', Store::DEFAULT_STORE_ID),
201-
'default_value.' . $linkField . ' = entity.' . $linkField,
179+
'value_id',
180+
'file' => 'value',
181+
'media_type'
202182
]
203-
),
204-
[]
205-
)->columns([
206-
'label' => $this->getConnection()->getIfNullSql('`value`.`label`', '`default_value`.`label`'),
207-
'position' => $this->getConnection()->getIfNullSql('`value`.`position`', '`default_value`.`position`'),
208-
'disabled' => $this->getConnection()->getIfNullSql('`value`.`disabled`', '`default_value`.`disabled`'),
209-
'label_default' => 'default_value.label',
210-
'position_default' => 'default_value.position',
211-
'disabled_default' => 'default_value.disabled'
212-
])->where(
213-
$mainTableAlias . '.attribute_id = ?',
214-
$attributeId
215-
)->where(
216-
$mainTableAlias . '.disabled = 0'
217-
)->order(
218-
$positionCheckSql . ' ' . \Magento\Framework\DB\Select::SQL_ASC
219-
);
183+
)
184+
->joinInner(
185+
['entity' => $this->getTable(self::GALLERY_VALUE_TO_ENTITY_TABLE)],
186+
$mainTableAlias . '.value_id = entity.value_id',
187+
[$linkField]
188+
)
189+
->joinLeft(
190+
['value' => $this->getTable(self::GALLERY_VALUE_TABLE)],
191+
implode(
192+
' AND ',
193+
[
194+
$mainTableAlias . '.value_id = value.value_id',
195+
$storeCondition,
196+
'value.' . $linkField . ' = entity.' . $linkField,
197+
]
198+
),
199+
[]
200+
)
201+
->joinLeft(
202+
['default_value' => $this->getTable(self::GALLERY_VALUE_TABLE)],
203+
implode(
204+
' AND ',
205+
[
206+
$mainTableAlias . '.value_id = default_value.value_id',
207+
$defStoreCondition,
208+
'default_value.' . $linkField . ' = entity.' . $linkField,
209+
]
210+
),
211+
[]
212+
)
213+
->columns([
214+
'label' => $conn->getIfNullSql('`value`.`label`', '`default_value`.`label`'),
215+
'position' => $conn->getIfNullSql('`value`.`position`', '`default_value`.`position`'),
216+
'disabled' => $conn->getIfNullSql('`value`.`disabled`', '`default_value`.`disabled`'),
217+
'label_default' => 'default_value.label',
218+
'position_default' => 'default_value.position',
219+
'disabled_default' => 'default_value.disabled'
220+
])
221+
->where($mainTableAlias . '.attribute_id = ?', $attributeId)
222+
->where($mainTableAlias . '.disabled = 0');
223+
224+
// filter entities by store
225+
if ($storeId > 0) {
226+
$orWhere = $storeCondition . ' OR '. $defStoreCondition;
227+
$select->where($orWhere);
228+
}
229+
230+
$select->order($positionCheckSql . ' ' . \Magento\Framework\DB\Select::SQL_ASC);
220231

221232
return $select;
222233
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ protected function _saveValueTitles(\Magento\Framework\Model\AbstractModel $obje
307307
}
308308

309309
/**
310-
* Get first col from from first row for option table
310+
* Get first col from first row for option table
311311
*
312312
* @param string $tableName
313313
* @param int $optionId

0 commit comments

Comments
 (0)