Skip to content

Commit dadf701

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1287 from magento-south/PRS
Fixed issues: MAGETWO-59997 Shipping address duplicates if entered credit card was incorrect during checkout via Braintree MAGETWO-70279 Issue with the config merging introduced for the Analytics integration MAGETWO-70059 Order is not shown in customer account if its Status not visible on Storefront MAGETWO-59801 [Performance Bug] Tax Rules Form unusable with large # of tax rates MAGETWO-70280 Catalog Event can't save in the en_GB locale MAGETWO-70314 [Github] cron:install issues #10040 MAGETWO-69750 An error occurs on the checkout after required custom address attribute added MAGETWO-70490 Inconsistency between versions in module.xml and UbgradeSchema for CatalogRule Module MAGETWO-66895 [Github] Cannot skip review page when order placed with Virtual/Gift Card product via PayPal Express Checkout #9042
2 parents 1a4aa5b + 9a89c48 commit dadf701

File tree

65 files changed

+2158
-652
lines changed

Some content is hidden

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

65 files changed

+2158
-652
lines changed

app/code/Magento/Analytics/Model/Config/Data.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

app/code/Magento/Analytics/Model/Config/Reader/Xml.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

app/code/Magento/Analytics/Model/Config/SchemaLocator.php

Lines changed: 0 additions & 56 deletions
This file was deleted.

app/code/Magento/Analytics/ReportXml/Config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\Analytics\ReportXml;
77

8-
use Magento\Analytics\ReportXml\Config\Data;
8+
use Magento\Framework\Config\DataInterface;
99

1010
/**
1111
* Class Config
@@ -15,17 +15,17 @@
1515
class Config implements ConfigInterface
1616
{
1717
/**
18-
* @var Data
18+
* @var DataInterface
1919
*/
2020
private $data;
2121

2222
/**
2323
* Config constructor.
2424
*
25-
* @param Data $data
25+
* @param DataInterface $data
2626
*/
2727
public function __construct(
28-
Data $data
28+
DataInterface $data
2929
) {
3030
$this->data = $data;
3131
}

app/code/Magento/Analytics/ReportXml/Config/Data.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

app/code/Magento/Analytics/ReportXml/Config/Reader/Xml.php

Lines changed: 0 additions & 56 deletions
This file was deleted.

app/code/Magento/Analytics/ReportXml/Config/SchemaLocator.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

app/code/Magento/Analytics/ReportXml/DB/ColumnsResolver.php

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace Magento\Analytics\ReportXml\DB;
88

9+
use Magento\Framework\App\ResourceConnection;
910
use Magento\Framework\DB\Sql\ColumnValueExpression;
1011

1112
/**
@@ -20,14 +21,41 @@ class ColumnsResolver
2021
*/
2122
private $nameResolver;
2223

24+
/**
25+
* @var ResourceConnection
26+
*/
27+
private $resourceConnection;
28+
29+
/**
30+
* @var \Magento\Framework\DB\Adapter\AdapterInterface
31+
*/
32+
private $connection;
33+
2334
/**
2435
* ColumnsResolver constructor.
36+
*
2537
* @param NameResolver $nameResolver
38+
* @param ResourceConnection $resourceConnection
2639
*/
2740
public function __construct(
28-
NameResolver $nameResolver
41+
NameResolver $nameResolver,
42+
ResourceConnection $resourceConnection
2943
) {
3044
$this->nameResolver = $nameResolver;
45+
$this->resourceConnection = $resourceConnection;
46+
}
47+
48+
/**
49+
* Returns connection
50+
*
51+
* @return \Magento\Framework\DB\Adapter\AdapterInterface
52+
*/
53+
private function getConnection()
54+
{
55+
if (!$this->connection) {
56+
$this->connection = $this->resourceConnection->getConnection();
57+
}
58+
return $this->connection;
3159
}
3260

3361
/**
@@ -54,7 +82,9 @@ public function getColumns(SelectBuilder $selectBuilder, $entityConfig)
5482
$prefix = ' DISTINCT ';
5583
}
5684
$expression = new ColumnValueExpression(
57-
strtoupper($attributeData['function']) . '(' . $prefix . $tableAlias . '.' . $columnName . ')'
85+
strtoupper($attributeData['function']) . '(' . $prefix
86+
. $this->getConnection()->quoteIdentifier($tableAlias . '.' . $columnName)
87+
. ')'
5888
);
5989
} else {
6090
$expression = $tableAlias . '.' . $columnName;

app/code/Magento/Analytics/ReportXml/DB/ConditionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function getCondition(SelectBuilder $selectBuilder, $tableName, $conditi
116116
) {
117117
$expression = $columns[$condition['attribute']];
118118
} else {
119-
$expression = $tableName . '.' . $condition['attribute'];
119+
$expression = $this->getConnection()->quoteIdentifier($tableName . '.' . $condition['attribute']);
120120
}
121121
return sprintf(
122122
$this->conditionMap[$condition['operator']],
@@ -161,6 +161,6 @@ public function getFilter(SelectBuilder $selectBuilder, $filterConfig, $aliasNam
161161
}
162162
$filtersParts[] = '(' . implode(' ' . strtoupper($glue) . ' ', $parts) . ')';
163163
}
164-
return implode(' AND ', $filtersParts);
164+
return implode(' OR ', $filtersParts);
165165
}
166166
}

0 commit comments

Comments
 (0)