Skip to content

Commit bf68656

Browse files
committed
Merge branch '2.3-develop' into MAGETWO-87592-static-test-less
2 parents af960ed + ec06e89 commit bf68656

File tree

41 files changed

+376
-783
lines changed

Some content is hidden

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

41 files changed

+376
-783
lines changed

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

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -659,25 +659,30 @@ protected function makeTempCategoryTreeIndex()
659659
*/
660660
protected function fillTempCategoryTreeIndex($temporaryName)
661661
{
662-
// This finds all children (cc2) that descend from a parent (cc) by path.
663-
// For example, cc.path may be '1/2', and cc2.path may be '1/2/3/4/5'.
664-
$temporarySelect = $this->connection->select()->from(
665-
['cc' => $this->getTable('catalog_category_entity')],
666-
['parent_id' => 'entity_id']
667-
)->joinInner(
668-
['cc2' => $this->getTable('catalog_category_entity')],
669-
'cc2.path LIKE ' . $this->connection->getConcatSql(
670-
[$this->connection->quoteIdentifier('cc.path'), $this->connection->quote('/%')]
671-
),
672-
['child_id' => 'entity_id']
662+
$selects = $this->prepareSelectsByRange(
663+
$this->connection->select()
664+
->from(
665+
['c' => $this->getTable('catalog_category_entity')],
666+
['entity_id', 'path']
667+
),
668+
'entity_id'
673669
);
674670

675-
$this->connection->query(
676-
$temporarySelect->insertFromSelect(
677-
$temporaryName,
678-
['parent_id', 'child_id']
679-
)
680-
);
671+
foreach ($selects as $select) {
672+
$values = [];
673+
674+
foreach ($this->connection->fetchAll($select) as $category) {
675+
foreach (explode('/', $category['path']) as $parentId) {
676+
if ($parentId !== $category['entity_id']) {
677+
$values[] = [$parentId, $category['entity_id']];
678+
}
679+
}
680+
}
681+
682+
if (count($values) > 0) {
683+
$this->connection->insertArray($temporaryName, ['parent_id', 'child_id'], $values);
684+
}
685+
}
681686
}
682687

683688
/**

app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $viewModel = $block->getData('viewModel');
1111
"breadcrumbs": {
1212
"categoryUrlSuffix": "<?= $block->escapeHtml($viewModel->getCategoryUrlSuffix()); ?>",
1313
"useCategoryPathInUrl": <?= (int)$viewModel->isCategoryUsedInProductUrl(); ?>,
14-
"product": "<?= $block->escapeHtml($viewModel->getProductName()); ?>"
14+
"product": "<?= $block->escapeHtml($block->escapeJsQuote($viewModel->getProductName(), '"')); ?>"
1515
}
1616
}'>
1717
</div>

app/code/Magento/Review/view/frontend/templates/redirect.phtml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88

99
?>
1010
<?php
11-
/* if(isset($GET['limit'])) {
12-
$limit = $GET['limit']
13-
}*/
1411
header("Location:{$block->getProduct()->getProductUrl()}#info-product_reviews");
1512
exit;
1613
?>

app/code/Magento/Sales/Model/Order/ItemRepository.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function get($id)
117117
}
118118

119119
$this->addProductOption($orderItem);
120+
$this->addParentItem($orderItem);
120121
$this->registry[$id] = $orderItem;
121122
}
122123
return $this->registry[$id];
@@ -216,6 +217,20 @@ protected function addProductOption(OrderItemInterface $orderItem)
216217
return $this;
217218
}
218219

220+
/**
221+
* Set parent item.
222+
*
223+
* @param OrderItemInterface $orderItem
224+
* @throws InputException
225+
* @throws NoSuchEntityException
226+
*/
227+
private function addParentItem(OrderItemInterface $orderItem)
228+
{
229+
if ($parentId = $orderItem->getParentItemId()) {
230+
$orderItem->setParentItem($this->get($parentId));
231+
}
232+
}
233+
219234
/**
220235
* Set product options data
221236
*

app/code/Magento/Ui/etc/ui_configuration.xsd

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,29 @@
209209
</xs:choice>
210210
</xs:group>
211211

212+
<xs:group name="formElementsConfig">
213+
<xs:choice>
214+
<xs:element name="hidden" type="formElementHidden" maxOccurs="unbounded"/>
215+
<xs:element name="file" type="formElementFile" maxOccurs="unbounded"/>
216+
<xs:element name="input" type="formElementInput" maxOccurs="unbounded"/>
217+
<xs:element name="date" type="formElementDate" maxOccurs="unbounded"/>
218+
<xs:element name="boolean" type="formElementBoolean" maxOccurs="unbounded"/>
219+
<xs:element name="checkbox" type="formElementCheckbox" maxOccurs="unbounded"/>
220+
<xs:element name="checkboxset" type="formElementCheckboxset" maxOccurs="unbounded"/>
221+
<xs:element name="email" type="formElementEmail" maxOccurs="unbounded"/>
222+
<xs:element name="select" type="formElementSelect" maxOccurs="unbounded"/>
223+
<xs:element name="multiselect" type="formElementMultiselect" maxOccurs="unbounded"/>
224+
<xs:element name="text" type="formElementText" maxOccurs="unbounded"/>
225+
<xs:element name="textarea" type="formElementTextarea" maxOccurs="unbounded"/>
226+
<xs:element name="price" type="formElementPrice" maxOccurs="unbounded"/>
227+
<xs:element name="radioset" type="formElementRadioset" maxOccurs="unbounded"/>
228+
<xs:element name="wysiwyg" type="formElementWysiwyg" maxOccurs="unbounded"/>
229+
<xs:element name="fileUploader" type="formElementFileUploader" maxOccurs="unbounded"/>
230+
<xs:element name="imageUploader" type="formElementImageUploader" maxOccurs="unbounded"/>
231+
<xs:element name="button" type="formElementButton" maxOccurs="unbounded"/>
232+
</xs:choice>
233+
</xs:group>
234+
212235
<xs:complexType name="componentListingConfigured">
213236
<xs:complexContent>
214237
<xs:extension base="componentListing">
@@ -287,7 +310,7 @@
287310
</xs:annotation>
288311
<xs:complexType>
289312
<xs:choice minOccurs="1" maxOccurs="unbounded">
290-
<xs:group ref="formElements"/>
313+
<xs:group ref="formElementsConfig"/>
291314
</xs:choice>
292315
</xs:complexType>
293316
</xs:element>

app/code/Magento/Ui/view/base/ui_component/etc/definition/boolean.xsd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
<xs:complexType name="componentBoolean">
1313
<xs:sequence>
1414
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
15+
<xs:element name="settings" minOccurs="0" maxOccurs="1">
16+
<xs:complexType>
17+
<xs:choice maxOccurs="unbounded" minOccurs="0">
18+
<xs:group ref="abstractSettings"/>
19+
<xs:group ref="componentBooleanSettings"/>
20+
</xs:choice>
21+
</xs:complexType>
22+
</xs:element>
23+
</xs:sequence>
24+
<xs:attributeGroup ref="ui_element_attributes"/>
25+
</xs:complexType>
26+
27+
<xs:complexType name="formElementBoolean">
28+
<xs:sequence>
1529
<xs:element name="settings" minOccurs="0" maxOccurs="1">
1630
<xs:complexType>
1731
<xs:choice maxOccurs="unbounded" minOccurs="0">
@@ -25,7 +39,6 @@
2539

2640
<xs:group name="componentBooleanSettings">
2741
<xs:choice>
28-
<xs:group ref="abstractSettings"/>
2942
</xs:choice>
3043
</xs:group>
3144
</xs:schema>

app/code/Magento/Ui/view/base/ui_component/etc/definition/button.xsd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@
2323
<xs:attributeGroup ref="ui_element_attributes"/>
2424
</xs:complexType>
2525

26+
<xs:complexType name="formElementButton">
27+
<xs:sequence>
28+
<xs:element name="settings" minOccurs="0" maxOccurs="1">
29+
<xs:complexType>
30+
<xs:choice minOccurs="0" maxOccurs="unbounded">
31+
<xs:group ref="componentButtonSettings"/>
32+
</xs:choice>
33+
</xs:complexType>
34+
</xs:element>
35+
</xs:sequence>
36+
<xs:attributeGroup ref="ui_element_attributes"/>
37+
</xs:complexType>
38+
2639
<xs:group name="componentButtonSettings">
2740
<xs:choice>
2841
<xs:group ref="uiElementSettings"/>

app/code/Magento/Ui/view/base/ui_component/etc/definition/checkbox.xsd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
<xs:complexType name="componentCheckbox">
1313
<xs:sequence>
1414
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
15+
<xs:element name="settings" minOccurs="0" maxOccurs="1">
16+
<xs:complexType>
17+
<xs:choice minOccurs="0" maxOccurs="unbounded">
18+
<xs:group ref="abstractSettings"/>
19+
<xs:group ref="componentCheckboxSetting"/>
20+
</xs:choice>
21+
</xs:complexType>
22+
</xs:element>
23+
</xs:sequence>
24+
<xs:attributeGroup ref="ui_element_attributes"/>
25+
</xs:complexType>
26+
27+
<xs:complexType name="formElementCheckbox">
28+
<xs:sequence>
1529
<xs:element name="settings" minOccurs="0" maxOccurs="1">
1630
<xs:complexType>
1731
<xs:choice minOccurs="0" maxOccurs="unbounded">
@@ -25,7 +39,6 @@
2539

2640
<xs:group name="componentCheckboxSetting">
2741
<xs:choice>
28-
<xs:group ref="abstractSettings"/>
2942
<xs:element name="description" type="translatableString">
3043
<xs:annotation>
3144
<xs:documentation>

app/code/Magento/Ui/view/base/ui_component/etc/definition/checkboxset.xsd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
<xs:complexType name="componentCheckboxset">
1313
<xs:sequence>
1414
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
15+
<xs:element name="settings" minOccurs="0" maxOccurs="1">
16+
<xs:complexType>
17+
<xs:choice maxOccurs="unbounded" minOccurs="0">
18+
<xs:group ref="abstractSettings"/>
19+
<xs:group ref="componentCheckboxsetSettings"/>
20+
</xs:choice>
21+
</xs:complexType>
22+
</xs:element>
23+
</xs:sequence>
24+
<xs:attributeGroup ref="ui_element_attributes"/>
25+
</xs:complexType>
26+
27+
<xs:complexType name="formElementCheckboxset">
28+
<xs:sequence>
1529
<xs:element name="settings" minOccurs="0" maxOccurs="1">
1630
<xs:complexType>
1731
<xs:choice maxOccurs="unbounded" minOccurs="0">
@@ -25,7 +39,6 @@
2539

2640
<xs:group name="componentCheckboxsetSettings">
2741
<xs:choice>
28-
<xs:group ref="abstractSettings"/>
2942
<xs:element ref="multiple"/>
3043
<xs:element name="options" type="optionsType"/>
3144
</xs:choice>

app/code/Magento/Ui/view/base/ui_component/etc/definition/date.xsd

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
<xs:complexType name="componentDate">
1313
<xs:sequence>
1414
<xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
15+
<xs:element name="settings" minOccurs="0" maxOccurs="1">
16+
<xs:complexType>
17+
<xs:choice minOccurs="0" maxOccurs="unbounded">
18+
<xs:group ref="abstractSettings"/>
19+
<xs:group ref="componentDateSettings"/>
20+
</xs:choice>
21+
</xs:complexType>
22+
</xs:element>
23+
</xs:sequence>
24+
<xs:attributeGroup ref="ui_element_attributes"/>
25+
</xs:complexType>
26+
27+
<xs:complexType name="formElementDate">
28+
<xs:sequence>
1529
<xs:element name="settings" minOccurs="0" maxOccurs="1">
1630
<xs:complexType>
1731
<xs:choice minOccurs="0" maxOccurs="unbounded">
@@ -25,7 +39,6 @@
2539

2640
<xs:group name="componentDateSettings">
2741
<xs:choice>
28-
<xs:group ref="abstractSettings"/>
2942
<xs:element name="options" type="dateOptionsType">
3043
<xs:annotation>
3144
<xs:documentation>

0 commit comments

Comments
 (0)