Lib_Varien - Version 1.6.1.0

Version Notes

1.6.1.0

Download this release

Release Info

Developer Magento Core Team
Extension Lib_Varien
Version 1.6.1.0
Comparing to
See all releases


Code changes from version 1.6.0.0 to 1.6.1.0

lib/Varien/Cache/Backend/Memcached.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Varien
22
+ * @package Varien_Cache
23
+ * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ class Varien_Cache_Backend_Memcached
28
+ extends Zend_Cache_Backend_Memcached
29
+ implements Zend_Cache_Backend_ExtendedInterface
30
+ {
31
+ /**
32
+ * Maximum chunk of data that could be saved in one memcache cell (1 MiB)
33
+ */
34
+ const DEFAULT_SLAB_SIZE = 1048576;
35
+
36
+ /**
37
+ * Used to tell chunked data from ordinary
38
+ */
39
+ const CODE_WORD = '{splitted}';
40
+
41
+ /**
42
+ * Constructor
43
+ *
44
+ * @throws Varien_Exception
45
+ * @param array $options @see Zend_Cache_Backend_Memcached::__construct()
46
+ */
47
+ public function __construct(array $options = array())
48
+ {
49
+ parent::__construct($options);
50
+
51
+ if (!isset($options['slab_size']) || !is_numeric($options['slab_size'])) {
52
+ if (isset($options['slab_size'])) {
53
+ throw new Varien_Exception("Invalid value for the node <slab_size>. Expected to be positive integer.");
54
+ }
55
+
56
+ $this->_options['slab_size'] = self::DEFAULT_SLAB_SIZE;
57
+ } else {
58
+ $this->_options['slab_size'] = $options['slab_size'];
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Returns ID of a specific chunk on the basis of data's ID
64
+ *
65
+ * @param string $id Main data's ID
66
+ * @param int $index Particular chunk number to return ID for
67
+ * @return string
68
+ */
69
+ protected function _getChunkId($id, $index)
70
+ {
71
+ return "{$id}[{$index}]";
72
+ }
73
+
74
+ /**
75
+ * Remove saved chunks in case something gone wrong (e.g. some chunk from the chain can not be found)
76
+ *
77
+ * @param string $id ID of data's info cell
78
+ * @param int $chunks Number of chunks to remove (basically, the number after '{splitted}|')
79
+ * @return null
80
+ */
81
+ protected function _cleanTheMess($id, $chunks)
82
+ {
83
+ for ($i = 0; $i < $chunks; $i++) {
84
+ $this->remove($this->_getChunkId($id, $i));
85
+ }
86
+
87
+ $this->remove($id);
88
+ }
89
+
90
+ /**
91
+ * Save data to memcached, split it into chunks if data size is bigger than memcached slab size.
92
+ *
93
+ * @param string $data @see Zend_Cache_Backend_Memcached::save()
94
+ * @param string $id @see Zend_Cache_Backend_Memcached::save()
95
+ * @param array $tags @see Zend_Cache_Backend_Memcached::save()
96
+ * @param bool $specificLifetime @see Zend_Cache_Backend_Memcached::save()
97
+ * @return bool
98
+ */
99
+ public function save($data, $id, $tags = array(), $specificLifetime = false)
100
+ {
101
+ if (is_string($data) && (strlen($data) > $this->_options['slab_size'])) {
102
+ $dataChunks = str_split($data, $this->_options['slab_size']);
103
+
104
+ for ($i = 0, $cnt = count($dataChunks); $i < $cnt; $i++) {
105
+ $chunkId = $this->_getChunkId($id, $i);
106
+
107
+ if (!parent::save($dataChunks[$i], $chunkId, $tags, $specificLifetime)) {
108
+ $this->_cleanTheMess($id, $i + 1);
109
+ return false;
110
+ }
111
+ }
112
+
113
+ $data = self::CODE_WORD . '|' . $i;
114
+ }
115
+
116
+ return parent::save($data, $id, $tags, $specificLifetime);
117
+ }
118
+
119
+ /**
120
+ * Load data from memcached, glue from several chunks if it was splitted upon save.
121
+ *
122
+ * @param string $id @see Zend_Cache_Backend_Memcached::load()
123
+ * @param bool $doNotTestCacheValidity @see Zend_Cache_Backend_Memcached::load()
124
+ * @return bool|false|string
125
+ */
126
+ public function load($id, $doNotTestCacheValidity = false)
127
+ {
128
+ $data = parent::load($id, $doNotTestCacheValidity);
129
+
130
+ if (is_string($data) && (substr($data, 0, strlen(self::CODE_WORD)) == self::CODE_WORD)) {
131
+ // Seems we've got chunked data
132
+
133
+ $arr = explode('|', $data);
134
+ $chunks = isset($arr[1]) ? $arr[1] : false;
135
+ $chunkData = array();
136
+
137
+ if ($chunks && is_numeric($chunks)) {
138
+ for ($i = 0; $i < $chunks; $i++) {
139
+ $chunk = parent::load($this->_getChunkId($id, $i), $doNotTestCacheValidity);
140
+
141
+ if (false === $chunk) {
142
+ // Some chunk in chain was not found, we can not glue-up the data:
143
+ // clean the mess and return nothing
144
+
145
+ $this->_cleanTheMess($id, $chunks);
146
+ return false;
147
+ }
148
+
149
+ $chunkData[] = $chunk;
150
+ }
151
+
152
+ return implode('', $chunkData);
153
+ }
154
+ }
155
+
156
+ // Data has not been splitted to chunks on save
157
+ return $data;
158
+ }
159
+ }
lib/Varien/Db/Adapter/Interface.php CHANGED
@@ -962,4 +962,16 @@ interface Varien_Db_Adapter_Interface
962
  * @return mixed
963
  */
964
  public function decodeVarbinary($value);
 
 
 
 
 
 
 
 
 
 
 
 
965
  }
962
  * @return mixed
963
  */
964
  public function decodeVarbinary($value);
965
+
966
+ /**
967
+ * Returns date that fits into TYPE_DATETIME range and is suggested to act as default 'zero' value
968
+ * for a column for current RDBMS. Deprecated and left for compatibility only.
969
+ * In Magento at MySQL there was zero date used for datetime columns. However, zero date it is not supported across
970
+ * different RDBMS. Thus now it is recommended to use same default value equal for all RDBMS - either NULL
971
+ * or specific date supported by all RDBMS.
972
+ *
973
+ * @deprecated after 1.5.1.0
974
+ * @return string
975
+ */
976
+ public function getSuggestedZeroDate();
977
  }
lib/Varien/Db/Adapter/Pdo/Mysql.php CHANGED
@@ -670,14 +670,19 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
670
  public function dropForeignKey($tableName, $fkName, $schemaName = null)
671
  {
672
  $foreignKeys = $this->getForeignKeys($tableName, $schemaName);
673
- $fkName = strtoupper($fkName);
674
- if (isset($foreignKeys[$fkName])) {
675
- $sql = sprintf('ALTER TABLE %s DROP FOREIGN KEY %s',
676
- $this->quoteIdentifier($this->_getTableName($tableName, $schemaName)),
677
- $this->quoteIdentifier($foreignKeys[$fkName]['FK_NAME'])
678
- );
679
- $this->resetDdlCache($tableName, $schemaName);
680
- $this->raw_query($sql);
 
 
 
 
 
681
  }
682
  return $this;
683
  }
@@ -984,6 +989,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
984
  $ddl = $this->raw_fetchRow($sql, 'Create Table');
985
  $this->saveDdlCache($cacheKey, self::DDL_CREATE, $ddl);
986
  }
 
987
  return $ddl;
988
  }
989
 
@@ -1058,6 +1064,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1058
  $tree[$table][$key['COLUMN_NAME']] = $key;
1059
  }
1060
  }
 
1061
  return $tree;
1062
  }
1063
 
@@ -1126,6 +1133,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1126
  $this->changeTableEngine($table, $tableData['engine']);
1127
  }
1128
  }
 
1129
  return $this;
1130
  }
1131
 
@@ -1195,6 +1203,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1195
  }
1196
  $this->saveDdlCache($cacheKey, self::DDL_INDEX, $ddl);
1197
  }
 
1198
  return $ddl;
1199
  }
1200
 
@@ -1269,6 +1278,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1269
  if ($this->_debug) {
1270
  $this->_debugTimer = microtime(true);
1271
  }
 
1272
  return $this;
1273
  }
1274
 
@@ -1383,6 +1393,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1383
  if (is_array($value) && empty($value)) {
1384
  $value = new Zend_Db_Expr('NULL');
1385
  }
 
1386
  return parent::quoteInto($text, $value, $type, $count);
1387
  }
1388
 
@@ -1569,6 +1580,57 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1569
  return $ddl;
1570
  }
1571
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1572
  /**
1573
  * Create Varien_Db_Ddl_Table object by data from describe table
1574
  *
@@ -1580,37 +1642,18 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1580
  {
1581
  $describe = $this->describeTable($tableName);
1582
  $table = $this->newTable($newTableName)
1583
- ->setComment(ucwords(str_replace('_', ' ', $newTableName)));
 
1584
  foreach ($describe as $columnData) {
1585
- $type = $this->_getColumnTypeByDdl($columnData);
1586
- $options = array();
1587
- if ($columnData['IDENTITY'] === true) {
1588
- $options['identity'] = true;
1589
- }
1590
- if ($columnData['UNSIGNED'] === true) {
1591
- $options['unsigned'] = true;
1592
- }
1593
- if ($columnData['NULLABLE'] === false
1594
- && !($type == Varien_Db_Ddl_Table::TYPE_TEXT && strlen($columnData['DEFAULT']) != 0)
1595
- ) {
1596
- $options['nullable'] = false;
1597
- }
1598
- if ($columnData['PRIMARY'] === true) {
1599
- $options['primary'] = true;
1600
- }
1601
- if (!is_null($columnData['DEFAULT'])
1602
- && $type != Varien_Db_Ddl_Table::TYPE_TEXT
1603
- ) {
1604
- $options['default'] = $this->quote($columnData['DEFAULT']);
1605
- }
1606
- if (strlen($columnData['SCALE']) > 0) {
1607
- $options['scale'] = $columnData['SCALE'];
1608
- }
1609
- if (strlen($columnData['PRECISION']) > 0) {
1610
- $options['precision'] = $columnData['PRECISION'];
1611
- }
1612
- $comment = ucwords(str_replace('_', ' ', $columnData['COLUMN_NAME']));
1613
- $table->addColumn($columnData['COLUMN_NAME'], $type, $columnData['LENGTH'], $options, $comment);
1614
  }
1615
 
1616
  $indexes = $this->getIndexList($tableName);
@@ -1620,7 +1663,8 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1620
  * For reliability check both name and type, because these values can start to differ in future.
1621
  */
1622
  if (($indexData['KEY_NAME'] == 'PRIMARY')
1623
- || ($indexData['INDEX_TYPE'] == Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY)) {
 
1624
  continue;
1625
  }
1626
 
@@ -1667,6 +1711,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1667
  if (array_key_exists('DEFAULT', $definition) && is_null($definition['DEFAULT'])) {
1668
  unset($definition['DEFAULT']);
1669
  }
 
1670
  return $this->modifyColumn($tableName, $columnName, $definition, $flushData, $schemaName);
1671
  }
1672
 
@@ -1739,6 +1784,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1739
  {
1740
  $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName));
1741
  $sql = sprintf('ALTER TABLE %s ENGINE=%s', $table, $engine);
 
1742
  return $this->raw_query($sql);
1743
  }
1744
 
@@ -1754,6 +1800,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1754
  {
1755
  $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName));
1756
  $sql = sprintf("ALTER TABLE %s COMMENT='%s'", $table, $comment);
 
1757
  return $this->raw_query($sql);
1758
  }
1759
 
@@ -1770,6 +1817,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1770
  $this->raw_query("SET @OLD_INSERT_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'");
1771
  $result = $this->insert($table, $bind);
1772
  $this->raw_query("SET SQL_MODE=IFNULL(@OLD_INSERT_SQL_MODE,'')");
 
1773
  return $result;
1774
  }
1775
 
@@ -1904,6 +1952,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1904
  // execute the statement and return the number of affected rows
1905
  $stmt = $this->query($insertQuery, $bind);
1906
  $result = $stmt->rowCount();
 
1907
  return $result;
1908
  }
1909
 
@@ -1935,6 +1984,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
1935
  if ($schemaName !== null) {
1936
  $table->setSchema($schemaName);
1937
  }
 
1938
  return $table;
1939
  }
1940
 
@@ -2002,6 +2052,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2002
  $primary = array_map(array($this, 'quoteIdentifier'), array_keys($primary));
2003
  $definition[] = sprintf(' PRIMARY KEY (%s)', implode(', ', $primary));
2004
  }
 
2005
  return $definition;
2006
  }
2007
 
@@ -2118,6 +2169,23 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2118
 
2119
  return $definition;
2120
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2121
  /**
2122
  * Retrieve column definition fragment
2123
  *
@@ -2235,6 +2303,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2235
  } else {
2236
  $comment = $options['COMMENT'];
2237
  }
 
2238
  return sprintf('%s%s%s%s%s COMMENT %s',
2239
  $cType,
2240
  $cUnsigned ? ' UNSIGNED' : '',
@@ -2257,6 +2326,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2257
  $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName));
2258
  $query = 'DROP TABLE IF EXISTS ' . $table;
2259
  $this->query($query);
 
2260
  return true;
2261
  }
2262
 
@@ -2429,20 +2499,8 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2429
  $cond);
2430
 
2431
  $this->resetDdlCache($tableName, $schemaName);
2432
- return $this->raw_query($sql);
2433
- }
2434
 
2435
- /**
2436
- * Retrieve Foreign Key name
2437
- * @param string $fkName
2438
- * @return string
2439
- */
2440
- protected function _getForeignKeyName($fkName)
2441
- {
2442
- if (substr($fkName, 0, 3) != 'FK_') {
2443
- $fkName = 'FK_' . $fkName;
2444
- }
2445
- return $fkName;
2446
  }
2447
 
2448
  /**
@@ -2466,8 +2524,6 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2466
  $onUpdate = Varien_Db_Adapter_Interface::FK_ACTION_CASCADE,
2467
  $purge = false, $schemaName = null, $refSchemaName = null)
2468
  {
2469
- $fkName = $this->_getForeignKeyName($fkName);
2470
-
2471
  $this->dropForeignKey($tableName, $fkName, $schemaName);
2472
 
2473
  if ($purge) {
@@ -2750,19 +2806,25 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2750
  /**
2751
  * Generate fragment of SQL, that check condition and return true or false value
2752
  *
2753
- * @param string $condition expression
2754
- * @param string $true true value
2755
- * @param string $false false value
2756
  */
2757
- public function getCheckSql($condition, $true, $false)
2758
  {
2759
- return new Zend_Db_Expr("IF({$condition}, {$true}, {$false})");
 
 
 
 
 
 
2760
  }
2761
 
2762
  /**
2763
  * Returns valid IFNULL expression
2764
  *
2765
- * @param string $column
2766
  * @param string $value OPTIONAL. Applies when $expression is NULL
2767
  * @return Zend_Db_Expr
2768
  */
@@ -3485,4 +3547,40 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
3485
  {
3486
  return $value;
3487
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3488
  }
670
  public function dropForeignKey($tableName, $fkName, $schemaName = null)
671
  {
672
  $foreignKeys = $this->getForeignKeys($tableName, $schemaName);
673
+ $fkName = strtoupper($fkName);
674
+ if (substr($fkName, 0, 3) == 'FK_') {
675
+ $fkName = substr($fkName, 3);
676
+ }
677
+ foreach (array($fkName, 'FK_' . $fkName) as $key) {
678
+ if (isset($foreignKeys[$key])) {
679
+ $sql = sprintf('ALTER TABLE %s DROP FOREIGN KEY %s',
680
+ $this->quoteIdentifier($this->_getTableName($tableName, $schemaName)),
681
+ $this->quoteIdentifier($foreignKeys[$key]['FK_NAME'])
682
+ );
683
+ $this->resetDdlCache($tableName, $schemaName);
684
+ $this->raw_query($sql);
685
+ }
686
  }
687
  return $this;
688
  }
989
  $ddl = $this->raw_fetchRow($sql, 'Create Table');
990
  $this->saveDdlCache($cacheKey, self::DDL_CREATE, $ddl);
991
  }
992
+
993
  return $ddl;
994
  }
995
 
1064
  $tree[$table][$key['COLUMN_NAME']] = $key;
1065
  }
1066
  }
1067
+
1068
  return $tree;
1069
  }
1070
 
1133
  $this->changeTableEngine($table, $tableData['engine']);
1134
  }
1135
  }
1136
+
1137
  return $this;
1138
  }
1139
 
1203
  }
1204
  $this->saveDdlCache($cacheKey, self::DDL_INDEX, $ddl);
1205
  }
1206
+
1207
  return $ddl;
1208
  }
1209
 
1278
  if ($this->_debug) {
1279
  $this->_debugTimer = microtime(true);
1280
  }
1281
+
1282
  return $this;
1283
  }
1284
 
1393
  if (is_array($value) && empty($value)) {
1394
  $value = new Zend_Db_Expr('NULL');
1395
  }
1396
+
1397
  return parent::quoteInto($text, $value, $type, $count);
1398
  }
1399
 
1580
  return $ddl;
1581
  }
1582
 
1583
+ /**
1584
+ * Format described column to definition, ready to be added to ddl table.
1585
+ * Return array with keys: name, type, length, options, comment
1586
+ *
1587
+ * @param array $columnData
1588
+ * @return array
1589
+ */
1590
+ public function getColumnCreateByDescribe($columnData)
1591
+ {
1592
+ $type = $this->_getColumnTypeByDdl($columnData);
1593
+ $options = array();
1594
+
1595
+ if ($columnData['IDENTITY'] === true) {
1596
+ $options['identity'] = true;
1597
+ }
1598
+ if ($columnData['UNSIGNED'] === true) {
1599
+ $options['unsigned'] = true;
1600
+ }
1601
+ if ($columnData['NULLABLE'] === false
1602
+ && !($type == Varien_Db_Ddl_Table::TYPE_TEXT && strlen($columnData['DEFAULT']) != 0)
1603
+ ) {
1604
+ $options['nullable'] = false;
1605
+ }
1606
+ if ($columnData['PRIMARY'] === true) {
1607
+ $options['primary'] = true;
1608
+ }
1609
+ if (!is_null($columnData['DEFAULT'])
1610
+ && $type != Varien_Db_Ddl_Table::TYPE_TEXT
1611
+ ) {
1612
+ $options['default'] = $this->quote($columnData['DEFAULT']);
1613
+ }
1614
+ if (strlen($columnData['SCALE']) > 0) {
1615
+ $options['scale'] = $columnData['SCALE'];
1616
+ }
1617
+ if (strlen($columnData['PRECISION']) > 0) {
1618
+ $options['precision'] = $columnData['PRECISION'];
1619
+ }
1620
+
1621
+ $comment = uc_words($columnData['COLUMN_NAME'], ' ');
1622
+
1623
+ $result = array(
1624
+ 'name' => $columnData['COLUMN_NAME'],
1625
+ 'type' => $type,
1626
+ 'length' => $columnData['LENGTH'],
1627
+ 'options' => $options,
1628
+ 'comment' => $comment
1629
+ );
1630
+
1631
+ return $result;
1632
+ }
1633
+
1634
  /**
1635
  * Create Varien_Db_Ddl_Table object by data from describe table
1636
  *
1642
  {
1643
  $describe = $this->describeTable($tableName);
1644
  $table = $this->newTable($newTableName)
1645
+ ->setComment(uc_words($newTableName, ' '));
1646
+
1647
  foreach ($describe as $columnData) {
1648
+ $columnInfo = $this->getColumnCreateByDescribe($columnData);
1649
+
1650
+ $table->addColumn(
1651
+ $columnInfo['name'],
1652
+ $columnInfo['type'],
1653
+ $columnInfo['length'],
1654
+ $columnInfo['options'],
1655
+ $columnInfo['comment']
1656
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1657
  }
1658
 
1659
  $indexes = $this->getIndexList($tableName);
1663
  * For reliability check both name and type, because these values can start to differ in future.
1664
  */
1665
  if (($indexData['KEY_NAME'] == 'PRIMARY')
1666
+ || ($indexData['INDEX_TYPE'] == Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY)
1667
+ ) {
1668
  continue;
1669
  }
1670
 
1711
  if (array_key_exists('DEFAULT', $definition) && is_null($definition['DEFAULT'])) {
1712
  unset($definition['DEFAULT']);
1713
  }
1714
+
1715
  return $this->modifyColumn($tableName, $columnName, $definition, $flushData, $schemaName);
1716
  }
1717
 
1784
  {
1785
  $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName));
1786
  $sql = sprintf('ALTER TABLE %s ENGINE=%s', $table, $engine);
1787
+
1788
  return $this->raw_query($sql);
1789
  }
1790
 
1800
  {
1801
  $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName));
1802
  $sql = sprintf("ALTER TABLE %s COMMENT='%s'", $table, $comment);
1803
+
1804
  return $this->raw_query($sql);
1805
  }
1806
 
1817
  $this->raw_query("SET @OLD_INSERT_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO'");
1818
  $result = $this->insert($table, $bind);
1819
  $this->raw_query("SET SQL_MODE=IFNULL(@OLD_INSERT_SQL_MODE,'')");
1820
+
1821
  return $result;
1822
  }
1823
 
1952
  // execute the statement and return the number of affected rows
1953
  $stmt = $this->query($insertQuery, $bind);
1954
  $result = $stmt->rowCount();
1955
+
1956
  return $result;
1957
  }
1958
 
1984
  if ($schemaName !== null) {
1985
  $table->setSchema($schemaName);
1986
  }
1987
+
1988
  return $table;
1989
  }
1990
 
2052
  $primary = array_map(array($this, 'quoteIdentifier'), array_keys($primary));
2053
  $definition[] = sprintf(' PRIMARY KEY (%s)', implode(', ', $primary));
2054
  }
2055
+
2056
  return $definition;
2057
  }
2058
 
2169
 
2170
  return $definition;
2171
  }
2172
+
2173
+ /**
2174
+ * Get column definition from description
2175
+ *
2176
+ * @param array $options
2177
+ * @param null|string $ddlType
2178
+ * @return string
2179
+ */
2180
+ public function getColumnDefinitionFromDescribe($options, $ddlType = null)
2181
+ {
2182
+ $columnInfo = $this->getColumnCreateByDescribe($options);
2183
+ foreach ($columnInfo['options'] as $key => $value) {
2184
+ $columnInfo[$key] = $value;
2185
+ }
2186
+ return $this->_getColumnDefinition($columnInfo, $ddlType);
2187
+ }
2188
+
2189
  /**
2190
  * Retrieve column definition fragment
2191
  *
2303
  } else {
2304
  $comment = $options['COMMENT'];
2305
  }
2306
+
2307
  return sprintf('%s%s%s%s%s COMMENT %s',
2308
  $cType,
2309
  $cUnsigned ? ' UNSIGNED' : '',
2326
  $table = $this->quoteIdentifier($this->_getTableName($tableName, $schemaName));
2327
  $query = 'DROP TABLE IF EXISTS ' . $table;
2328
  $this->query($query);
2329
+
2330
  return true;
2331
  }
2332
 
2499
  $cond);
2500
 
2501
  $this->resetDdlCache($tableName, $schemaName);
 
 
2502
 
2503
+ return $this->raw_query($sql);
 
 
 
 
 
 
 
 
 
 
2504
  }
2505
 
2506
  /**
2524
  $onUpdate = Varien_Db_Adapter_Interface::FK_ACTION_CASCADE,
2525
  $purge = false, $schemaName = null, $refSchemaName = null)
2526
  {
 
 
2527
  $this->dropForeignKey($tableName, $fkName, $schemaName);
2528
 
2529
  if ($purge) {
2806
  /**
2807
  * Generate fragment of SQL, that check condition and return true or false value
2808
  *
2809
+ * @param Zend_Db_Expr|Zend_Db_Select|string $expression
2810
+ * @param string $true true value
2811
+ * @param string $false false value
2812
  */
2813
+ public function getCheckSql($expression, $true, $false)
2814
  {
2815
+ if ($expression instanceof Zend_Db_Expr || $expression instanceof Zend_Db_Select) {
2816
+ $expression = sprintf("IF((%s), %s, %s)", $expression, $true, $false);
2817
+ } else {
2818
+ $expression = sprintf("IF(%s, %s, %s)", $expression, $true, $false);
2819
+ }
2820
+
2821
+ return new Zend_Db_Expr($expression);
2822
  }
2823
 
2824
  /**
2825
  * Returns valid IFNULL expression
2826
  *
2827
+ * @param Zend_Db_Expr|Zend_Db_Select|string $expression
2828
  * @param string $value OPTIONAL. Applies when $expression is NULL
2829
  * @return Zend_Db_Expr
2830
  */
3547
  {
3548
  return $value;
3549
  }
3550
+
3551
+
3552
+
3553
+
3554
+
3555
+ /**
3556
+ * Returns date that fits into TYPE_DATETIME range and is suggested to act as default 'zero' value
3557
+ * for a column for current RDBMS. Deprecated and left for compatibility only.
3558
+ * In Magento at MySQL there was zero date used for datetime columns. However, zero date it is not supported across
3559
+ * different RDBMS. Thus now it is recommended to use same default value equal for all RDBMS - either NULL
3560
+ * or specific date supported by all RDBMS.
3561
+ *
3562
+ * @deprecated after 1.5.1.0
3563
+ * @return string
3564
+ */
3565
+ public function getSuggestedZeroDate()
3566
+ {
3567
+ return '0000-00-00 00:00:00';
3568
+ }
3569
+
3570
+ /**
3571
+ * Retrieve Foreign Key name
3572
+ *
3573
+ * @deprecated after 1.6.0.0
3574
+ *
3575
+ * @param string $fkName
3576
+ * @return string
3577
+ */
3578
+ protected function _getForeignKeyName($fkName)
3579
+ {
3580
+ if (substr($fkName, 0, 3) != 'FK_') {
3581
+ $fkName = 'FK_' . $fkName;
3582
+ }
3583
+
3584
+ return $fkName;
3585
+ }
3586
  }
lib/Varien/Image/Adapter/Gd2.php CHANGED
@@ -36,6 +36,13 @@ class Varien_Image_Adapter_Gd2 extends Varien_Image_Adapter_Abstract
36
  IMAGETYPE_WBMP => array('output' => 'imagewbmp', 'create' => 'imagecreatefromxbm'),
37
  );
38
 
 
 
 
 
 
 
 
39
  public function open($filename)
40
  {
41
  $this->_fileName = $filename;
@@ -71,11 +78,27 @@ class Varien_Image_Adapter_Gd2 extends Varien_Image_Adapter_Abstract
71
  }
72
  }
73
 
74
- // keep alpha transparency
75
- $isAlpha = false;
76
- $this->_getTransparency($this->_imageHandler, $this->_fileType, $isAlpha);
77
- if ($isAlpha) {
78
- $this->_fillBackgroundColor($this->_imageHandler);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
 
81
  $functionParameters = array();
@@ -138,12 +161,6 @@ class Varien_Image_Adapter_Gd2 extends Varien_Image_Adapter_Abstract
138
  if ($this->_keepTransparency) {
139
  $isAlpha = false;
140
  $transparentIndex = $this->_getTransparency($this->_imageHandler, $this->_fileType, $isAlpha);
141
-
142
- if ($isAlpha || false === $transparentIndex || $transparentIndex < 0) {
143
- $transparencyCondition = false;
144
- } else {
145
- $transparencyCondition = $transparentIndex < imagecolorstotal($this->_imageHandler);
146
- }
147
  try {
148
  // fill truecolor png with alpha transparency
149
  if ($isAlpha) {
@@ -165,7 +182,7 @@ class Varien_Image_Adapter_Gd2 extends Varien_Image_Adapter_Abstract
165
  return $transparentAlphaColor;
166
  }
167
  // fill image with indexed non-alpha transparency
168
- elseif ($transparentIndex) {
169
  $transparentColor = false;
170
  if ($transparentIndex >=0 && $transparentIndex <= imagecolorstotal($this->_imageHandler)) {
171
  list($r, $g, $b) = array_values(imagecolorsforindex($this->_imageHandler, $transparentIndex));
@@ -319,6 +336,7 @@ class Varien_Image_Adapter_Gd2 extends Varien_Image_Adapter_Abstract
319
  );
320
  $this->_imageHandler = $newImage;
321
  $this->refreshImageDimensions();
 
322
  }
323
 
324
  public function rotate($angle)
36
  IMAGETYPE_WBMP => array('output' => 'imagewbmp', 'create' => 'imagecreatefromxbm'),
37
  );
38
 
39
+ /**
40
+ * Whether image was resized or not
41
+ *
42
+ * @var bool
43
+ */
44
+ protected $_resized = false;
45
+
46
  public function open($filename)
47
  {
48
  $this->_fileName = $filename;
78
  }
79
  }
80
 
81
+ if (!$this->_resized) {
82
+ // keep alpha transparency
83
+ $isAlpha = false;
84
+ $isTrueColor = false;
85
+ $this->_getTransparency($this->_imageHandler, $this->_fileType, $isAlpha, $isTrueColor);
86
+ if ($isAlpha) {
87
+ if ($isTrueColor) {
88
+ $newImage = imagecreatetruecolor($this->_imageSrcWidth, $this->_imageSrcHeight);
89
+ } else {
90
+ $newImage = imagecreate($this->_imageSrcWidth, $this->_imageSrcHeight);
91
+ }
92
+ $this->_fillBackgroundColor($newImage);
93
+ imagecopy(
94
+ $newImage,
95
+ $this->_imageHandler,
96
+ 0, 0,
97
+ 0, 0,
98
+ $this->_imageSrcWidth, $this->_imageSrcHeight
99
+ );
100
+ $this->_imageHandler = $newImage;
101
+ }
102
  }
103
 
104
  $functionParameters = array();
161
  if ($this->_keepTransparency) {
162
  $isAlpha = false;
163
  $transparentIndex = $this->_getTransparency($this->_imageHandler, $this->_fileType, $isAlpha);
 
 
 
 
 
 
164
  try {
165
  // fill truecolor png with alpha transparency
166
  if ($isAlpha) {
182
  return $transparentAlphaColor;
183
  }
184
  // fill image with indexed non-alpha transparency
185
+ elseif (false !== $transparentIndex) {
186
  $transparentColor = false;
187
  if ($transparentIndex >=0 && $transparentIndex <= imagecolorstotal($this->_imageHandler)) {
188
  list($r, $g, $b) = array_values(imagecolorsforindex($this->_imageHandler, $transparentIndex));
336
  );
337
  $this->_imageHandler = $newImage;
338
  $this->refreshImageDimensions();
339
+ $this->_resized = true;
340
  }
341
 
342
  public function rotate($angle)
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Lib_Varien</name>
4
- <version>1.6.0.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>Varien Library</summary>
10
  <description>Varien Library</description>
11
- <notes>1.6.0.0</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
- <date>2011-08-18</date>
14
- <time>08:29:37</time>
15
- <contents><target name="magelib"><dir name="Varien"><file name="Autoload.php" hash="78ab4b97bbcca3c08de3619dd94550e6"/><dir name="Cache"><dir name="Backend"><file name="Database.php" hash="09535993a910ade50a2cd763da0f6d9e"/><file name="Eaccelerator.php" hash="00bc01db2c4457fdad760835992ae2dc"/></dir><file name="Core.php" hash="018b7952a12633b8ec2a3d856d2b2c41"/></dir><dir name="Convert"><dir name="Action"><file name="Abstract.php" hash="3de0b3f423df89243793e3b474b9cbe8"/><file name="Interface.php" hash="fe9129227525ffc1f862c6f1f85e83f1"/></dir><file name="Action.php" hash="ee3a0baf50c1bb0f1c0b67721f1965e6"/><dir name="Adapter"><file name="Abstract.php" hash="0c53dc267b75e595518365ab8f1d8ab4"/><dir name="Db"><file name="Table.php" hash="d6b8a1bfe2de4ed908ca0367fb226d2c"/></dir><dir name="Http"><file name="Curl.php" hash="938f2e176d58f61e078329949d23a92e"/></dir><file name="Http.php" hash="afb44986f4d6ba1cf84819bbb31004b2"/><file name="Interface.php" hash="2c4834f37eede972be48c8b3a2857661"/><file name="Io.php" hash="a9ceb53b810de3e183b439ba1bb1ba57"/><file name="Soap.php" hash="4b67a9ea45b12dfffabd26d2cb8942f2"/><file name="Std.php" hash="225b4e11d9ffcd1db8f99d54dc749687"/><dir name="Zend"><file name="Cache.php" hash="845fcb65276b05714b8d231c6b30f651"/><file name="Db.php" hash="794cb6226590ff7d2a7d1fbce26fcc05"/></dir></dir><dir name="Container"><file name="Abstract.php" hash="8f836665d0dec3c7cc7d93714e9c99b4"/><file name="Collection.php" hash="b1ef8a70ea806deb351b5413d6cfacef"/><file name="Generic.php" hash="bef8559c7a10ecf3ebb3f147795a2597"/><file name="Interface.php" hash="870470de0ec947f1039aa415d37d0f82"/></dir><file name="Exception.php" hash="58c9437dd946d5251234f55de3648d3f"/><dir name="Mapper"><file name="Abstract.php" hash="e1d9d87a1270ad6a499549dd87f9ac62"/><file name="Column.php" hash="7f74158a73fd8fa83052625ef07b1749"/><file name="Interface.php" hash="d8a8b98cece9ae38302914bbc910c094"/></dir><dir name="Parser"><file name="Abstract.php" hash="3559203bdcdb019daddd9ed558f596a7"/><file name="Csv.php" hash="f68d8dc8c0695296cc32b1ca716a8276"/><file name="Interface.php" hash="016ab96988f7ae02d2e84ed4878513ca"/><file name="Serialize.php" hash="52a93cacd5f3d3e0267bbffc74d7d715"/><dir name="Xml"><file name="Excel.php" hash="a8b60288a1aa41de84394b5c040c4e4d"/></dir></dir><dir name="Profile"><file name="Abstract.php" hash="c038c0b7a209c7a189beb6aa21df617b"/><file name="Collection.php" hash="2ff1f76cafa7e36826063069efdba8ad"/></dir><file name="Profile.php" hash="9b63f8909ed29bf5a3c729bc5934cb9c"/><dir name="Validator"><file name="Abstract.php" hash="3fdf8a0fcd2366563e330c30456f19b9"/><file name="Column.php" hash="da9bb1ffa8d6026a6d26365da4cec289"/><file name="Dryrun.php" hash="70f63aa2f6146c67658dc7bfd04ddf02"/><file name="Interface.php" hash="59c7a5d323e0a3bb6928754f3f4393ad"/></dir></dir><file name="Convert.php" hash="441a61c66ee524a024c7ffe8b7c7c3c2"/><dir name="Crypt"><file name="Abstract.php" hash="73980e75bef5f58855ea924c3693522d"/><file name="Mcrypt.php" hash="3c62cbb2f8e763e0da985b7bc054c5c3"/></dir><file name="Crypt.php" hash="cb28cabbc8a02fd86705bc0b52d7204b"/><dir name="Data"><dir name="Collection"><file name="Db.php" hash="7783ac1ea190203c1aab7ac71711e289"/><file name="Filesystem.php" hash="4574312fc65b08180fdcdba4d0358940"/></dir><file name="Collection.php" hash="22e12b16701101cce3aff641987ba563"/><dir name="Form"><file name="Abstract.php" hash="59476179174aeba63350312b28b4322f"/><dir name="Element"><file name="Abstract.php" hash="42d3ce5e06903c234969112e04f1b011"/><file name="Button.php" hash="98c64b5da29dff22cfae938caa5833c8"/><file name="Checkbox.php" hash="7992114fdc4aefafceebac2a08c1a434"/><file name="Checkboxes.php" hash="fdc32833161b60139e9859f387bce6c7"/><file name="Collection.php" hash="91c768b801f9eeebdd9121194e6fad24"/><file name="Column.php" hash="b6d1d32aca981ae0fd1c6a83fc655c9a"/><file name="Date.php" hash="3f5c8628e329cbc87c33c7e622a3b946"/><file name="Editor.php" hash="342d54be12c89037d5c74b5c81b78843"/><file name="Fieldset.php" hash="f78031a222ad4263826adf2f35622c72"/><file name="File.php" hash="463e8c8e106fe2018fdbf117e330423e"/><file name="Gallery.php" hash="6cb83ebc8efae252978fbd22c001642b"/><file name="Hidden.php" hash="ae6275e5d3b7df411bfda4fb4f995a8c"/><file name="Image.php" hash="9cd7231a0e14dc569045cf5fbf0e5b7f"/><file name="Imagefile.php" hash="2d6ed40fef1c2927ab22dea7d29336db"/><file name="Label.php" hash="6759a3286fb2b126e998934af8d6ce17"/><file name="Link.php" hash="fb213bbbce4e46ea03a96923defbfbb3"/><file name="Multiline.php" hash="087bd60ff98b4b9c094b9adec040f166"/><file name="Multiselect.php" hash="9e0d04674a743602438fd4190040944c"/><file name="Note.php" hash="f5b71ebcf5a2b774393d9f4d1581dc35"/><file name="Obscure.php" hash="b61a077fbdea1b93be0aafc2f2c2f391"/><file name="Password.php" hash="a15263e7b0fabe8bd6abf8487f43efcb"/><file name="Radio.php" hash="4b32afab119091759d93ec99fb2fd53b"/><file name="Radios.php" hash="9004386a01f6c2b09435f39bf9b5bb36"/><dir name="Renderer"><file name="Interface.php" hash="61baa8c8755a9a7e8eaac5786ae38f42"/></dir><file name="Reset.php" hash="51bc11836e12bd64390476e3ff393c13"/><file name="Select.php" hash="4402f264e6e2cae5fbad26bc44aa21fe"/><file name="Submit.php" hash="5b9e9e3db9bc70757030312b7d002b7e"/><file name="Text.php" hash="2e798cfd096ac0a87f9d9055000af3c3"/><file name="Textarea.php" hash="b88d00399b8f6846d56055c9416dd0bb"/><file name="Time.php" hash="f35d8d1dc0a90dd6f044f17c22d8dc4a"/></dir><dir name="Filter"><file name="Date.php" hash="80eee9775448a21a5332f3e5cb7edcc9"/><file name="Escapehtml.php" hash="0c02fdfbae30158aa14f45b937332249"/><file name="Interface.php" hash="4542e15af14cc92d7bf5a863d4bf5ddd"/><file name="Striptags.php" hash="2c4cd0905e4e3b99ba373ffeb9ab7d38"/></dir></dir><file name="Form.php" hash="407eee6f100c7befa18ca586b3c3ae04"/><dir name="Tree"><file name="Db.php" hash="d06e9a49ddb1ea94892f4f10e1b3fea1"/><file name="Dbp.php" hash="4bd7f5b9047870f125459dbf523f73a2"/><dir name="Node"><file name="Collection.php" hash="941c88db98d69ec170674380fe3413d5"/></dir><file name="Node.php" hash="e985629bbea05cd0e52d7ac82fc2ee27"/></dir><file name="Tree.php" hash="e39d73757e0535493badc5bea8459834"/></dir><file name="Date.php" hash="27ce5543f5a6ffaba55ec023c88db4d8"/><dir name="Db"><dir name="Adapter"><file name="Interface.php" hash="1c1652ccba2bd7a8afbe0725c895247e"/><file name="Mysqli.php" hash="4e6e03a6ddf127f58ab0326c4cfe9956"/><dir name="Pdo"><file name="Mysql.php" hash="7ca13eb359d054c0f09c00a207e8e8a7"/></dir></dir><dir name="Ddl"><file name="Table.php" hash="5a9390d89162ea56f73a0817de4d029f"/></dir><file name="Exception.php" hash="93966b32e96f793f031244716ff37eed"/><file name="Helper.php" hash="eee52d2574360dabe7a5e830bc0a67b8"/><file name="Select.php" hash="5a5d369789c672060f68bcdbd2fa6a15"/><dir name="Statement"><file name="Parameter.php" hash="8d688f64d6780d18e517921ea5eb9ccb"/><dir name="Pdo"><file name="Mysql.php" hash="e82abad90774a126efb8bd27bc0f43f7"/></dir></dir><dir name="Tree"><file name="Exception.php" hash="6a00d12bbed94d648a974d213a816a4b"/><dir name="Node"><file name="Exception.php" hash="f890d0fc36e89aefd7cf04ae6c10a88e"/></dir><file name="Node.php" hash="6b048bbe2b2c46e405ffae8bca23e579"/><dir name="NodeSet"><file name="Exception.php" hash="2caa6a4b09846fe3b941563aa55d3c5f"/></dir><file name="NodeSet.php" hash="5e589b0c1221caf2693fe6f7d07e1ad3"/></dir><file name="Tree.php" hash="c7cc99ac052aa5d1ac721619d47506e6"/></dir><file name="Debug.php" hash="ec721f169e5a16524a17abba094d651d"/><dir name="Directory"><file name="Collection.php" hash="30b6c2b8bb8066d1636ff0d477ffc7fc"/><file name="Factory.php" hash="1ef74a40cd121892c730722ed0e3353a"/><file name="IFactory.php" hash="5ba24f161727511bbce35e588c55fe4d"/><file name="a.txt" hash="026e450c46ac92ea375302955a4f42fb"/></dir><dir name="Event"><file name="Collection.php" hash="cb422c6c7abb160fa3d7d54669bf2b2e"/><dir name="Observer"><file name="Collection.php" hash="b9c7d52c9563a19d15723bbc4a85fac6"/><file name="Cron.php" hash="0e04e63cf24f5cce3031f5896c439b68"/><file name="Regex.php" hash="f97f5a4435d560e073d725681cb15264"/></dir><file name="Observer.php" hash="eff7b66ce01d3f8fc4c00d974a2d5440"/></dir><file name="Event.php" hash="1836bb96f191e616d59178f17e407277"/><file name="Exception.php" hash="6beb1561720cc6c7a894a955ff2251b7"/><dir name="File"><file name="Csv.php" hash="5736e17051a3e778c59b99ed669caee5"/><file name="CsvMulty.php" hash="af4518063d4d9f03cfbfca832c1b9d76"/><file name="Object.php" hash="9ffd59210edf58d402dd961d62f9819a"/><dir name="Transfer"><dir name="Adapter"><file name="Http.php" hash="c71dc1460cdcf062adb97b577e621923"/></dir></dir><dir name="Uploader"><file name="Image.php" hash="2655d6497c074c8c4998c58320d60c14"/></dir><file name="Uploader.php" hash="4b8de17ad226bac218447aafa40b5caf"/></dir><dir name="Filter"><dir name="Array"><file name="Grid.php" hash="14bd2f5ab60e7255557fc2dff7f24a37"/></dir><file name="Array.php" hash="a38e3d26f47d1bfaf4e023662d9a3dad"/><file name="Email.php" hash="067f3ea6f1597ea2501455865977d789"/><file name="Money.php" hash="8bec682670cb4cbf48e4b4264e2ab188"/><dir name="Object"><file name="Grid.php" hash="e3c3fa92761e5a1e1401192d8362301e"/></dir><file name="Object.php" hash="5b85aaff354eb0770e14efcfebda263b"/><file name="Sprintf.php" hash="0dd85ddc3d4b737d7cc6308afc12db18"/><dir name="Template"><file name="Simple.php" hash="b342cd136c10a6630d2d7dccd4137387"/><dir name="Tokenizer"><file name="Abstract.php" hash="d737a3d6599939b2a12b55975c9af780"/><file name="Parameter.php" hash="140ab2548a3da859473a46c7b0d44504"/><file name="Variable.php" hash="4ba64c31b234db22c2ff1799a49e7798"/></dir></dir><file name="Template.php" hash="59612d4851769548308449114b6c122a"/></dir><dir name="Http"><dir name="Adapter"><file name="Curl.php" hash="4b74b0a2c86732d32a653794a3afc52f"/></dir><file name="Client.php" hash="eac22d5beaca06c1678c327a13e7f45d"/></dir><dir name="Image"><dir name="Adapter"><file name="Abstract.php" hash="0ac17ab0c82dea6289caf0985be0c47d"/><file name="Gd2.php" hash="c2f287351143e69cf7c66824588f1dd4"/></dir><file name="Adapter.php" hash="edbab0bcfa931ae1d8f813f467e6b311"/></dir><file name="Image.php" hash="dfec3144e465eb2558a76a84f4736254"/><dir name="Io"><file name="Abstract.php" hash="53e7055dfe0ca7d133b94cfbf3621693"/><file name="Exception.php" hash="493365429caf5d2170c00137b081b195"/><file name="File.php" hash="4d0613516c6d3824d1ec4442c99a6b8a"/><file name="Ftp.php" hash="f349b9b833133853c902abb493d4f3bd"/><file name="Interface.php" hash="0b26ea223a4bed00df9b7b808b2acf80"/><file name="Sftp.php" hash="461d458eb368ed01f3b9194bafc4030d"/></dir><dir name="Object"><file name="Cache.php" hash="a87d2ae2d015a4e2f2fc1b611feccfcd"/><file name="Mapper.php" hash="1180b9b29c366d886e8af05181aebbce"/></dir><file name="Object.php" hash="0d5d06e7eb4439372bf90e2e41e998d7"/><dir name="Pear"><file name="Frontend.php" hash="d3d737fc569c67b177ccd0b6dcb5f22f"/><file name="Package.php" hash="8468373495be75543f7c853f94177d0b"/><file name="Registry.php" hash="5c38bf2cdb4108267acdcb23bb3dd93d"/></dir><file name="Pear.php" hash="7d068de3a3989c8575521c143261fe40"/><file name="Profiler.php" hash="d434c08a6dd3ef8eb168e3a3d46f057f"/><dir name="Simplexml"><dir name="Config"><dir name="Cache"><file name="Abstract.php" hash="6dbbd6f1bc63c1b7ee086399da30f4e0"/><file name="File.php" hash="f99292ec6d04d5464a1313a2c52880d4"/></dir></dir><file name="Config.php" hash="a957b7feccdf430239af81610a6ac281"/><file name="Element.php" hash="f8321180f2b343080ffd89591943b239"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Lib_ZF</name><channel>community</channel><min>1.11.1.0</min><max>1.12.0.0</max></package><extension><name>PDO</name><min></min><max></max></extension><extension><name>SPL</name><min></min><max></max></extension><extension><name>curl</name><min></min><max></max></extension><extension><name>SimpleXML</name><min></min><max></max></extension><extension><name>dom</name><min></min><max></max></extension><extension><name>gd</name><min></min><max></max></extension><extension><name>iconv</name><min></min><max></max></extension><extension><name>pdo_mysql</name><min></min><max></max></extension><extension><name>mcrypt</name><min></min><max></max></extension><extension><name>pcre</name><min></min><max></max></extension><extension><name>Reflection</name><min></min><max></max></extension><extension><name>session</name><min></min><max></max></extension></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Lib_Varien</name>
4
+ <version>1.6.1.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>Varien Library</summary>
10
  <description>Varien Library</description>
11
+ <notes>1.6.1.0</notes>
12
  <authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
+ <date>2011-10-19</date>
14
+ <time>11:50:03</time>
15
+ <contents><target name="magelib"><dir name="Varien"><file name="Autoload.php" hash="78ab4b97bbcca3c08de3619dd94550e6"/><dir name="Cache"><dir name="Backend"><file name="Database.php" hash="09535993a910ade50a2cd763da0f6d9e"/><file name="Eaccelerator.php" hash="00bc01db2c4457fdad760835992ae2dc"/><file name="Memcached.php" hash="9de5a66839dbd79d7c365b58514777fe"/></dir><file name="Core.php" hash="018b7952a12633b8ec2a3d856d2b2c41"/></dir><dir name="Convert"><dir name="Action"><file name="Abstract.php" hash="3de0b3f423df89243793e3b474b9cbe8"/><file name="Interface.php" hash="fe9129227525ffc1f862c6f1f85e83f1"/></dir><file name="Action.php" hash="ee3a0baf50c1bb0f1c0b67721f1965e6"/><dir name="Adapter"><file name="Abstract.php" hash="0c53dc267b75e595518365ab8f1d8ab4"/><dir name="Db"><file name="Table.php" hash="d6b8a1bfe2de4ed908ca0367fb226d2c"/></dir><dir name="Http"><file name="Curl.php" hash="938f2e176d58f61e078329949d23a92e"/></dir><file name="Http.php" hash="afb44986f4d6ba1cf84819bbb31004b2"/><file name="Interface.php" hash="2c4834f37eede972be48c8b3a2857661"/><file name="Io.php" hash="a9ceb53b810de3e183b439ba1bb1ba57"/><file name="Soap.php" hash="4b67a9ea45b12dfffabd26d2cb8942f2"/><file name="Std.php" hash="225b4e11d9ffcd1db8f99d54dc749687"/><dir name="Zend"><file name="Cache.php" hash="845fcb65276b05714b8d231c6b30f651"/><file name="Db.php" hash="794cb6226590ff7d2a7d1fbce26fcc05"/></dir></dir><dir name="Container"><file name="Abstract.php" hash="8f836665d0dec3c7cc7d93714e9c99b4"/><file name="Collection.php" hash="b1ef8a70ea806deb351b5413d6cfacef"/><file name="Generic.php" hash="bef8559c7a10ecf3ebb3f147795a2597"/><file name="Interface.php" hash="870470de0ec947f1039aa415d37d0f82"/></dir><file name="Exception.php" hash="58c9437dd946d5251234f55de3648d3f"/><dir name="Mapper"><file name="Abstract.php" hash="e1d9d87a1270ad6a499549dd87f9ac62"/><file name="Column.php" hash="7f74158a73fd8fa83052625ef07b1749"/><file name="Interface.php" hash="d8a8b98cece9ae38302914bbc910c094"/></dir><dir name="Parser"><file name="Abstract.php" hash="3559203bdcdb019daddd9ed558f596a7"/><file name="Csv.php" hash="f68d8dc8c0695296cc32b1ca716a8276"/><file name="Interface.php" hash="016ab96988f7ae02d2e84ed4878513ca"/><file name="Serialize.php" hash="52a93cacd5f3d3e0267bbffc74d7d715"/><dir name="Xml"><file name="Excel.php" hash="a8b60288a1aa41de84394b5c040c4e4d"/></dir></dir><dir name="Profile"><file name="Abstract.php" hash="c038c0b7a209c7a189beb6aa21df617b"/><file name="Collection.php" hash="2ff1f76cafa7e36826063069efdba8ad"/></dir><file name="Profile.php" hash="9b63f8909ed29bf5a3c729bc5934cb9c"/><dir name="Validator"><file name="Abstract.php" hash="3fdf8a0fcd2366563e330c30456f19b9"/><file name="Column.php" hash="da9bb1ffa8d6026a6d26365da4cec289"/><file name="Dryrun.php" hash="70f63aa2f6146c67658dc7bfd04ddf02"/><file name="Interface.php" hash="59c7a5d323e0a3bb6928754f3f4393ad"/></dir></dir><file name="Convert.php" hash="441a61c66ee524a024c7ffe8b7c7c3c2"/><dir name="Crypt"><file name="Abstract.php" hash="73980e75bef5f58855ea924c3693522d"/><file name="Mcrypt.php" hash="3c62cbb2f8e763e0da985b7bc054c5c3"/></dir><file name="Crypt.php" hash="cb28cabbc8a02fd86705bc0b52d7204b"/><dir name="Data"><dir name="Collection"><file name="Db.php" hash="7783ac1ea190203c1aab7ac71711e289"/><file name="Filesystem.php" hash="4574312fc65b08180fdcdba4d0358940"/></dir><file name="Collection.php" hash="22e12b16701101cce3aff641987ba563"/><dir name="Form"><file name="Abstract.php" hash="59476179174aeba63350312b28b4322f"/><dir name="Element"><file name="Abstract.php" hash="42d3ce5e06903c234969112e04f1b011"/><file name="Button.php" hash="98c64b5da29dff22cfae938caa5833c8"/><file name="Checkbox.php" hash="7992114fdc4aefafceebac2a08c1a434"/><file name="Checkboxes.php" hash="fdc32833161b60139e9859f387bce6c7"/><file name="Collection.php" hash="91c768b801f9eeebdd9121194e6fad24"/><file name="Column.php" hash="b6d1d32aca981ae0fd1c6a83fc655c9a"/><file name="Date.php" hash="3f5c8628e329cbc87c33c7e622a3b946"/><file name="Editor.php" hash="342d54be12c89037d5c74b5c81b78843"/><file name="Fieldset.php" hash="f78031a222ad4263826adf2f35622c72"/><file name="File.php" hash="463e8c8e106fe2018fdbf117e330423e"/><file name="Gallery.php" hash="6cb83ebc8efae252978fbd22c001642b"/><file name="Hidden.php" hash="ae6275e5d3b7df411bfda4fb4f995a8c"/><file name="Image.php" hash="9cd7231a0e14dc569045cf5fbf0e5b7f"/><file name="Imagefile.php" hash="2d6ed40fef1c2927ab22dea7d29336db"/><file name="Label.php" hash="6759a3286fb2b126e998934af8d6ce17"/><file name="Link.php" hash="fb213bbbce4e46ea03a96923defbfbb3"/><file name="Multiline.php" hash="087bd60ff98b4b9c094b9adec040f166"/><file name="Multiselect.php" hash="9e0d04674a743602438fd4190040944c"/><file name="Note.php" hash="f5b71ebcf5a2b774393d9f4d1581dc35"/><file name="Obscure.php" hash="b61a077fbdea1b93be0aafc2f2c2f391"/><file name="Password.php" hash="a15263e7b0fabe8bd6abf8487f43efcb"/><file name="Radio.php" hash="4b32afab119091759d93ec99fb2fd53b"/><file name="Radios.php" hash="9004386a01f6c2b09435f39bf9b5bb36"/><dir name="Renderer"><file name="Interface.php" hash="61baa8c8755a9a7e8eaac5786ae38f42"/></dir><file name="Reset.php" hash="51bc11836e12bd64390476e3ff393c13"/><file name="Select.php" hash="4402f264e6e2cae5fbad26bc44aa21fe"/><file name="Submit.php" hash="5b9e9e3db9bc70757030312b7d002b7e"/><file name="Text.php" hash="2e798cfd096ac0a87f9d9055000af3c3"/><file name="Textarea.php" hash="b88d00399b8f6846d56055c9416dd0bb"/><file name="Time.php" hash="f35d8d1dc0a90dd6f044f17c22d8dc4a"/></dir><dir name="Filter"><file name="Date.php" hash="80eee9775448a21a5332f3e5cb7edcc9"/><file name="Escapehtml.php" hash="0c02fdfbae30158aa14f45b937332249"/><file name="Interface.php" hash="4542e15af14cc92d7bf5a863d4bf5ddd"/><file name="Striptags.php" hash="2c4cd0905e4e3b99ba373ffeb9ab7d38"/></dir></dir><file name="Form.php" hash="407eee6f100c7befa18ca586b3c3ae04"/><dir name="Tree"><file name="Db.php" hash="d06e9a49ddb1ea94892f4f10e1b3fea1"/><file name="Dbp.php" hash="4bd7f5b9047870f125459dbf523f73a2"/><dir name="Node"><file name="Collection.php" hash="941c88db98d69ec170674380fe3413d5"/></dir><file name="Node.php" hash="e985629bbea05cd0e52d7ac82fc2ee27"/></dir><file name="Tree.php" hash="e39d73757e0535493badc5bea8459834"/></dir><file name="Date.php" hash="27ce5543f5a6ffaba55ec023c88db4d8"/><dir name="Db"><dir name="Adapter"><file name="Interface.php" hash="ea5a7008777ce827eea19f70107e22ba"/><file name="Mysqli.php" hash="4e6e03a6ddf127f58ab0326c4cfe9956"/><dir name="Pdo"><file name="Mysql.php" hash="49cec4cf8aa903eb9c4cff6bb26d7934"/></dir></dir><dir name="Ddl"><file name="Table.php" hash="5a9390d89162ea56f73a0817de4d029f"/></dir><file name="Exception.php" hash="93966b32e96f793f031244716ff37eed"/><file name="Helper.php" hash="eee52d2574360dabe7a5e830bc0a67b8"/><file name="Select.php" hash="5a5d369789c672060f68bcdbd2fa6a15"/><dir name="Statement"><file name="Parameter.php" hash="8d688f64d6780d18e517921ea5eb9ccb"/><dir name="Pdo"><file name="Mysql.php" hash="e82abad90774a126efb8bd27bc0f43f7"/></dir></dir><dir name="Tree"><file name="Exception.php" hash="6a00d12bbed94d648a974d213a816a4b"/><dir name="Node"><file name="Exception.php" hash="f890d0fc36e89aefd7cf04ae6c10a88e"/></dir><file name="Node.php" hash="6b048bbe2b2c46e405ffae8bca23e579"/><dir name="NodeSet"><file name="Exception.php" hash="2caa6a4b09846fe3b941563aa55d3c5f"/></dir><file name="NodeSet.php" hash="5e589b0c1221caf2693fe6f7d07e1ad3"/></dir><file name="Tree.php" hash="c7cc99ac052aa5d1ac721619d47506e6"/></dir><file name="Debug.php" hash="ec721f169e5a16524a17abba094d651d"/><dir name="Directory"><file name="Collection.php" hash="30b6c2b8bb8066d1636ff0d477ffc7fc"/><file name="Factory.php" hash="1ef74a40cd121892c730722ed0e3353a"/><file name="IFactory.php" hash="5ba24f161727511bbce35e588c55fe4d"/><file name="a.txt" hash="026e450c46ac92ea375302955a4f42fb"/></dir><dir name="Event"><file name="Collection.php" hash="cb422c6c7abb160fa3d7d54669bf2b2e"/><dir name="Observer"><file name="Collection.php" hash="b9c7d52c9563a19d15723bbc4a85fac6"/><file name="Cron.php" hash="0e04e63cf24f5cce3031f5896c439b68"/><file name="Regex.php" hash="f97f5a4435d560e073d725681cb15264"/></dir><file name="Observer.php" hash="eff7b66ce01d3f8fc4c00d974a2d5440"/></dir><file name="Event.php" hash="1836bb96f191e616d59178f17e407277"/><file name="Exception.php" hash="6beb1561720cc6c7a894a955ff2251b7"/><dir name="File"><file name="Csv.php" hash="5736e17051a3e778c59b99ed669caee5"/><file name="CsvMulty.php" hash="af4518063d4d9f03cfbfca832c1b9d76"/><file name="Object.php" hash="9ffd59210edf58d402dd961d62f9819a"/><dir name="Transfer"><dir name="Adapter"><file name="Http.php" hash="c71dc1460cdcf062adb97b577e621923"/></dir></dir><dir name="Uploader"><file name="Image.php" hash="2655d6497c074c8c4998c58320d60c14"/></dir><file name="Uploader.php" hash="4b8de17ad226bac218447aafa40b5caf"/></dir><dir name="Filter"><dir name="Array"><file name="Grid.php" hash="14bd2f5ab60e7255557fc2dff7f24a37"/></dir><file name="Array.php" hash="a38e3d26f47d1bfaf4e023662d9a3dad"/><file name="Email.php" hash="067f3ea6f1597ea2501455865977d789"/><file name="Money.php" hash="8bec682670cb4cbf48e4b4264e2ab188"/><dir name="Object"><file name="Grid.php" hash="e3c3fa92761e5a1e1401192d8362301e"/></dir><file name="Object.php" hash="5b85aaff354eb0770e14efcfebda263b"/><file name="Sprintf.php" hash="0dd85ddc3d4b737d7cc6308afc12db18"/><dir name="Template"><file name="Simple.php" hash="b342cd136c10a6630d2d7dccd4137387"/><dir name="Tokenizer"><file name="Abstract.php" hash="d737a3d6599939b2a12b55975c9af780"/><file name="Parameter.php" hash="140ab2548a3da859473a46c7b0d44504"/><file name="Variable.php" hash="4ba64c31b234db22c2ff1799a49e7798"/></dir></dir><file name="Template.php" hash="59612d4851769548308449114b6c122a"/></dir><dir name="Http"><dir name="Adapter"><file name="Curl.php" hash="4b74b0a2c86732d32a653794a3afc52f"/></dir><file name="Client.php" hash="eac22d5beaca06c1678c327a13e7f45d"/></dir><dir name="Image"><dir name="Adapter"><file name="Abstract.php" hash="0ac17ab0c82dea6289caf0985be0c47d"/><file name="Gd2.php" hash="a35a55acdb36ed25a8398b10cea3afef"/></dir><file name="Adapter.php" hash="edbab0bcfa931ae1d8f813f467e6b311"/></dir><file name="Image.php" hash="dfec3144e465eb2558a76a84f4736254"/><dir name="Io"><file name="Abstract.php" hash="53e7055dfe0ca7d133b94cfbf3621693"/><file name="Exception.php" hash="493365429caf5d2170c00137b081b195"/><file name="File.php" hash="4d0613516c6d3824d1ec4442c99a6b8a"/><file name="Ftp.php" hash="f349b9b833133853c902abb493d4f3bd"/><file name="Interface.php" hash="0b26ea223a4bed00df9b7b808b2acf80"/><file name="Sftp.php" hash="461d458eb368ed01f3b9194bafc4030d"/></dir><dir name="Object"><file name="Cache.php" hash="a87d2ae2d015a4e2f2fc1b611feccfcd"/><file name="Mapper.php" hash="1180b9b29c366d886e8af05181aebbce"/></dir><file name="Object.php" hash="0d5d06e7eb4439372bf90e2e41e998d7"/><dir name="Pear"><file name="Frontend.php" hash="d3d737fc569c67b177ccd0b6dcb5f22f"/><file name="Package.php" hash="8468373495be75543f7c853f94177d0b"/><file name="Registry.php" hash="5c38bf2cdb4108267acdcb23bb3dd93d"/></dir><file name="Pear.php" hash="7d068de3a3989c8575521c143261fe40"/><file name="Profiler.php" hash="d434c08a6dd3ef8eb168e3a3d46f057f"/><dir name="Simplexml"><dir name="Config"><dir name="Cache"><file name="Abstract.php" hash="6dbbd6f1bc63c1b7ee086399da30f4e0"/><file name="File.php" hash="f99292ec6d04d5464a1313a2c52880d4"/></dir></dir><file name="Config.php" hash="a957b7feccdf430239af81610a6ac281"/><file name="Element.php" hash="f8321180f2b343080ffd89591943b239"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Lib_ZF</name><channel>community</channel><min>1.11.1.0</min><max>1.12.0.0</max></package><extension><name>PDO</name><min></min><max></max></extension><extension><name>SPL</name><min></min><max></max></extension><extension><name>curl</name><min></min><max></max></extension><extension><name>SimpleXML</name><min></min><max></max></extension><extension><name>dom</name><min></min><max></max></extension><extension><name>gd</name><min></min><max></max></extension><extension><name>iconv</name><min></min><max></max></extension><extension><name>pdo_mysql</name><min></min><max></max></extension><extension><name>mcrypt</name><min></min><max></max></extension><extension><name>pcre</name><min></min><max></max></extension><extension><name>Reflection</name><min></min><max></max></extension><extension><name>session</name><min></min><max></max></extension></required></dependencies>
18
  </package>