Lib_Varien - Version 1.7.0.0

Version Notes

1.7.0.0

Download this release

Release Info

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


Code changes from version 1.6.1.0 to 1.7.0.0

lib/Varien/Autoload.php CHANGED
@@ -84,7 +84,7 @@ class Varien_Autoload
84
$this->_arrLoadedClasses[self::$_scope][] = $class;
85
}
86
if ($this->_isIncludePathDefined) {
87
- $classFile = $class;
88
} else {
89
$classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class)));
90
}
@@ -104,7 +104,7 @@ class Varien_Autoload
104
{
105
self::$_scope = $code;
106
if (defined('COMPILER_INCLUDE_PATH')) {
107
- @include_once self::SCOPE_FILE_PREFIX.$code.'.php';
108
}
109
}
110
84
$this->_arrLoadedClasses[self::$_scope][] = $class;
85
}
86
if ($this->_isIncludePathDefined) {
87
+ $classFile = COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . $class;
88
} else {
89
$classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class)));
90
}
104
{
105
self::$_scope = $code;
106
if (defined('COMPILER_INCLUDE_PATH')) {
107
+ @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php';
108
}
109
}
110
lib/Varien/Convert/Adapter/Http/Curl.php CHANGED
@@ -54,6 +54,8 @@ class Varien_Convert_Adapter_Http_Curl extends Varien_Convert_Adapter_Abstract
54
// read the remote file
55
$data = $http->read();
56
57
$data = preg_split('/^\r?#x2F;m', $data, 2);
58
$data = trim($data[1]);
59
54
// read the remote file
55
$data = $http->read();
56
57
+ $http->close();
58
+
59
$data = preg_split('/^\r?#x2F;m', $data, 2);
60
$data = trim($data[1]);
61
lib/Varien/Convert/Parser/Xml/Excel.php CHANGED
@@ -214,6 +214,8 @@ class Varien_Convert_Parser_Xml_Excel extends Varien_Convert_Parser_Abstract
214
$dataType = "String";
215
if (is_numeric($value)) {
216
$dataType = "Number";
217
}
218
$value = str_replace("\r\n", '
', $value);
219
$value = str_replace("\r", '
', $value);
@@ -225,4 +227,4 @@ class Varien_Convert_Parser_Xml_Excel extends Varien_Convert_Parser_Abstract
225
226
return join('', $xmlData);
227
}
228
- }
214
$dataType = "String";
215
if (is_numeric($value)) {
216
$dataType = "Number";
217
+ // is_numeric(' 96000') returns true, but Excel argues about space
218
+ $value = trim($value);
219
}
220
$value = str_replace("\r\n", '
', $value);
221
$value = str_replace("\r", '
', $value);
227
228
return join('', $xmlData);
229
}
230
+ }
lib/Varien/Data/Collection.php CHANGED
@@ -145,7 +145,7 @@ class Varien_Data_Collection implements IteratorAggregate, Countable
145
* - 'foo' -- get the first filter with field name 'foo'
146
* - array('foo') -- get all filters with field name 'foo'
147
* - array('foo', 'bar') -- get all filters with field name 'foo' or 'bar'
148
- * - array() -- get all filters
149
*
150
* @param string|array $field
151
* @return Varien_Object|array|null
@@ -164,7 +164,7 @@ class Varien_Data_Collection implements IteratorAggregate, Countable
164
$result[] = $filter;
165
}
166
}
167
- return $result;
168
}
169
170
// get a first filter by specified name
@@ -374,11 +374,23 @@ class Varien_Data_Collection implements IteratorAggregate, Countable
374
}
375
$this->_items[$itemId] = $item;
376
} else {
377
- $this->_items[] = $item;
378
}
379
return $this;
380
}
381
382
/**
383
* Retrieve item id
384
*
145
* - 'foo' -- get the first filter with field name 'foo'
146
* - array('foo') -- get all filters with field name 'foo'
147
* - array('foo', 'bar') -- get all filters with field name 'foo' or 'bar'
148
+ * - array() -- get all filters
149
*
150
* @param string|array $field
151
* @return Varien_Object|array|null
164
$result[] = $filter;
165
}
166
}
167
+ return $result;
168
}
169
170
// get a first filter by specified name
374
}
375
$this->_items[$itemId] = $item;
376
} else {
377
+ $this->_addItem($item);
378
}
379
return $this;
380
}
381
382
+ /**
383
+ * Add item that has no id to collection
384
+ *
385
+ * @param Varien_Object $item
386
+ * @return Varien_Data_Collection
387
+ */
388
+ protected function _addItem($item)
389
+ {
390
+ $this->_items[] = $item;
391
+ return $this;
392
+ }
393
+
394
/**
395
* Retrieve item id
396
*
lib/Varien/Data/Collection/Db.php CHANGED
@@ -93,6 +93,13 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
93
*/
94
protected $_fetchStmt = null;
95
96
public function __construct($conn=null)
97
{
98
parent::__construct();
@@ -182,6 +189,7 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
182
183
$this->_conn = $conn;
184
$this->_select = $this->_conn->select();
185
return $this;
186
}
187
@@ -299,20 +307,19 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
299
*/
300
private function _setOrder($field, $direction, $unshift = false)
301
{
302
$field = (string)$this->_getMappedField($field);
303
$direction = (strtoupper($direction) == self::SORT_ORDER_ASC) ? self::SORT_ORDER_ASC : self::SORT_ORDER_DESC;
304
- // emulate associative unshift
305
if ($unshift) {
306
- $orders = array($field => new Zend_Db_Expr($field . ' ' . $direction));
307
- foreach ($this->_orders as $key => $expression) {
308
- if (!isset($orders[$key])) {
309
- $orders[$key] = $expression;
310
- }
311
}
312
$this->_orders = $orders;
313
- }
314
- else {
315
- $this->_orders[$field] = new Zend_Db_Expr($field . ' ' . $direction);
316
}
317
return $this;
318
}
@@ -366,42 +373,76 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
366
* Add field filter to collection
367
*
368
* @see self::_getConditionSql for $condition
369
- * @param string $field
370
- * @param null|string|array $condition
371
- * @return Mage_Eav_Model_Entity_Collection_Abstract
372
*/
373
- public function addFieldToFilter($field, $condition=null)
374
{
375
- $field = $this->_getMappedField($field);
376
- $this->_select->where($this->_getConditionSql($field, $condition), null, Varien_Db_Select::TYPE_CONDITION);
377
return $this;
378
}
379
380
/**
381
* Try to get mapped field name for filter to collection
382
*
383
- * @param string
384
- * @return string
385
*/
386
protected function _getMappedField($field)
387
{
388
- $mappedFiled = $field;
389
-
390
$mapper = $this->_getMapper();
391
392
if (isset($mapper['fields'][$field])) {
393
$mappedFiled = $mapper['fields'][$field];
394
}
395
396
return $mappedFiled;
397
}
398
399
protected function _getMapper()
400
{
401
if (isset($this->_map)) {
402
return $this->_map;
403
- }
404
- else {
405
return false;
406
}
407
}
@@ -454,12 +495,11 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
454
*/
455
protected function _renderOrders()
456
{
457
- $ordersInSelect = $this->_select->getPart(Zend_Db_Select::ORDER);
458
-
459
- foreach ($this->_orders as $orderExpr) {
460
- if (!in_array($orderExpr, $ordersInSelect)) {
461
- $this->_select->order($orderExpr);
462
- }
463
}
464
465
return $this;
@@ -482,7 +522,9 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
482
/**
483
* Set select distinct
484
*
485
- * @param bool $flag
486
*/
487
public function distinct($flag)
488
{
@@ -503,6 +545,9 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
503
/**
504
* Load data
505
*
506
* @return Varien_Data_Collection_Db
507
*/
508
public function load($printQuery = false, $logQuery = false)
@@ -541,7 +586,7 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
541
* Returns a collection item that corresponds to the fetched row
542
* and moves the internal data pointer ahead
543
*
544
- * return Varien_Object|bool
545
*/
546
public function fetchItem()
547
{
@@ -637,8 +682,10 @@ class Varien_Data_Collection_Db extends Varien_Data_Collection
637
/**
638
* Print and/or log query
639
*
640
- * @param boolean $printQuery
641
- * @param boolean $logQuery
642
* @return Varien_Data_Collection_Db
643
*/
644
public function printLogQuery($printQuery = false, $logQuery = false, $sql = null) {
93
*/
94
protected $_fetchStmt = null;
95
96
+ /**
97
+ * Whether orders are rendered
98
+ *
99
+ * @var bool
100
+ */
101
+ protected $_isOrdersRendered = false;
102
+
103
public function __construct($conn=null)
104
{
105
parent::__construct();
189
190
$this->_conn = $conn;
191
$this->_select = $this->_conn->select();
192
+ $this->_isOrdersRendered = false;
193
return $this;
194
}
195
307
*/
308
private function _setOrder($field, $direction, $unshift = false)
309
{
310
+ $this->_isOrdersRendered = false;
311
$field = (string)$this->_getMappedField($field);
312
$direction = (strtoupper($direction) == self::SORT_ORDER_ASC) ? self::SORT_ORDER_ASC : self::SORT_ORDER_DESC;
313
+
314
+ unset($this->_orders[$field]); // avoid ordering by the same field twice
315
if ($unshift) {
316
+ $orders = array($field => $direction);
317
+ foreach ($this->_orders as $key => $dir) {
318
+ $orders[$key] = $dir;
319
}
320
$this->_orders = $orders;
321
+ } else {
322
+ $this->_orders[$field] = $direction;
323
}
324
return $this;
325
}
373
* Add field filter to collection
374
*
375
* @see self::_getConditionSql for $condition
376
+ *
377
+ * @param string|array $field
378
+ * @param null|string|array $condition
379
+ *
380
+ * @return Mage_Eav_Model_Entity_Collection_Abstract
381
*/
382
+ public function addFieldToFilter($field, $condition = null)
383
{
384
+ if (!is_array($field)) {
385
+ $resultCondition = $this->_translateCondition($field, $condition);
386
+ } else {
387
+ $conditions = array();
388
+ foreach ($field as $key => $currField) {
389
+ $conditions[] = $this->_translateCondition(
390
+ $currField,
391
+ isset($condition[$key]) ? $condition[$key] : null
392
+ );
393
+ }
394
+
395
+ $resultCondition = '(' . join(') ' . Zend_Db_Select::SQL_OR . ' (', $conditions) . ')';
396
+ }
397
+
398
+ $this->_select->where($resultCondition);
399
+
400
return $this;
401
}
402
403
+ /**
404
+ * Build sql where condition part
405
+ *
406
+ * @param string|array $field
407
+ * @param null|string|array $condition
408
+ *
409
+ * @return string
410
+ */
411
+ protected function _translateCondition($field, $condition)
412
+ {
413
+ $field = $this->_getMappedField($field);
414
+ return $this->_getConditionSql($field, $condition);
415
+ }
416
+
417
/**
418
* Try to get mapped field name for filter to collection
419
*
420
+ * @param string $field
421
+ * @return string
422
*/
423
protected function _getMappedField($field)
424
{
425
$mapper = $this->_getMapper();
426
427
if (isset($mapper['fields'][$field])) {
428
$mappedFiled = $mapper['fields'][$field];
429
+ } else {
430
+ $mappedFiled = $field;
431
}
432
433
return $mappedFiled;
434
}
435
436
+ /**
437
+ * Retrieve mapper data
438
+ *
439
+ * @return array|bool|null
440
+ */
441
protected function _getMapper()
442
{
443
if (isset($this->_map)) {
444
return $this->_map;
445
+ } else {
446
return false;
447
}
448
}
495
*/
496
protected function _renderOrders()
497
{
498
+ if (!$this->_isOrdersRendered) {
499
+ foreach ($this->_orders as $field => $direction) {
500
+ $this->_select->order(new Zend_Db_Expr($field . ' ' . $direction));
501
+ }
502
+ $this->_isOrdersRendered = true;
503
}
504
505
return $this;
522
/**
523
* Set select distinct
524
*
525
+ * @param bool $flag
526
+ *
527
+ * @return Varien_Data_Collection_Db
528
*/
529
public function distinct($flag)
530
{
545
/**
546
* Load data
547
*
548
+ * @param bool $printQuery
549
+ * @param bool $logQuery
550
+ *
551
* @return Varien_Data_Collection_Db
552
*/
553
public function load($printQuery = false, $logQuery = false)
586
* Returns a collection item that corresponds to the fetched row
587
* and moves the internal data pointer ahead
588
*
589
+ * @return Varien_Object|bool
590
*/
591
public function fetchItem()
592
{
682
/**
683
* Print and/or log query
684
*
685
+ * @param bool $printQuery
686
+ * @param bool $logQuery
687
+ * @param string $sql
688
+ *
689
* @return Varien_Data_Collection_Db
690
*/
691
public function printLogQuery($printQuery = false, $logQuery = false, $sql = null) {
lib/Varien/Data/Collection/Filesystem.php CHANGED
@@ -511,7 +511,7 @@ class Varien_Data_Collection_Filesystem extends Varien_Data_Collection
511
return $this->addCallbackFilter($field, $cond['in'], $type, array($this, 'filterCallbackInArray'));
512
}
513
if (isset($cond['nin'])) {
514
- return $this->addCallbackFilter($field, $cond['nin'], $type, array($this, 'filterCallbackIn'), $inverted);
515
}
516
if (isset($cond['notnull'])) {
517
return $this->addCallbackFilter($field, $cond['notnull'], $type, array($this, 'filterCallbackIsNull'), $inverted);
511
return $this->addCallbackFilter($field, $cond['in'], $type, array($this, 'filterCallbackInArray'));
512
}
513
if (isset($cond['nin'])) {
514
+ return $this->addCallbackFilter($field, $cond['nin'], $type, array($this, 'filterCallbackInArray'), $inverted);
515
}
516
if (isset($cond['notnull'])) {
517
return $this->addCallbackFilter($field, $cond['notnull'], $type, array($this, 'filterCallbackIsNull'), $inverted);
lib/Varien/Data/Form/Abstract.php CHANGED
@@ -110,10 +110,12 @@ class Varien_Data_Form_Abstract extends Varien_Object
110
/**
111
* Add form element
112
*
113
- * @param Varien_Data_Form_Element_Abstract $element
114
- * @return Varien_Data_Form
115
*/
116
- public function addElement(Varien_Data_Form_Element_Abstract $element, $after=null)
117
{
118
$element->setForm($this);
119
$this->getElements()->add($element, $after);
@@ -163,11 +165,12 @@ class Varien_Data_Form_Abstract extends Varien_Object
163
* Enter description here...
164
*
165
* @param string $elementId
166
- * @param unknown_type $config
167
- * @param unknown_type $after
168
* @return Varien_Data_Form_Element_Fieldset
169
*/
170
- public function addFieldset($elementId, $config, $after=false)
171
{
172
$element = new Varien_Data_Form_Element_Fieldset($config);
173
$element->setId($elementId);
110
/**
111
* Add form element
112
*
113
+ * @param Varien_Data_Form_Element_Abstract $element
114
+ * @param bool|string|null $after
115
+ *
116
+ * @return Varien_Data_Form
117
*/
118
+ public function addElement(Varien_Data_Form_Element_Abstract $element, $after = null)
119
{
120
$element->setForm($this);
121
$this->getElements()->add($element, $after);
165
* Enter description here...
166
*
167
* @param string $elementId
168
+ * @param array $config
169
+ * @param bool|string|null $after
170
+ *
171
* @return Varien_Data_Form_Element_Fieldset
172
*/
173
+ public function addFieldset($elementId, $config, $after = false)
174
{
175
$element = new Varien_Data_Form_Element_Fieldset($config);
176
$element->setId($elementId);
lib/Varien/Data/Form/Element/Abstract.php CHANGED
@@ -30,7 +30,7 @@
30
*
31
* @category Varien
32
* @package Varien_Data
33
- * @author Magento Core Team <core@magentocommerce.com>
34
*/
35
abstract class Varien_Data_Form_Element_Abstract extends Varien_Data_Form_Abstract
36
{
@@ -185,13 +185,18 @@ abstract class Varien_Data_Form_Element_Abstract extends Varien_Data_Form_Abstra
185
return $this->getData('after_element_html');
186
}
187
188
public function getLabelHtml($idSuffix = '')
189
{
190
if (!is_null($this->getLabel())) {
191
- $html = '<label for="'.$this->getHtmlId() . $idSuffix . '">'.$this->getLabel()
192
- . ( $this->getRequired() ? ' <span class="required">*</span>' : '' ).'</label>'."\n";
193
- }
194
- else {
195
$html = '';
196
}
197
return $html;
30
*
31
* @category Varien
32
* @package Varien_Data
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
*/
35
abstract class Varien_Data_Form_Element_Abstract extends Varien_Data_Form_Abstract
36
{
185
return $this->getData('after_element_html');
186
}
187
188
+ /**
189
+ * Render HTML for element's label
190
+ *
191
+ * @param string $idSuffix
192
+ * @return string
193
+ */
194
public function getLabelHtml($idSuffix = '')
195
{
196
if (!is_null($this->getLabel())) {
197
+ $html = '<label for="'.$this->getHtmlId() . $idSuffix . '">' . $this->_escape($this->getLabel())
198
+ . ( $this->getRequired() ? ' <span class="required">*</span>' : '' ) . '</label>' . "\n";
199
+ } else {
200
$html = '';
201
}
202
return $html;
lib/Varien/Data/Form/Element/Collection.php CHANGED
@@ -116,10 +116,11 @@ class Varien_Data_Form_Element_Collection implements ArrayAccess, IteratorAggreg
116
*
117
* @todo get it straight with $after
118
* @param Varien_Data_Form_Element_Abstract $element
119
- * @param boolean|'^'|string $after
120
- * @return Varien_Data_Form_Element_Abstract
121
*/
122
- public function add(Varien_Data_Form_Element_Abstract $element, $after=false)
123
{
124
// Set the Form for the node
125
if ($this->_container->getForm() instanceof Varien_Data_Form) {
116
*
117
* @todo get it straight with $after
118
* @param Varien_Data_Form_Element_Abstract $element
119
+ * @param bool|string $after
120
+ *
121
+ * @return Varien_Data_Form_Element_Collection
122
*/
123
+ public function add(Varien_Data_Form_Element_Abstract $element, $after = false)
124
{
125
// Set the Form for the node
126
if ($this->_container->getForm() instanceof Varien_Data_Form) {
lib/Varien/Data/Form/Element/Editor.php CHANGED
@@ -308,7 +308,7 @@ class Varien_Data_Form_Element_Editor extends Varien_Data_Form_Element_Textarea
308
$html.= isset($data['style']) ? ' style="'.$data['style'].'"' : '';
309
$html.= isset($data['id']) ? ' id="'.$data['id'].'"' : '';
310
$html.= '>';
311
- $html.= isset($data['title']) ? '<span>'.$data['title'].'</span>' : '';
312
$html.= '</button>';
313
314
return $html;
308
$html.= isset($data['style']) ? ' style="'.$data['style'].'"' : '';
309
$html.= isset($data['id']) ? ' id="'.$data['id'].'"' : '';
310
$html.= '>';
311
+ $html.= isset($data['title']) ? '<span><span><span>'.$data['title'].'</span></span></span>' : '';
312
$html.= '</button>';
313
314
return $html;
lib/Varien/Data/Form/Element/Image.php CHANGED
@@ -24,19 +24,17 @@
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
27
-
28
/**
29
* Category form input image element
30
*
31
* @category Varien
32
* @package Varien_Data
33
- * @author Magento Core Team <core@magentocommerce.com>
34
*/
35
class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
36
{
37
-
38
/**
39
- * Enter description here...
40
*
41
* @param array $data
42
*/
@@ -47,7 +45,7 @@ class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
47
}
48
49
/**
50
- * Enter description here...
51
*
52
* @return string
53
*/
@@ -55,24 +53,28 @@ class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
55
{
56
$html = '';
57
58
- if ($this->getValue()) {
59
$url = $this->_getUrl();
60
61
if( !preg_match("/^http\:\/\/|https\:\/\//", $url) ) {
62
$url = Mage::getBaseUrl('media') . $url;
63
}
64
65
- $html = '<a href="'.$url.'" onclick="imagePreview(\''.$this->getHtmlId().'_image\'); return false;"><img src="'.$url.'" id="'.$this->getHtmlId().'_image" title="'.$this->getValue().'" alt="'.$this->getValue().'" height="22" width="22" class="small-image-preview v-middle" /></a> ';
66
}
67
$this->setClass('input-file');
68
- $html.= parent::getElementHtml();
69
- $html.= $this->_getDeleteCheckbox();
70
71
return $html;
72
}
73
74
/**
75
- * Enter description here...
76
*
77
* @return string
78
*/
@@ -82,8 +84,12 @@ class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
82
if ($this->getValue()) {
83
$label = Mage::helper('core')->__('Delete Image');
84
$html .= '<span class="delete-image">';
85
- $html .= '<input type="checkbox" name="'.parent::getName().'[delete]" value="1" class="checkbox" id="'.$this->getHtmlId().'_delete"'.($this->getDisabled() ? ' disabled="disabled"': '').'/>';
86
- $html .= '<label for="'.$this->getHtmlId().'_delete"'.($this->getDisabled() ? ' class="disabled"' : '').'> '.$label.'</label>';
87
$html .= $this->_getHiddenInput();
88
$html .= '</span>';
89
}
@@ -92,13 +98,13 @@ class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
92
}
93
94
/**
95
- * Enter description here...
96
*
97
* @return string
98
*/
99
protected function _getHiddenInput()
100
{
101
- return '<input type="hidden" name="'.parent::getName().'[value]" value="'.$this->getValue().'" />';
102
}
103
104
/**
@@ -112,7 +118,7 @@ class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
112
}
113
114
/**
115
- * Enter description here...
116
*
117
* @return string
118
*/
@@ -120,5 +126,4 @@ class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
120
{
121
return $this->getData('name');
122
}
123
-
124
}
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
27
/**
28
* Category form input image element
29
*
30
* @category Varien
31
* @package Varien_Data
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
*/
34
class Varien_Data_Form_Element_Image extends Varien_Data_Form_Element_Abstract
35
{
36
/**
37
+ * Constructor
38
*
39
* @param array $data
40
*/
45
}
46
47
/**
48
+ * Return element html code
49
*
50
* @return string
51
*/
53
{
54
$html = '';
55
56
+ if ((string)$this->getValue()) {
57
$url = $this->_getUrl();
58
59
if( !preg_match("/^http\:\/\/|https\:\/\//", $url) ) {
60
$url = Mage::getBaseUrl('media') . $url;
61
}
62
63
+ $html = '<a href="' . $url . '"'
64
+ . ' onclick="imagePreview(\'' . $this->getHtmlId() . '_image\'); return false;">'
65
+ . '<img src="' . $url . '" id="' . $this->getHtmlId() . '_image" title="' . $this->getValue() . '"'
66
+ . ' alt="' . $this->getValue() . '" height="22" width="22" class="small-image-preview v-middle" />'
67
+ . '</a> ';
68
}
69
$this->setClass('input-file');
70
+ $html .= parent::getElementHtml();
71
+ $html .= $this->_getDeleteCheckbox();
72
73
return $html;
74
}
75
76
/**
77
+ * Return html code of delete checkbox element
78
*
79
* @return string
80
*/
84
if ($this->getValue()) {
85
$label = Mage::helper('core')->__('Delete Image');
86
$html .= '<span class="delete-image">';
87
+ $html .= '<input type="checkbox"'
88
+ . ' name="' . parent::getName() . '[delete]" value="1" class="checkbox"'
89
+ . ' id="' . $this->getHtmlId() . '_delete"' . ($this->getDisabled() ? ' disabled="disabled"': '')
90
+ . '/>';
91
+ $html .= '<label for="' . $this->getHtmlId() . '_delete"'
92
+ . ($this->getDisabled() ? ' class="disabled"' : '') . '> ' . $label . '</label>';
93
$html .= $this->_getHiddenInput();
94
$html .= '</span>';
95
}
98
}
99
100
/**
101
+ * Return html code of hidden element
102
*
103
* @return string
104
*/
105
protected function _getHiddenInput()
106
{
107
+ return '<input type="hidden" name="' . parent::getName() . '[value]" value="' . $this->getValue() . '" />';
108
}
109
110
/**
118
}
119
120
/**
121
+ * Return name
122
*
123
* @return string
124
*/
126
{
127
return $this->getData('name');
128
}
129
}
lib/Varien/Data/Form/Element/Label.php CHANGED
@@ -33,19 +33,28 @@
33
*/
34
class Varien_Data_Form_Element_Label extends Varien_Data_Form_Element_Abstract
35
{
36
- public function __construct($attributes=array())
37
{
38
parent::__construct($attributes);
39
$this->setType('label');
40
}
41
42
public function getElementHtml()
43
{
44
- $html = $this->getBold() ? '<strong>' : '';
45
- $html.= $this->getEscapedValue();
46
- $html.= $this->getBold() ? '</strong>' : '';
47
- $html.= $this->getAfterElementHtml();
48
- return $html;
49
}
50
-
51
- }
33
*/
34
class Varien_Data_Form_Element_Label extends Varien_Data_Form_Element_Abstract
35
{
36
+ /**
37
+ * Assigns attributes for Element
38
+ *
39
+ * @param array $attributes
40
+ */
41
+ public function __construct($attributes=array())
42
{
43
parent::__construct($attributes);
44
$this->setType('label');
45
}
46
47
+ /**
48
+ * Retrieve Element HTML
49
+ *
50
+ * @return string
51
+ */
52
public function getElementHtml()
53
{
54
+ $html = $this->getBold() ? '<strong>' : '';
55
+ $html.= $this->getEscapedValue();
56
+ $html.= $this->getBold() ? '</strong>' : '';
57
+ $html.= $this->getAfterElementHtml();
58
+ return $html;
59
}
60
+ }
lib/Varien/Date.php CHANGED
@@ -61,7 +61,7 @@ class Varien_Date
61
'dd' => '%d',
62
'd' => '%e',
63
'yyyy' => '%Y',
64
- 'yy' => '%y',
65
'y' => '%Y'
66
);
67
/**
61
'dd' => '%d',
62
'd' => '%e',
63
'yyyy' => '%Y',
64
+ 'yy' => '%Y',
65
'y' => '%Y'
66
);
67
/**
lib/Varien/Db/Adapter/Interface.php CHANGED
@@ -58,6 +58,11 @@ interface Varien_Db_Adapter_Interface
58
const INTERVAL_MONTH = 'MONTHS';
59
const INTERVAL_YEAR = 'YEARS';
60
61
/**
62
* Begin new DB transaction for connection
63
*
@@ -821,6 +826,24 @@ interface Varien_Db_Adapter_Interface
821
*/
822
public function getDatePartSql($date);
823
824
/**
825
* Extract part of a date
826
*
@@ -974,4 +997,11 @@ interface Varien_Db_Adapter_Interface
974
* @return string
975
*/
976
public function getSuggestedZeroDate();
977
}
58
const INTERVAL_MONTH = 'MONTHS';
59
const INTERVAL_YEAR = 'YEARS';
60
61
+ /**
62
+ * Error message for DDL query in transactions
63
+ */
64
+ const ERROR_DDL_MESSAGE = 'DDL statements are not allowed in transactions';
65
+
66
/**
67
* Begin new DB transaction for connection
68
*
826
*/
827
public function getDatePartSql($date);
828
829
+ /**
830
+ * Prepare substring sql function
831
+ *
832
+ * @param Zend_Db_Expr|string $stringExpression quoted field name or SQL statement
833
+ * @param int|string|Zend_Db_Expr $pos
834
+ * @param int|string|Zend_Db_Expr|null $len
835
+ * @return Zend_Db_Expr
836
+ */
837
+ public function getSubstringSql($stringExpression, $pos, $len = null);
838
+
839
+ /**
840
+ * Prepare standard deviation sql function
841
+ *
842
+ * @param Zend_Db_Expr|string $expressionField quoted field name or SQL statement
843
+ * @return Zend_Db_Expr
844
+ */
845
+ public function getStandardDeviationSql($expressionField);
846
+
847
/**
848
* Extract part of a date
849
*
997
* @return string
998
*/
999
public function getSuggestedZeroDate();
1000
+
1001
+ /**
1002
+ * Get adapter transaction level state. Return 0 if all transactions are complete
1003
+ *
1004
+ * @return int
1005
+ */
1006
+ public function getTransactionLevel();
1007
}
lib/Varien/Db/Adapter/Pdo/Mysql.php CHANGED
@@ -48,6 +48,11 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
48
const LENGTH_INDEX_NAME = 64;
49
const LENGTH_FOREIGN_NAME = 64;
50
51
/**
52
* Default class name for a DB statement.
53
*
@@ -173,6 +178,14 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
173
Varien_Db_Ddl_Table::TYPE_VARBINARY => 'blob'
174
);
175
176
/**
177
* Allowed interval units array
178
*
@@ -372,6 +385,22 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
372
}
373
}
374
375
/**
376
* Special handling for PDO query().
377
* All bind parameter names must begin with ':'.
@@ -385,6 +414,7 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
385
{
386
$this->_debugTimer();
387
try {
388
$this->_prepareQuery($sql, $bind);
389
$result = parent::query($sql, $bind);
390
} catch (Exception $e) {
@@ -425,21 +455,6 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
425
}
426
}
427
428
- if (strpos($sql, ':') !== false || strpos($sql, '?') !== false) {
429
- $before = count($bind);
430
- $this->_bindParams = $bind; // Used by callback
431
- $sql = preg_replace_callback('#(([\'"])((\\2)|((.*?[^\\\\])\\2)))#',
432
- array($this, 'proccessBindCallback'),
433
- $sql);
434
- Varien_Exception::processPcreError();
435
- $bind = $this->_bindParams;
436
-
437
- // If _processBindCallbacks() has added named entries to positional bind - normalize it to positional
438
- if (!$isNamedBind && $before && (count($bind) != $before)) {
439
- $this->_convertMixedBind($sql, $bind);
440
- }
441
- }
442
-
443
// Special query hook
444
if ($this->_queryHook) {
445
$object = $this->_queryHook['object'];
@@ -611,7 +626,9 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
611
*/
612
protected function _splitMultiQuery($sql)
613
{
614
- $parts = preg_split('#(;|\'|"|\\\\|//|--|\n|/\*|\*/)#', $sql, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
615
616
$q = false;
617
$c = false;
@@ -878,7 +895,11 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
878
$schemaName = null)
879
{
880
if (!$this->tableColumnExists($tableName, $oldColumnName, $schemaName)) {
881
- throw new Zend_Db_Exception(sprintf('Column "%s" does not exists on table "%s"', $oldColumnName, $tableName));
882
}
883
884
if (is_array($definition)) {
@@ -2753,9 +2774,13 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2753
switch ($column['DATA_TYPE']) {
2754
case 'smallint':
2755
case 'int':
2756
- case 'bigint':
2757
$value = (int)$value;
2758
break;
2759
2760
case 'decimal':
2761
$precision = 10;
@@ -2995,6 +3020,33 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
2995
return new Zend_Db_Expr(sprintf('DATE(%s)', $date));
2996
}
2997
2998
/**
2999
* Extract part of a date
3000
*
@@ -3583,4 +3635,14 @@ class Varien_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Mysql implements V
3583
3584
return $fkName;
3585
}
3586
}
48
const LENGTH_INDEX_NAME = 64;
49
const LENGTH_FOREIGN_NAME = 64;
50
51
+ /**
52
+ * MEMORY engine type for MySQL tables
53
+ */
54
+ const ENGINE_MEMORY = 'MEMORY';
55
+
56
/**
57
* Default class name for a DB statement.
58
*
178
Varien_Db_Ddl_Table::TYPE_VARBINARY => 'blob'
179
);
180
181
+ /**
182
+ * All possible DDL statements
183
+ * First 3 symbols for each statement
184
+ *
185
+ * @var array
186
+ */
187
+ protected $_ddlRoutines = array('alt', 'cre', 'ren', 'dro', 'tru');
188
+
189
/**
190
* Allowed interval units array
191
*
385
}
386
}
387
388
+ /**
389
+ * Check transaction level in case of DDL query
390
+ *
391
+ * @param string|Zend_Db_Select $sql
392
+ * @throws Zend_Db_Adapter_Exception
393
+ */
394
+ protected function _checkDdlTransaction($sql)
395
+ {
396
+ if (is_string($sql) && $this->getTransactionLevel() > 0) {
397
+ $startSql = strtolower(substr(ltrim($sql), 0, 3));
398
+ if (in_array($startSql, $this->_ddlRoutines)) {
399
+ trigger_error(Varien_Db_Adapter_Interface::ERROR_DDL_MESSAGE, E_USER_ERROR);
400
+ }
401
+ }
402
+ }
403
+
404
/**
405
* Special handling for PDO query().
406
* All bind parameter names must begin with ':'.
414
{
415
$this->_debugTimer();
416
try {
417
+ $this->_checkDdlTransaction($sql);
418
$this->_prepareQuery($sql, $bind);
419
$result = parent::query($sql, $bind);
420
} catch (Exception $e) {
455
}
456
}
457
458
// Special query hook
459
if ($this->_queryHook) {
460
$object = $this->_queryHook['object'];
626
*/
627
protected function _splitMultiQuery($sql)
628
{
629
+ $parts = preg_split('#(;|\'|"|\\\\|//|--|\n|/\*|\*/)#', $sql, null,
630
+ PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
631
+ );
632
633
$q = false;
634
$c = false;
895
$schemaName = null)
896
{
897
if (!$this->tableColumnExists($tableName, $oldColumnName, $schemaName)) {
898
+ throw new Zend_Db_Exception(sprintf(
899
+ 'Column "%s" does not exists on table "%s"',
900
+ $oldColumnName,
901
+ $tableName
902
+ ));
903
}
904
905
if (is_array($definition)) {
2774
switch ($column['DATA_TYPE']) {
2775
case 'smallint':
2776
case 'int':
2777
$value = (int)$value;
2778
break;
2779
+ case 'bigint':
2780
+ if (!is_integer($value)) {
2781
+ $value = sprintf('%.0f', (float)$value);
2782
+ }
2783
+ break;
2784
2785
case 'decimal':
2786
$precision = 10;
3020
return new Zend_Db_Expr(sprintf('DATE(%s)', $date));
3021
}
3022
3023
+ /**
3024
+ * Prepare substring sql function
3025
+ *
3026
+ * @param Zend_Db_Expr|string $stringExpression quoted field name or SQL statement
3027
+ * @param int|string|Zend_Db_Expr $pos
3028
+ * @param int|string|Zend_Db_Expr|null $len
3029
+ * @return Zend_Db_Expr
3030
+ */
3031
+ public function getSubstringSql($stringExpression, $pos, $len = null)
3032
+ {
3033
+ if (is_null($len)) {
3034
+ return new Zend_Db_Expr(sprintf('SUBSTRING(%s, %s)', $stringExpression, $pos));
3035
+ }
3036
+ return new Zend_Db_Expr(sprintf('SUBSTRING(%s, %s, %s)', $stringExpression, $pos, $len));
3037
+ }
3038
+
3039
+ /**
3040
+ * Prepare standard deviation sql function
3041
+ *
3042
+ * @param Zend_Db_Expr|string $expressionField quoted field name or SQL statement
3043
+ * @return Zend_Db_Expr
3044
+ */
3045
+ public function getStandardDeviationSql($expressionField)
3046
+ {
3047
+ return new Zend_Db_Expr(sprintf('STDDEV_SAMP(%s)', $expressionField));
3048
+ }
3049
+
3050
/**
3051
* Extract part of a date
3052
*
3635
3636
return $fkName;
3637
}
3638
+
3639
+ /**
3640
+ * Check if all transactions have been committed
3641
+ */
3642
+ public function __destruct()
3643
+ {
3644
+ if ($this->_transactionLevel > 0) {
3645
+ trigger_error('Some transactions have not been committed or rolled back', E_USER_ERROR);
3646
+ }
3647
+ }
3648
}
lib/Varien/Db/Select.php CHANGED
@@ -29,14 +29,14 @@
29
*
30
* @method Varien_Db_Adapter_Interface|Zend_Db_Adapter_Abstract getAdapter()
31
* @property Varien_Db_Adapter_Interface|Zend_Db_Adapter_Abstract $_adapter
32
- * @method Varien_Db_Select from($name, $cols, $schema = null)
33
- * @method Varien_Db_Select join($name, $cond, $cols, $schema = null)
34
- * @method Varien_Db_Select joinInner($name, $cond, $cols, $schema = null)
35
* @method Varien_Db_Select joinLeft($name, $cond, $cols = '*', $schema = null)
36
- * @method Varien_Db_Select joinNatural($name, $cond, $cols, $schema = null)
37
- * @method Varien_Db_Select joinFull($name, $cond, $cols, $schema = null)
38
- * @method Varien_Db_Select joinRight($name, $cond, $cols, $schema = null)
39
- * @method Varien_Db_Select joinCross($name, $cols, $schema = null)
40
* @method Varien_Db_Select orWhere($cond, $value = null, $type = null)
41
* @method Varien_Db_Select group($spec)
42
* @method Varien_Db_Select order($spec)
@@ -44,7 +44,7 @@
44
* @method Varien_Db_Select forUpdate($flag = true)
45
* @method Varien_Db_Select distinct($flag = true)
46
* @method Varien_Db_Select reset($part = null)
47
- * @method Varien_Db_Select columns($cols, $correlationName = null)
48
*
49
* @category Varien
50
* @package Varien_Db
29
*
30
* @method Varien_Db_Adapter_Interface|Zend_Db_Adapter_Abstract getAdapter()
31
* @property Varien_Db_Adapter_Interface|Zend_Db_Adapter_Abstract $_adapter
32
+ * @method Varien_Db_Select from($name, $cols = '*', $schema = null)
33
+ * @method Varien_Db_Select join($name, $cond, $cols = '*', $schema = null)
34
+ * @method Varien_Db_Select joinInner($name, $cond, $cols = '*', $schema = null)
35
* @method Varien_Db_Select joinLeft($name, $cond, $cols = '*', $schema = null)
36
+ * @method Varien_Db_Select joinNatural($name, $cond, $cols = '*', $schema = null)
37
+ * @method Varien_Db_Select joinFull($name, $cond, $cols = '*', $schema = null)
38
+ * @method Varien_Db_Select joinRight($name, $cond, $cols = '*', $schema = null)
39
+ * @method Varien_Db_Select joinCross($name, $cols = '*', $schema = null)
40
* @method Varien_Db_Select orWhere($cond, $value = null, $type = null)
41
* @method Varien_Db_Select group($spec)
42
* @method Varien_Db_Select order($spec)
44
* @method Varien_Db_Select forUpdate($flag = true)
45
* @method Varien_Db_Select distinct($flag = true)
46
* @method Varien_Db_Select reset($part = null)
47
+ * @method Varien_Db_Select columns($cols = '*', $correlationName = null)
48
*
49
* @category Varien
50
* @package Varien_Db
lib/Varien/Directory/Collection.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Directory
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
@@ -458,4 +458,4 @@ class Varien_Directory_Collection extends Varien_Data_Collection implements IFac
458
459
460
461
- ?>
20
*
21
* @category Varien
22
* @package Varien_Directory
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
458
459
460
461
+ ?>
lib/Varien/Directory/Factory.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Directory
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
@@ -55,4 +55,4 @@ class Varien_Directory_Factory{
55
}
56
57
}
58
- ?>
20
*
21
* @category Varien
22
* @package Varien_Directory
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
55
}
56
57
}
58
+ ?>
lib/Varien/Directory/IFactory.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Directory
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
20
*
21
* @category Varien
22
* @package Varien_Directory
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
lib/Varien/File/Object.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_File
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
@@ -62,7 +62,7 @@ class Varien_File_Object extends SplFileObject implements IFactory {
62
*/
63
public function getFilesName(&$files)
64
{
65
- $this->getFileName(&$files);
66
}
67
/**
68
* add file name to array
@@ -189,15 +189,12 @@ class Varien_File_Object extends SplFileObject implements IFactory {
189
*/
190
static public function getExt($fileName)
191
{
192
- if($fileName === ''){
193
- $path_parts = pathinfo($this->_filename);
194
} else {
195
- $path_parts = pathinfo($fileName);
196
}
197
- if(isset($path_parts["extension"]))
198
- return $path_parts["extension"];
199
- else
200
- return '';
201
}
202
/**
203
* get name of file
20
*
21
* @category Varien
22
* @package Varien_File
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
62
*/
63
public function getFilesName(&$files)
64
{
65
+ $this->getFileName($files);
66
}
67
/**
68
* add file name to array
189
*/
190
static public function getExt($fileName)
191
{
192
+ $path_parts = pathinfo($fileName);
193
+ if(isset($path_parts["extension"])) {
194
+ return $path_parts["extension"];
195
} else {
196
+ return '';
197
}
198
}
199
/**
200
* get name of file
lib/Varien/File/Uploader.php CHANGED
@@ -147,7 +147,7 @@ class Varien_File_Uploader
147
function __construct($fileId)
148
{
149
$this->_setUploadFileId($fileId);
150
- if( !file_exists($this->_file['tmp_name']) ) {
151
$code = empty($this->_file['tmp_name']) ? self::TMP_NAME_EMPTY : 0;
152
throw new Exception('File was not uploaded.', $code);
153
} else {
@@ -245,26 +245,32 @@ class Varien_File_Uploader
245
*/
246
protected function _validateFile()
247
{
248
- if( $this->_fileExists === false ) {
249
return;
250
}
251
252
- $filePath = $this->_file['tmp_name'];
253
- $fileName = $this->_file['name'];
254
-
255
//is file extension allowed
256
- $fileExtension = substr($fileName, strrpos($fileName, '.')+1);
257
- if (!$this->checkAllowedExtension($fileExtension)) {
258
throw new Exception('Disallowed file type.');
259
}
260
//run validate callbacks
261
foreach ($this->_validateCallbacks as $params) {
262
if (is_object($params['object']) && method_exists($params['object'], $params['method'])) {
263
- $params['object']->$params['method']($filePath);
264
}
265
}
266
}
267
268
/**
269
* Add validation callback model for us in self::_validateFile()
270
*
147
function __construct($fileId)
148
{
149
$this->_setUploadFileId($fileId);
150
+ if(!file_exists($this->_file['tmp_name'])) {
151
$code = empty($this->_file['tmp_name']) ? self::TMP_NAME_EMPTY : 0;
152
throw new Exception('File was not uploaded.', $code);
153
} else {
245
*/
246
protected function _validateFile()
247
{
248
+ if ($this->_fileExists === false) {
249
return;
250
}
251
252
//is file extension allowed
253
+ if (!$this->checkAllowedExtension($this->getFileExtension())) {
254
throw new Exception('Disallowed file type.');
255
}
256
//run validate callbacks
257
foreach ($this->_validateCallbacks as $params) {
258
if (is_object($params['object']) && method_exists($params['object'], $params['method'])) {
259
+ $params['object']->$params['method']($this->_file['tmp_name']);
260
}
261
}
262
}
263
264
+ /**
265
+ * Returns extension of the uploaded file
266
+ *
267
+ * @return string
268
+ */
269
+ public function getFileExtension()
270
+ {
271
+ return $this->_fileExists ? pathinfo($this->_file['name'], PATHINFO_EXTENSION) : '';
272
+ }
273
+
274
/**
275
* Add validation callback model for us in self::_validateFile()
276
*
lib/Varien/Http/Adapter/Curl.php CHANGED
@@ -27,8 +27,8 @@
27
/**
28
* HTTP CURL Adapter
29
*
30
- * @category Varien
31
- * @package Varien_Http
32
* @author Magento Core Team <core@magentocommerce.com>
33
*/
34
class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
@@ -40,27 +40,85 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
40
*/
41
protected $_config = array();
42
43
protected $_resource;
44
45
/**
46
* Apply current configuration array to transport resource
47
*/
48
protected function _applyConfig()
49
{
50
- //curl_setopt();
51
- if (isset($this->_config['timeout'])) {
52
- curl_setopt($this->_getResource(), CURLOPT_TIMEOUT, $this->_config['timeout']);
53
}
54
- if (isset($this->_config['maxredirects'])) {
55
- curl_setopt($this->_getResource(), CURLOPT_MAXREDIRS, $this->_config['maxredirects']);
56
- }
57
- if (isset($this->_config['proxy'])) {
58
- curl_setopt ($this->_getResource(), CURLOPT_PROXY, $this->_config['proxy']);
59
}
60
- if (isset($this->_config['ssl_cert'])) {
61
- curl_setopt($this->_getResource(), CURLOPT_SSLCERT, $this->_config['ssl_cert']);
62
}
63
64
return $this;
65
}
66
@@ -68,6 +126,7 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
68
* Set the configuration array for the adapter
69
*
70
* @param array $config
71
*/
72
public function setConfig($config = array())
73
{
@@ -78,25 +137,15 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
78
/**
79
* Connect to the remote server
80
*
81
* @param string $host
82
* @param int $port
83
* @param boolean $secure
84
- * @deprecated since 1.4.0.0-rc1
85
*/
86
public function connect($host, $port = 80, $secure = false)
87
{
88
- //curl_setopt();
89
- if (isset($this->_config['timeout'])) {
90
- curl_setopt($this->_getResource(), CURLOPT_TIMEOUT, $this->_config['timeout']);
91
- }
92
- if (isset($this->_config['maxredirects'])) {
93
- curl_setopt($this->_getResource(), CURLOPT_MAXREDIRS, $this->_config['maxredirects']);
94
- }
95
- if (isset($this->_config['proxy'])) {
96
- curl_setopt ($this->_getResource(), CURLOPT_PROXY, $this->_config['proxy']);
97
- }
98
-
99
- return $this;
100
}
101
102
/**
@@ -127,14 +176,15 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
127
curl_setopt($this->_getResource(), CURLOPT_HTTPGET, true);
128
}
129
130
- if( is_array($headers) ) {
131
curl_setopt($this->_getResource(), CURLOPT_HTTPHEADER, $headers);
132
}
133
134
- curl_setopt($this->_getResource(), CURLOPT_HEADER, true);
135
- curl_setopt($this->_getResource(), CURLOPT_SSL_VERIFYPEER, 0);
136
- curl_setopt($this->_getResource(), CURLOPT_SSL_VERIFYHOST, 0);
137
-
138
139
return $body;
140
}
@@ -149,8 +199,7 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
149
$response = curl_exec($this->_getResource());
150
151
// Remove 100 and 101 responses headers
152
- if (Zend_Http_Response::extractCode($response) == 100 ||
153
- Zend_Http_Response::extractCode($response) == 101) {
154
$response = preg_split('/^\r?#x2F;m', $response, 2);
155
$response = trim($response[1]);
156
}
@@ -161,6 +210,7 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
161
/**
162
* Close the connection to the server
163
*
164
*/
165
public function close()
166
{
@@ -169,6 +219,11 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
169
return $this;
170
}
171
172
protected function _getResource()
173
{
174
if (is_null($this->_resource)) {
@@ -177,11 +232,21 @@ class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
177
return $this->_resource;
178
}
179
180
public function getErrno()
181
{
182
return curl_errno($this->_getResource());
183
}
184
185
public function getError()
186
{
187
return curl_error($this->_getResource());
27
/**
28
* HTTP CURL Adapter
29
*
30
+ * @category Varien
31
+ * @package Varien_Http
32
* @author Magento Core Team <core@magentocommerce.com>
33
*/
34
class Varien_Http_Adapter_Curl implements Zend_Http_Client_Adapter_Interface
40
*/
41
protected $_config = array();
42
43
+ /**
44
+ * Curl handle
45
+ *
46
+ * @var resource
47
+ */
48
protected $_resource;
49
50
+ /**
51
+ * Allow parameters
52
+ *
53
+ * @var array
54
+ */
55
+ protected $_allowedParams = array(
56
+ 'timeout' => CURLOPT_TIMEOUT,
57
+ 'maxredirects' => CURLOPT_MAXREDIRS,
58
+ 'proxy' => CURLOPT_PROXY,
59
+ 'ssl_cert' => CURLOPT_SSLCERT,
60
+ 'userpwd' => CURLOPT_USERPWD
61
+ );
62
+
63
+ /**
64
+ * Array of CURL options
65
+ *
66
+ * @var array
67
+ */
68
+ protected $_options = array();
69
+
70
/**
71
* Apply current configuration array to transport resource
72
+ *
73
+ * @return Varien_Http_Adapter_Curl
74
*/
75
protected function _applyConfig()
76
{
77
+ if (empty($this->_config)) {
78
+ return $this;
79
}
80
+
81
+ // apply additional options to cURL
82
+ foreach ($this->_options as $option => $value) {
83
+ curl_setopt($this->_getResource(), $option, $value);
84
}
85
+
86
+ $verifyPeer = isset($this->_config['verifypeer']) ? $this->_config['verifypeer'] : 0;
87
+ curl_setopt($this->_getResource(), CURLOPT_SSL_VERIFYPEER, $verifyPeer);
88
+
89
+ $verifyHost = isset($this->_config['verifyhost']) ? $this->_config['verifyhost'] : 0;
90
+ curl_setopt($this->_getResource(), CURLOPT_SSL_VERIFYHOST, $verifyHost);
91
+
92
+ foreach ($this->_config as $param => $curlOption) {
93
+ if (array_key_exists($param, $this->_allowedParams)) {
94
+ curl_setopt($this->_getResource(), $this->_allowedParams[$param], $this->_config[$param]);
95
+ }
96
}
97
+ return $this;
98
+ }
99
+
100
+ /**
101
+ * Set array of additional cURL options
102
+ *
103
+ * @param array $options
104
+ * @return Varien_Http_Adapter_Curl
105
+ */
106
+ public function setOptions(array $options = array())
107
+ {
108
+ $this->_options = $options;
109
+ return $this;
110
+ }
111
112
+ /**
113
+ * Add additional option to cURL
114
+ *
115
+ * @param int $option the CURLOPT_* constants
116
+ * @param mixed $value
117
+ * @return Varien_Http_Adapter_Curl
118
+ */
119
+ public function addOption($option, $value)
120
+ {
121
+ $this->_options[$option] = $value;
122
return $this;
123
}
124
126
* Set the configuration array for the adapter
127
*
128
* @param array $config
129
+ * @return Varien_Http_Adapter_Curl
130
*/
131
public function setConfig($config = array())
132
{
137
/**
138
* Connect to the remote server
139
*
140
+ * @deprecated since 1.4.0.0-rc1
141
* @param string $host
142
* @param int $port
143
* @param boolean $secure
144
+ * @return Varien_Http_Adapter_Curl
145
*/
146
public function connect($host, $port = 80, $secure = false)
147
{
148
+ return $this->_applyConfig();
149
}
150
151
/**
176
curl_setopt($this->_getResource(), CURLOPT_HTTPGET, true);
177
}
178
179
+ if (is_array($headers)) {
180
curl_setopt($this->_getResource(), CURLOPT_HTTPHEADER, $headers);
181
}
182
183
+ /**
184
+ * @internal Curl options setter have to be re-factored
185
+ */
186
+ $header = isset($this->_config['header']) ? $this->_config['header'] : true;
187
+ curl_setopt($this->_getResource(), CURLOPT_HEADER, $header);
188
189
return $body;
190
}
199
$response = curl_exec($this->_getResource());
200
201
// Remove 100 and 101 responses headers
202
+ if (Zend_Http_Response::extractCode($response) == 100 || Zend_Http_Response::extractCode($response) == 101) {
203
$response = preg_split('/^\r?#x2F;m', $response, 2);
204
$response = trim($response[1]);
205
}
210
/**
211
* Close the connection to the server
212
*
213
+ * @return Varien_Http_Adapter_Curl
214
*/
215
public function close()
216
{
219
return $this;
220
}
221
222
+ /**
223
+ * Returns a cURL handle on success
224
+ *
225
+ * @return resource
226
+ */
227
protected function _getResource()
228
{
229
if (is_null($this->_resource)) {
232
return $this->_resource;
233
}
234
235
+ /**
236
+ * Get last error number
237
+ *
238
+ * @return int
239
+ */
240
public function getErrno()
241
{
242
return curl_errno($this->_getResource());
243
}
244
245
+ /**
246
+ * Get string with last error for the current session
247
+ *
248
+ * @return string
249
+ */
250
public function getError()
251
{
252
return curl_error($this->_getResource());
lib/Varien/Pear.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Pear
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
20
*
21
* @category Varien
22
* @package Varien_Pear
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
lib/Varien/Pear/Frontend.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Pear
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
20
*
21
* @category Varien
22
* @package Varien_Pear
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
lib/Varien/Pear/Package.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Pear
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
@@ -218,4 +218,4 @@ class Varien_Pear_Package
218
{
219
return $this;
220
}
221
- }
20
*
21
* @category Varien
22
* @package Varien_Pear
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
218
{
219
return $this;
220
}
221
+ }
lib/Varien/Pear/Registry.php CHANGED
@@ -20,7 +20,7 @@
20
*
21
* @category Varien
22
* @package Varien_Pear
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
@@ -70,4 +70,4 @@ class Varien_Pear_Registry extends PEAR_Registry
70
}
71
}
72
}
73
- }
20
*
21
* @category Varien
22
* @package Varien_Pear
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
*/
26
70
}
71
}
72
}
73
+ }
package.xml CHANGED
@@ -1,18 +1,18 @@
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>
1
<?xml version="1.0"?>
2
<package>
3
<name>Lib_Varien</name>
4
+ <version>1.7.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.7.0.0</notes>
12
<authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
13
+ <date>2012-04-23</date>
14
+ <time>13:47:59</time>
15
+ <contents><target name="magelib"><dir name="Varien"><file name="Autoload.php" hash="96a0c175e6a98562f058f9a02c167bbb"/><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="76e12f13e1eb48eb3e8c36cea9a6ece3"/></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="61386b14392bc29b7f734ed6ee6ee3c5"/></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="7a4be602c7a6acf3ac5dcfb26f83e50f"/><file name="Filesystem.php" hash="8c2e8522e1782dbea4d52f44566cd02a"/></dir><file name="Collection.php" hash="e55f81c3fdf4b39d05bbbce7573e0de8"/><dir name="Form"><file name="Abstract.php" hash="4978be2832783e6ab2f7c4e291bbf4d5"/><dir name="Element"><file name="Abstract.php" hash="a8982e3215fc63a5cb40a4e964f6d3ea"/><file name="Button.php" hash="98c64b5da29dff22cfae938caa5833c8"/><file name="Checkbox.php" hash="7992114fdc4aefafceebac2a08c1a434"/><file name="Checkboxes.php" hash="fdc32833161b60139e9859f387bce6c7"/><file name="Collection.php" hash="cade28ccfd09e8b55394bf3a7d595d70"/><file name="Column.php" hash="b6d1d32aca981ae0fd1c6a83fc655c9a"/><file name="Date.php" hash="3f5c8628e329cbc87c33c7e622a3b946"/><file name="Editor.php" hash="40e2585d72356d2b5e7d55fc2373c6ea"/><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="c4d7be9bf6b1b19590d44bf9837eb748"/><file name="Imagefile.php" hash="2d6ed40fef1c2927ab22dea7d29336db"/><file name="Label.php" hash="ced6668e926c5cd10e5dfc93e1764070"/><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="7830b6da8a6a54b5ef8d17b7f0d248f0"/><dir name="Db"><dir name="Adapter"><file name="Interface.php" hash="aa9ce5d0b03233176e41d2f8a8706590"/><file name="Mysqli.php" hash="4e6e03a6ddf127f58ab0326c4cfe9956"/><dir name="Pdo"><file name="Mysql.php" hash="d250406ead15e659a6e3a75304d67369"/></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="62250da9eb320e684a4c121c3a40d473"/><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="59faf0b57bc10bdf3daade69b51fd142"/><file name="Factory.php" hash="112fda936935de43f45bf0e1b1ebfd23"/><file name="IFactory.php" hash="bb7a2578774f58922f7d5b3a90c34e3e"/><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="86116483e252e66c516208e43b3bb920"/><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="7e66b733d1e9be6575cbcfd9e9aaac48"/></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="6d7dd607c55582ac08416f1940f3868c"/></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="61a9a308d54eca9e0a0bbc09296189f1"/><file name="Package.php" hash="a4261d73ebc059785fe418c6350bb4e5"/><file name="Registry.php" hash="5780af5995ea9af32032d3ebe496e251"/></dir><file name="Pear.php" hash="d60801531ef3ac16b26e302961310c53"/><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>