Skip to content

Commit cd71eb4

Browse files
Merge branch 'develop' of github.com:magento-folks/magento2ce into bugs_functional_tests
2 parents daa00d5 + a9e8595 commit cd71eb4

File tree

88 files changed

+293
-75
lines changed

Some content is hidden

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

88 files changed

+293
-75
lines changed

app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
5959
$storeModel->setData($postData['store']);
6060
}
6161
$fieldset = $form->addFieldset('store_fieldset', ['legend' => __('Store View Information')]);
62-
6362
$storeAction = $this->_coreRegistry->registry('store_action');
6463
if ($storeAction == 'edit' || $storeAction == 'add') {
6564
$fieldset->addField(
@@ -76,7 +75,6 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
7675
);
7776
$fieldset = $this->prepareGroupIdField($form, $storeModel, $fieldset);
7877
}
79-
8078
$fieldset->addField(
8179
'store_name',
8280
'text',
@@ -99,7 +97,8 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
9997
'disabled' => $storeModel->isReadOnly()
10098
]
10199
);
102-
100+
$isDisabledStatusField = $storeModel->isReadOnly()
101+
|| ($storeModel->getId() && $storeModel->isDefault() && $storeModel->isActive());
103102
$fieldset->addField(
104103
'store_is_active',
105104
'select',
@@ -109,11 +108,19 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
109108
'value' => $storeModel->isActive(),
110109
'options' => [0 => __('Disabled'), 1 => __('Enabled')],
111110
'required' => true,
112-
'disabled' => $storeModel->isReadOnly()
113-
|| ($storeModel->getId() && $storeModel->isDefault() && $storeModel->isActive())
111+
'disabled' => $isDisabledStatusField
114112
]
115113
);
116-
114+
if ($isDisabledStatusField) {
115+
$fieldset->addField(
116+
'store_is_active_hidden',
117+
'hidden',
118+
[
119+
'name' => 'store[is_active]',
120+
'value' => $storeModel->isActive(),
121+
]
122+
);
123+
}
117124
$fieldset->addField(
118125
'store_sort_order',
119126
'text',
@@ -125,13 +132,11 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
125132
'disabled' => $storeModel->isReadOnly()
126133
]
127134
);
128-
129135
$fieldset->addField(
130136
'store_is_default',
131137
'hidden',
132138
['name' => 'store[is_default]', 'no_span' => true, 'value' => $storeModel->getIsDefault()]
133139
);
134-
135140
$fieldset->addField(
136141
'store_store_id',
137142
'hidden',

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ private function setMessageToResponse($response, $messages)
155155
private function checkUniqueOption(DataObject $response, array $options = null)
156156
{
157157
if (is_array($options)
158-
&& isset($options['value'])
159-
&& isset($options['delete'])
158+
&& !empty($options['value'])
159+
&& !empty($options['delete'])
160160
&& !$this->isUniqueAdminValues($options['value'], $options['delete'])
161161
) {
162162
$this->setMessageToResponse($response, [__("The value of Admin must be unique.")]);

app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/ValidateTest.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,16 @@ public function testUniqueValidation(array $options, $isError)
198198
public function provideUniqueData()
199199
{
200200
return [
201-
// valid options
202-
[
201+
'no values' => [
202+
[
203+
'delete' => [
204+
"option_0" => "",
205+
"option_1" => "",
206+
"option_2" => "",
207+
]
208+
], false
209+
],
210+
'valid options' => [
203211
[
204212
'value' => [
205213
"option_0" => [1, 0],
@@ -213,8 +221,7 @@ public function provideUniqueData()
213221
]
214222
], false
215223
],
216-
//with duplicate
217-
[
224+
'duplicate options' => [
218225
[
219226
'value' => [
220227
"option_0" => [1, 0],
@@ -228,8 +235,7 @@ public function provideUniqueData()
228235
]
229236
], true
230237
],
231-
//with duplicate but deleted
232-
[
238+
'duplicate and deleted' => [
233239
[
234240
'value' => [
235241
"option_0" => [1, 0],

app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@
424424
</settings>
425425
<container name="assign_products_container" sortOrder="160">
426426
<htmlContent name="html_content">
427-
<argument name="block" xsi:type="object">Magento\Catalog\Block\Adminhtml\Category\AssignProducts</argument>
427+
<block name="gallery" class="Magento\Catalog\Block\Adminhtml\Category\AssignProducts"/>
428428
</htmlContent>
429429
</container>
430430
</fieldset>

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
/**
1313
* Export entity product model
1414
*
15-
* @author Magento Core Team <core@magentocommerce.com>
15+
* @api
16+
*
1617
* @SuppressWarnings(PHPMD.TooManyFields)
1718
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
1819
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

app/code/Magento/CatalogImportExport/Model/Export/Product/Type/AbstractType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Export entity product type abstract model
1212
*
13-
* @author Magento Core Team <core@magentocommerce.com>
13+
* @api
1414
*/
1515
abstract class AbstractType
1616
{

app/code/Magento/CatalogImportExport/Model/Export/Product/Type/Simple.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Export entity product type simple model
1010
*
11-
* @author Magento Core Team <core@magentocommerce.com>
11+
* @api
1212
*/
1313
class Simple extends \Magento\CatalogImportExport\Model\Export\Product\Type\AbstractType
1414
{

app/code/Magento/CatalogImportExport/Model/Export/RowCustomizer/Composite.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
use Magento\CatalogImportExport\Model\Export\RowCustomizerInterface;
99
use Magento\Framework\ObjectManagerInterface;
1010

11+
/**
12+
* Class Composite
13+
*
14+
* @api
15+
*/
1116
class Composite implements RowCustomizerInterface
1217
{
1318
/**

app/code/Magento/CatalogImportExport/Model/Export/RowCustomizerInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
/**
99
* Interface RowCustomizerInterface
10+
*
11+
* @api
1012
*/
1113
interface RowCustomizerInterface
1214
{

app/code/Magento/CatalogImportExport/Model/Import/Product.php

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

2222
/**
2323
* Import entity product model
24+
*
25+
* @api
26+
*
2427
* @SuppressWarnings(PHPMD.TooManyFields)
2528
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
2629
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

0 commit comments

Comments
 (0)