Skip to content

Commit db526c3

Browse files
author
Olexii Korshenko
committed
Merge pull request magento#1017 from magento-folks/develop
[Folks] Bug Fixes
2 parents 5db792e + 219f716 commit db526c3

File tree

921 files changed

+6201
-5663
lines changed

Some content is hidden

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

921 files changed

+6201
-5663
lines changed

app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function beforeSave($customer)
2121
{
2222
$attributeName = $this->getAttribute()->getName();
2323
$inputValue = $customer->getData($attributeName);
24+
$inputValue = is_null($inputValue) ? $this->getAttribute()->getDefaultValue() : $inputValue;
2425
$sanitizedValue = !empty($inputValue) ? '1' : '0';
2526
$customer->setData($attributeName, $sanitizedValue);
2627
return $this;
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
4+
*/
5+
namespace Magento\Customer\Model\Config\Backend\CreateAccount;
6+
7+
class DisableAutoGroupAssignDefault extends \Magento\Framework\App\Config\Value
8+
{
9+
/**
10+
* @var \Magento\Eav\Model\Config
11+
*/
12+
protected $eavConfig;
13+
14+
/**
15+
* @param \Magento\Framework\Model\Context $context
16+
* @param \Magento\Framework\Registry $registry
17+
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
18+
* @param \Magento\Eav\Model\Config $eavConfig
19+
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
20+
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
21+
* @param array $data
22+
*/
23+
public function __construct(
24+
\Magento\Framework\Model\Context $context,
25+
\Magento\Framework\Registry $registry,
26+
\Magento\Framework\App\Config\ScopeConfigInterface $config,
27+
\Magento\Eav\Model\Config $eavConfig,
28+
\Magento\Framework\Model\Resource\AbstractResource $resource = null,
29+
\Magento\Framework\Data\Collection\Db $resourceCollection = null,
30+
array $data = []
31+
) {
32+
$this->eavConfig = $eavConfig;
33+
parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
34+
}
35+
36+
/**
37+
* Save EAV default value after save
38+
*
39+
* @return $this
40+
*/
41+
public function afterSave()
42+
{
43+
$result = parent::afterSave();
44+
45+
$attributeObject = $this->eavConfig->getAttribute('customer', 'disable_auto_group_change');
46+
$attributeObject->setData('default_value', $this->getValue());
47+
$attributeObject->save();
48+
49+
return $result;
50+
}
51+
}

app/code/Magento/Customer/etc/adminhtml/system.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
<field id="viv_disable_auto_group_assign_default" translate="label" type="select" sortOrder="57" showInDefault="1" showInWebsite="0" showInStore="0">
8080
<label>Default Value for Disable Automatic Group Changes Based on VAT ID</label>
8181
<source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
82+
<backend_model>Magento\Customer\Model\Config\Backend\CreateAccount\DisableAutoGroupAssignDefault</backend_model>
8283
</field>
8384
<field id="vat_frontend_visibility" translate="label" type="select" sortOrder="58" showInDefault="1" showInWebsite="1" showInStore="0">
8485
<label>Show VAT Number on Frontend</label>

app/code/Magento/ProductAlert/Block/Product/View.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,29 @@ class View extends \Magento\Framework\View\Element\Template
2121
*/
2222
protected $_helper;
2323

24+
/**
25+
* @var \Magento\Core\Helper\PostData
26+
*/
27+
protected $coreHelper;
28+
2429
/**
2530
* @param \Magento\Framework\View\Element\Template\Context $context
2631
* @param \Magento\ProductAlert\Helper\Data $helper
2732
* @param \Magento\Framework\Registry $registry
33+
* @param \Magento\Core\Helper\PostData $coreHelper
2834
* @param array $data
2935
*/
3036
public function __construct(
3137
\Magento\Framework\View\Element\Template\Context $context,
3238
\Magento\ProductAlert\Helper\Data $helper,
3339
\Magento\Framework\Registry $registry,
40+
\Magento\Core\Helper\PostData $coreHelper,
3441
array $data = []
3542
) {
3643
parent::__construct($context, $data);
3744
$this->_registry = $registry;
3845
$this->_helper = $helper;
46+
$this->coreHelper = $coreHelper;
3947
}
4048

4149
/**
@@ -51,4 +59,14 @@ protected function getProduct()
5159
}
5260
return false;
5361
}
62+
63+
/**
64+
* Retrieve post action config
65+
*
66+
* @return string
67+
*/
68+
public function getPostAction()
69+
{
70+
return $this->coreHelper->getPostData($this->getSignupUrl());
71+
}
5472
}

app/code/Magento/ProductAlert/view/frontend/templates/product/view.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
?>
66
<?php /* @var $this \Magento\ProductAlert\Block\Product\View */?>
77
<div class="product alert <?php echo $this->getHtmlClass() ?>">
8-
<a href="<?php echo $this->escapeHtml($this->getSignupUrl()) ?>"
8+
<a href="#" data-post='<?php echo $this->getPostAction(); ?>'
99
title="<?php echo $this->escapeHtml(__($this->getSignupLabel())); ?>" class="action alert">
1010
<?php echo $this->escapeHtml(__($this->getSignupLabel())); ?>
1111
</a>

app/code/Magento/Rma/view/adminhtml/layout/adminhtml_rma_chooseorder.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
-->
77
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
88
<body>
9-
<referenceBlock name="backend.page">
10-
<block class="Magento\Rma\Block\Adminhtml\Rma\Create" name="content">
9+
<referenceContainer name="content">
10+
<block class="Magento\Rma\Block\Adminhtml\Rma\Create" name="rma_create">
1111
<block class="Magento\Rma\Block\Adminhtml\Rma\Create\Form" template="create/form.phtml" name="form">
1212
<block class="Magento\Rma\Block\Adminhtml\Rma\Create\Order" template="create/order.phtml" name="rma_create_order">
1313
<block class="Magento\Rma\Block\Adminhtml\Rma\Create\Order\Grid" name="grid"/>
1414
</block>
1515
</block>
1616
</block>
17-
</referenceBlock>
17+
</referenceContainer>
1818
</body>
1919
</page>

dev/build/core_dev/functional/build.xml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,26 +198,42 @@
198198
<replacefilter token="{{url}}" value="${env.http_host}${env.build.key}/instance-${instanceIndex}"/>
199199
</replace>
200200

201-
<condition property="env.bamboo_tests_configuration" value="basic">
202-
<not><isset property="env.bamboo_tests_configuration"/></not>
203-
</condition>
204-
205201
<replace file="${dir.build_directory}/instance-${instanceIndex}/dev/tests/functional/config/server.yml.dist">
206202
<replacefilter token="{{selenium_host}}" value="${env.selenium_host}"/>
207203
<replacefilter token="{{selenium_port}}" value="${env.selenium_port}"/>
208204
<replacefilter token="{{selenium_timeout}}" value="${env.selenium_timeout}"/>
209205
<replacefilter token="{{selenium_browser}}" value="${env.selenium_browser}"/>
210206
</replace>
211207

208+
<condition property="env.bamboo_tests_configuration" value="basic">
209+
<not><isset property="env.bamboo_tests_configuration"/></not>
210+
</condition>
211+
<condition property="env.bamboo_module_whitelist" value="">
212+
<not><isset property="env.bamboo_module_whitelist"/></not>
213+
</condition>
214+
<!-- Property which defines whether Magento console installation is performed -->
215+
<condition property="env.bamboo_is_magento_installed" value="1">
216+
<not><isset property="env.bamboo_is_magento_installed"/></not>
217+
</condition>
218+
212219
<replace file="${dir.build_directory}/instance-${instanceIndex}/dev/tests/functional/phpunit.xml">
213-
<replacefilter token="{{admin_url}}" value="${env.http_host}${env.build.key}/instance-${instanceIndex}/backend/"/>
214-
<replacefilter token="{{url}}" value="${env.http_host}${env.build.key}/instance-${instanceIndex}"/>
220+
<replacefilter token="{{admin_url}}" value="${env.http_host}${env.build.key}/instance-${instanceIndex}/backend/" />
221+
<replacefilter token="{{url}}" value="${env.http_host}${env.build.key}/instance-${instanceIndex}" />
215222
<replacefilter token="{{tests_configuration}}" value="${env.bamboo_tests_configuration}" />
223+
<replacefilter token="{{module_whitelist}}" value="${env.bamboo_module_whitelist}" />
224+
</replace>
225+
226+
<replace file="${dir.build_directory}/instance-${instanceIndex}/dev/tests/functional/config/install_data.yml.dist">
227+
<replacefilter token="{{db_host}}" value="${env.db_host}"/>
228+
<replacefilter token="{{db_user}}" value="${env.db_user}"/>
229+
<replacefilter token="{{db_password}}" value="${env.db_password}"/>
230+
<replacefilter token="{{db_name}}" value="${env.db_name_prefix}${instanceIndex}"/>
231+
<replacefilter token="{{url}}" value="${env.http_host}${env.build.key}/instance-${instanceIndex}"/>
216232
</replace>
217233

218234
<script language="javascript"><![CDATA[
219235
var currentInstance = project.getProperty('instanceIndex');
220-
if (currentInstance > 0) {
236+
if (currentInstance > 0 && project.getProperty('env.bamboo_is_magento_installed') == 1) {
221237
self.project.executeTarget('_import_mysql_dump');
222238
self.project.executeTarget('_copy_config_php');
223239
self.project.executeTarget('_update_db');
@@ -269,7 +285,7 @@
269285

270286
<script language="javascript"><![CDATA[
271287
var currentInstance = project.getProperty('instanceIndex');
272-
if (currentInstance == 0) {
288+
if (currentInstance == 0 && project.getProperty('env.bamboo_is_magento_installed') == 1) {
273289
self.project.executeTarget( '_install_standalone_application' );
274290
}
275291
]]></script>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
db_credentials:
2+
dbHost: {{db_host}}
3+
dbUser: {{db_user}}
4+
dbPassword: {{db_password}}
5+
dbName: {{db_name}}
6+
url:
7+
base_url: {{url}}
8+
backend_frontname: backend

dev/build/core_dev/functional/phpunit.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
<env name="server_config_path" value="config/server.yml.dist"/>
3535
<env name="isolation_config_path" value="config/isolation.yml.dist"/>
3636
<env name="handlers_config_path" value="config/handler.yml.dist"/>
37+
<env name="install_config_path" value="config/install_data.yml.dist" />
3738
<env name="configuration:Mtf/TestSuite/InjectableTests" value="{{tests_configuration}}"/>
3839
<env name="log_directory" value="var/log"/>
3940
<env name="events_preset" value="base"/>
41+
<env name="module_whitelist" value="{{module_whitelist}}" />
4042
<!--{{parallel_instances}}-->
4143
</php>
4244

dev/tests/functional/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"magento/mtf": "1.0.0-rc9",
13+
"magento/mtf": "1.0.0-rc10",
1414
"php": ">=5.4.0",
1515
"phpunit/phpunit": "4.1.0",
1616
"phpunit/phpunit-selenium": ">=1.2",
@@ -21,7 +21,6 @@
2121
"Mtf\\": ["lib/Mtf/", "generated/Mtf/", "testsuites/Mtf/"],
2222
"Magento\\": ["generated/Magento/", "tests/app/Magento/"],
2323
"Test\\": "generated/Test/"
24-
2524
}
2625
}
2726
}

0 commit comments

Comments
 (0)