Skip to content

Commit 9f4c881

Browse files
committed
MAGETWO-60246: [Backport] - [Github]Magento 2.1.1 Problem with change currency #6746 - for 2.1.x
1 parent f7f34ec commit 9f4c881

File tree

1 file changed

+11
-10
lines changed
  • lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation

1 file changed

+11
-10
lines changed

lib/internal/Magento/Framework/Search/Adapter/Mysql/Aggregation/Interval.php

+11-10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Interval implements IntervalInterface
1414
* Minimal possible value
1515
*/
1616
const DELTA = 0.005;
17+
1718
/**
1819
* @var Select
1920
*/
@@ -60,12 +61,12 @@ public function load($limit, $offset = null, $lower = null, $upper = null)
6061
$valueFiled = $this->getValueFiled();
6162
$valueAlias = $this->getValueAlias();
6263
if ($lower !== null) {
63-
$select->where("${valueFiled} >= ?", $lower - self::DELTA);
64+
$select->where($valueFiled . ' >= ?', $lower - self::DELTA);
6465
}
6566
if ($upper !== null) {
66-
$select->where("${valueFiled} < ?", $upper - self::DELTA);
67+
$select->where($valueFiled . ' < ?', $upper - self::DELTA);
6768
}
68-
$select->order("${valueAlias} ASC")
69+
$select->order($valueAlias . ' ASC')
6970
->limit($limit, $offset);
7071

7172
return $this->arrayValuesToFloat(
@@ -82,9 +83,9 @@ public function loadPrevious($data, $index, $lower = null)
8283
$select = clone $this->select;
8384
$valueFiled = $this->getValueFiled();
8485
$select->columns(['count' => 'COUNT(*)'])
85-
->where("${valueFiled} < ?", $data - self::DELTA);
86+
->where($valueFiled . ' < ?', $data - self::DELTA);
8687
if ($lower !== null) {
87-
$select->where("${valueFiled} >= ?", $lower - self::DELTA);
88+
$select->where($valueFiled . ' >= ?', $lower - self::DELTA);
8889
}
8990
$offset = $this->select->getConnection()
9091
->fetchRow($select)['count'];
@@ -104,10 +105,10 @@ public function loadNext($data, $rightIndex, $upper = null)
104105
$valueFiled = $this->getValueFiled();
105106
$valueAlias = $this->getValueAlias();
106107
$select->columns(['count' => 'COUNT(*)'])
107-
->where("${valueFiled} > ?", $data + self::DELTA);
108+
->where($valueFiled . ' > ?', $data + self::DELTA);
108109

109110
if ($upper !== null) {
110-
$select->where("${valueFiled} < ? ", $data - self::DELTA);
111+
$select->where($valueFiled . ' < ?', $data - self::DELTA);
111112
}
112113

113114
$offset = $this->select->getConnection()
@@ -118,11 +119,11 @@ public function loadNext($data, $rightIndex, $upper = null)
118119
}
119120

120121
$select = clone $this->select;
121-
$select->where("${valueFiled} >= ?", $data - self::DELTA);
122+
$select->where($valueFiled . ' >= ?', $data - self::DELTA);
122123
if ($upper !== null) {
123-
$select->where("${valueFiled} < ? ", $data - self::DELTA);
124+
$select->where($valueFiled . ' < ?', $data - self::DELTA);
124125
}
125-
$select->order("${valueAlias} DESC")
126+
$select->order($valueAlias . ' DESC')
126127
->limit($rightIndex - $offset + 1, $offset - 1);
127128

128129
return $this->arrayValuesToFloat(

0 commit comments

Comments
 (0)