Lib_Magento - Version 1.9.2.0

Version Notes

1.9.2.0

Download this release

Release Info

Developer Magento Core Team
Extension Lib_Magento
Version 1.9.2.0
Comparing to
See all releases


Code changes from version 1.9.1.1 to 1.9.2.0

lib/Magento/Db/Adapter/Pdo/Mysql.php CHANGED
@@ -101,4 +101,69 @@ class Magento_Db_Adapter_Pdo_Mysql extends Varien_Db_Adapter_Pdo_Mysql
101
 
102
  return $bunches;
103
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
101
 
102
  return $bunches;
103
  }
104
+
105
+ /**
106
+ * Quote a raw string.
107
+ *
108
+ * @param string $value Raw string
109
+ * @return string Quoted string
110
+ */
111
+ protected function _quote($value)
112
+ {
113
+ if (is_float($value)) {
114
+ $value = $this->_convertFloat($value);
115
+ return $value;
116
+ }
117
+
118
+ return parent::_quote($value);
119
+ }
120
+
121
+ /**
122
+ * Safely quotes a value for an SQL statement.
123
+ *
124
+ * If an array is passed as the value, the array values are quote
125
+ * and then returned as a comma-separated string.
126
+ *
127
+ * @param mixed $value The value to quote.
128
+ * @param null $type OPTIONAL the SQL datatype name, or constant, or null.
129
+ * @return mixed|string An SQL-safe quoted value (or string of separated values).
130
+ */
131
+ public function quote($value, $type = null)
132
+ {
133
+ $this->_connect();
134
+
135
+ if ($type !== null &&
136
+ array_key_exists($type = strtoupper($type), $this->_numericDataTypes) &&
137
+ $this->_numericDataTypes[$type] == Zend_Db::FLOAT_TYPE) {
138
+ $value = $this->_convertFloat($value);
139
+ $quoteValue = sprintf('%F', $value);
140
+ return $quoteValue;
141
+ } elseif (is_float($value)) {
142
+ return $this->_quote($value);
143
+ }
144
+
145
+ return parent::quote($value, $type);
146
+ }
147
+
148
+ /**
149
+ * Convert float values that are not supported by MySQL to alternative representation value.
150
+ * Value 99999999.9999 is a maximum value that may be stored in Magento decimal columns in DB.
151
+ *
152
+ * @param float $value
153
+ * @return float
154
+ */
155
+ protected function _convertFloat($value)
156
+ {
157
+ $value = (float) $value;
158
+
159
+ if (is_infinite($value)) {
160
+ $value = ($value > 0)
161
+ ? 99999999.9999
162
+ : -99999999.9999;
163
+ } elseif (is_nan($value)) {
164
+ $value = 0.0;
165
+ }
166
+
167
+ return $value;
168
+ }
169
  }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Lib_Magento</name>
4
- <version>1.9.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Magento Library</summary>
10
  <description>Magento Library</description>
11
- <notes>1.9.1.1</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
- <date>2015-04-29</date>
14
- <time>12:01:15</time>
15
- <contents><target name="magelib"><dir name="Magento"><dir name="Autoload"><file name="ClassMap.php" hash="f26be6ed31715907f5d5e41e4c3ad191"/><file name="IncludePath.php" hash="8fab69548df287190e4498cd29d0c5be"/><file name="Simple.php" hash="7f160814a36fb78ac8f7f20ceacd3d87"/></dir><file name="Crypt.php" hash="2ea55cb3e53c8c53703af33b60067222"/><dir name="Db"><dir name="Adapter"><dir name="Pdo"><file name="Mysql.php" hash="e1dad29ceca67b283f8192730b8f158d"/></dir></dir><dir name="Object"><file name="Interface.php" hash="0952f3ec03eef94372a07a766dfe44c5"/><file name="Table.php" hash="4da8185560d6c1a0c39c6efa63f55a2e"/><file name="Trigger.php" hash="9128e5080886c666dd4735131a64522a"/><file name="View.php" hash="8bd3229829d2ccb2eee5303506b5760f"/></dir><file name="Object.php" hash="7bf209d2fc669396491cb0430bebfa46"/><dir name="Sql"><file name="Select.php" hash="a7248b57dca932742c574ce1b5b8dc3d"/><file name="Trigger.php" hash="b78ca1b80b20d2efe88817f8cc6ed7ac"/></dir></dir><file name="Exception.php" hash="7408ce585a59878923d5b80a035e252a"/><dir name="Profiler"><dir name="Output"><file name="Csvfile.php" hash="b0fd80740efdb27ac18f2ebff4dd5be8"/><file name="Firebug.php" hash="47525886e57caeebb20cff091ff7972b"/><file name="Html.php" hash="07eea81e01b6cae306c6e7d61429bd44"/></dir><file name="OutputAbstract.php" hash="810c8899370462a237cd8b9bfafef79b"/></dir><file name="Profiler.php" hash="cf889a55ae0c14d0ebef237c40c1eac9"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Lib_Magento</name>
4
+ <version>1.9.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Magento Library</summary>
10
  <description>Magento Library</description>
11
+ <notes>1.9.2.0</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
+ <date>2015-06-26</date>
14
+ <time>13:48:53</time>
15
+ <contents><target name="magelib"><dir name="Magento"><dir name="Autoload"><file name="ClassMap.php" hash="f26be6ed31715907f5d5e41e4c3ad191"/><file name="IncludePath.php" hash="8fab69548df287190e4498cd29d0c5be"/><file name="Simple.php" hash="7f160814a36fb78ac8f7f20ceacd3d87"/></dir><file name="Crypt.php" hash="2ea55cb3e53c8c53703af33b60067222"/><dir name="Db"><dir name="Adapter"><dir name="Pdo"><file name="Mysql.php" hash="ddd174ddfb8671641b093a6adfc4b09e"/></dir></dir><dir name="Object"><file name="Interface.php" hash="0952f3ec03eef94372a07a766dfe44c5"/><file name="Table.php" hash="4da8185560d6c1a0c39c6efa63f55a2e"/><file name="Trigger.php" hash="9128e5080886c666dd4735131a64522a"/><file name="View.php" hash="8bd3229829d2ccb2eee5303506b5760f"/></dir><file name="Object.php" hash="7bf209d2fc669396491cb0430bebfa46"/><dir name="Sql"><file name="Select.php" hash="a7248b57dca932742c574ce1b5b8dc3d"/><file name="Trigger.php" hash="b78ca1b80b20d2efe88817f8cc6ed7ac"/></dir></dir><file name="Exception.php" hash="7408ce585a59878923d5b80a035e252a"/><dir name="Profiler"><dir name="Output"><file name="Csvfile.php" hash="b0fd80740efdb27ac18f2ebff4dd5be8"/><file name="Firebug.php" hash="47525886e57caeebb20cff091ff7972b"/><file name="Html.php" hash="07eea81e01b6cae306c6e7d61429bd44"/></dir><file name="OutputAbstract.php" hash="810c8899370462a237cd8b9bfafef79b"/></dir><file name="Profiler.php" hash="cf889a55ae0c14d0ebef237c40c1eac9"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>