Version Notes
* SUPEE-6788 FIX
Download this release
Release Info
Developer | Manuel Canepa |
Extension | Mage_Imaclean |
Version | 1.0.0 |
Comparing to | |
See all releases |
Code changes from version 0.1.0 to 1.0.0
- app/code/community/Defcon2/Imaclean/Block/Adminhtml/Defcon2imaclean/Grid.php +72 -0
- app/code/community/Defcon2/Imaclean/Block/Adminhtml/Imaclean.php +20 -0
- app/code/community/Defcon2/Imaclean/Block/Adminhtml/Imaclean/Grid.php +72 -0
- app/code/community/Defcon2/Imaclean/Block/Adminhtml/Renderer/Image.php +50 -0
- app/code/community/Defcon2/Imaclean/Block/Imaclean.php +23 -0
- app/code/community/Defcon2/Imaclean/Helper/Data.php +59 -0
- app/code/community/Defcon2/Imaclean/Model/Imaclean.php +17 -0
- app/code/community/Defcon2/Imaclean/Model/Mysql4/Imaclean.php +17 -0
- app/code/community/Defcon2/Imaclean/Model/Mysql4/Imaclean/Collection.php +32 -0
- app/code/community/Defcon2/Imaclean/Model/Status.php +22 -0
- app/code/community/Defcon2/Imaclean/controllers/Adminhtml/ImacleanController.php +74 -0
- app/code/community/Defcon2/Imaclean/controllers/IndexController.php +18 -0
- app/code/community/Defcon2/Imaclean/etc/adminhtml.xml +36 -0
- app/code/community/Defcon2/Imaclean/etc/config.xml +72 -0
- app/code/community/Defcon2/Imaclean/sql/defcon2imaclean_setup/mysql4-install-1.0.0.php +34 -0
- app/code/local/Mage/Imaclean/Block/Adminhtml/Imaclean.php +0 -13
- app/code/local/Mage/Imaclean/Block/Adminhtml/Imaclean/Grid.php +0 -77
- app/code/local/Mage/Imaclean/Block/Adminhtml/Renderer/Image.php +0 -45
- app/code/local/Mage/Imaclean/Block/Imaclean.php +0 -17
- app/code/local/Mage/Imaclean/Helper/Data.php +0 -57
- app/code/local/Mage/Imaclean/Model/Imaclean.php +0 -10
- app/code/local/Mage/Imaclean/Model/Mysql4/Imaclean.php +0 -11
- app/code/local/Mage/Imaclean/Model/Mysql4/Imaclean/Collection.php +0 -35
- app/code/local/Mage/Imaclean/Model/Status.php +0 -15
- app/code/local/Mage/Imaclean/controllers/Adminhtml/ImacleanController.php +0 -68
- app/code/local/Mage/Imaclean/controllers/IndexController.php +0 -10
- app/code/local/Mage/Imaclean/etc/config.xml +0 -120
- app/code/local/Mage/Imaclean/sql/imaclean_setup/mysql4-install-0.1.0.php +0 -18
- app/design/adminhtml/default/default/layout/imaclean.xml +0 -8
- app/etc/modules/Defcon2_Imaclean.xml +9 -0
- app/etc/modules/Mage_Imaclean.xml +0 -9
- package.xml +13 -11
app/code/community/Defcon2/Imaclean/Block/Adminhtml/Defcon2imaclean/Grid.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Block_Adminhtml_Imaclean_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
parent::__construct();
|
14 |
+
$this->setId('imacleanGrid');
|
15 |
+
$this->setDefaultSort('imaclean_id');
|
16 |
+
$this->setDefaultDir('ASC');
|
17 |
+
$this->setSaveParametersInSession(true);
|
18 |
+
}
|
19 |
+
|
20 |
+
// **** // trae las imagenes que no estan en base de datos...
|
21 |
+
protected function _prepareCollection() {
|
22 |
+
$collection = Mage::getModel('defcon2imaclean/imaclean')->getCollection();
|
23 |
+
|
24 |
+
$this->setCollection($collection);
|
25 |
+
|
26 |
+
return parent::_prepareCollection();
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function _prepareColumns() {
|
30 |
+
|
31 |
+
$this->addColumn('filename', array(
|
32 |
+
'header' => Mage::helper('defcon2imaclean')->__('Filename'),
|
33 |
+
'renderer' => 'Defcon2_Imaclean_Block_Adminhtml_Renderer_Image',
|
34 |
+
'align' => 'left',
|
35 |
+
'index' => 'filename'
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('action', array(
|
39 |
+
'header' => Mage::helper('defcon2imaclean')->__('Action'),
|
40 |
+
'width' => '100',
|
41 |
+
'type' => 'action',
|
42 |
+
'getter' => 'getId',
|
43 |
+
'actions' => array(
|
44 |
+
array(
|
45 |
+
'caption' => Mage::helper('defcon2imaclean')->__('delete'),
|
46 |
+
'url' => array('base' => '*/*/delete'),
|
47 |
+
'field' => 'id'
|
48 |
+
)
|
49 |
+
),
|
50 |
+
'filter' => false,
|
51 |
+
'sortable' => false,
|
52 |
+
'index' => 'stores',
|
53 |
+
'is_system' => true,
|
54 |
+
));
|
55 |
+
|
56 |
+
return parent::_prepareColumns();
|
57 |
+
}
|
58 |
+
|
59 |
+
protected function _prepareMassaction() {
|
60 |
+
|
61 |
+
$this->setMassactionIdField('imaclean_id');
|
62 |
+
$this->getMassactionBlock()->setFormFieldName('imaclean');
|
63 |
+
|
64 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
65 |
+
'label' => Mage::helper('defcon2imaclean')->__('Delete'),
|
66 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
67 |
+
'confirm' => Mage::helper('defcon2imaclean')->__('Are you sure?')
|
68 |
+
));
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
app/code/community/Defcon2/Imaclean/Block/Adminhtml/Imaclean.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Block_Adminhtml_Imaclean extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
$this->_controller = 'adminhtml_imaclean';
|
14 |
+
$this->_blockGroup = 'defcon2imaclean';
|
15 |
+
$this->_headerText = Mage::helper('defcon2imaclean')->__('Items Manager. These files are not in database.');
|
16 |
+
$this->_addButtonLabel = Mage::helper('defcon2imaclean')->__('Refresh');
|
17 |
+
parent::__construct();
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Defcon2/Imaclean/Block/Adminhtml/Imaclean/Grid.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Block_Adminhtml_Imaclean_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
11 |
+
|
12 |
+
public function __construct() {
|
13 |
+
parent::__construct();
|
14 |
+
$this->setId('imacleanGrid');
|
15 |
+
$this->setDefaultSort('imaclean_id');
|
16 |
+
$this->setDefaultDir('ASC');
|
17 |
+
$this->setSaveParametersInSession(true);
|
18 |
+
}
|
19 |
+
|
20 |
+
// **** // trae las imagenes que no estan en base de datos...
|
21 |
+
protected function _prepareCollection() {
|
22 |
+
$collection = Mage::getModel('defcon2imaclean/imaclean')->getCollection();
|
23 |
+
|
24 |
+
$this->setCollection($collection);
|
25 |
+
|
26 |
+
return parent::_prepareCollection();
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function _prepareColumns() {
|
30 |
+
|
31 |
+
$this->addColumn('filename', array(
|
32 |
+
'header' => Mage::helper('defcon2imaclean')->__('Filename'),
|
33 |
+
'renderer' => 'Defcon2_Imaclean_Block_Adminhtml_Renderer_Image',
|
34 |
+
'align' => 'left',
|
35 |
+
'index' => 'filename'
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('action', array(
|
39 |
+
'header' => Mage::helper('defcon2imaclean')->__('Action'),
|
40 |
+
'width' => '100',
|
41 |
+
'type' => 'action',
|
42 |
+
'getter' => 'getId',
|
43 |
+
'actions' => array(
|
44 |
+
array(
|
45 |
+
'caption' => Mage::helper('defcon2imaclean')->__('delete'),
|
46 |
+
'url' => array('base' => '*/*/delete'),
|
47 |
+
'field' => 'id'
|
48 |
+
)
|
49 |
+
),
|
50 |
+
'filter' => false,
|
51 |
+
'sortable' => false,
|
52 |
+
'index' => 'stores',
|
53 |
+
'is_system' => true,
|
54 |
+
));
|
55 |
+
|
56 |
+
return parent::_prepareColumns();
|
57 |
+
}
|
58 |
+
|
59 |
+
protected function _prepareMassaction() {
|
60 |
+
|
61 |
+
$this->setMassactionIdField('imaclean_id');
|
62 |
+
$this->getMassactionBlock()->setFormFieldName('imaclean');
|
63 |
+
|
64 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
65 |
+
'label' => Mage::helper('defcon2imaclean')->__('Delete'),
|
66 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
67 |
+
'confirm' => Mage::helper('defcon2imaclean')->__('Are you sure?')
|
68 |
+
));
|
69 |
+
return $this;
|
70 |
+
}
|
71 |
+
|
72 |
+
}
|
app/code/community/Defcon2/Imaclean/Block/Adminhtml/Renderer/Image.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Block_Adminhtml_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format variables pattern
|
14 |
+
*
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
protected $_variablePattern = '/\\$([a-z0-9_]+)/i';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Renders grid column
|
21 |
+
*
|
22 |
+
* @param Varien_Object $row
|
23 |
+
* @return mixed
|
24 |
+
*/
|
25 |
+
public function _getValue(Varien_Object $row) {
|
26 |
+
|
27 |
+
$format = ( $this->getColumn()->getFormat() ) ? $this->getColumn()->getFormat() : null;
|
28 |
+
$defaultValue = $this->getColumn()->getDefault();
|
29 |
+
if (is_null($format)) {
|
30 |
+
// If no format and it column not filtered specified return data as is.
|
31 |
+
$data = parent::_getValue($row);
|
32 |
+
$string = is_null($data) ? $defaultValue : $data;
|
33 |
+
$url = htmlspecialchars($string);
|
34 |
+
} elseif (preg_match_all($this->_variablePattern, $format, $matches)) {
|
35 |
+
// Parsing of format string
|
36 |
+
$formatedString = $format;
|
37 |
+
foreach ($matches[0] as $matchIndex => $match) {
|
38 |
+
$value = $row->getData($matches[1][$matchIndex]);
|
39 |
+
$formatedString = str_replace($match, $value, $formatedString);
|
40 |
+
}
|
41 |
+
$url = $formatedString;
|
42 |
+
} else {
|
43 |
+
$url = htmlspecialchars($format);
|
44 |
+
}
|
45 |
+
|
46 |
+
$location = Mage::getStoreConfig('web/secure/base_url');
|
47 |
+
return "<img src='" . $location . "media/catalog/product{$url}' alt='{$url}' title='{$url}' width='150' height='150' />";
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
app/code/community/Defcon2/Imaclean/Block/Imaclean.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Block_Imaclean extends Mage_Core_Block_Template {
|
11 |
+
|
12 |
+
public function _prepareLayout() {
|
13 |
+
return parent::_prepareLayout();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function getImaclean() {
|
17 |
+
if (!$this->hasData('imaclean')) {
|
18 |
+
$this->setData('imaclean', Mage::registry('imaclean'));
|
19 |
+
}
|
20 |
+
return $this->getData('imaclean');
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
app/code/community/Defcon2/Imaclean/Helper/Data.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Helper_Data extends Mage_Core_Helper_Abstract {
|
11 |
+
|
12 |
+
protected $result = array();
|
13 |
+
protected $_mainTable;
|
14 |
+
public $valdir = array();
|
15 |
+
|
16 |
+
public function listDirectories($path) {
|
17 |
+
if (is_dir($path)) {
|
18 |
+
if ($dir = opendir($path)) {
|
19 |
+
while (($entry = readdir($dir)) !== false) {
|
20 |
+
if (preg_match('/^\./', $entry) != 1) {
|
21 |
+
if (is_dir($path . DS . $entry) && !in_array($entry, array('cache', 'watermark'))) {
|
22 |
+
$this->listDirectories($path . DS . $entry);
|
23 |
+
} elseif (!in_array($entry, array('cache', 'watermark')) && (strpos($entry, '.') != 0)) {
|
24 |
+
$this->result[] = substr($path . DS . $entry, 21);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
closedir($dir);
|
29 |
+
}
|
30 |
+
}
|
31 |
+
return $this->result;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function compareList() {
|
35 |
+
|
36 |
+
$valores = Mage::getModel('defcon2imaclean/imaclean')->getCollection()->getImages();
|
37 |
+
|
38 |
+
$pepe = 'media' . DS . 'catalog' . DS . 'product';
|
39 |
+
|
40 |
+
$leer = $this->listDirectories($pepe);
|
41 |
+
|
42 |
+
$model = Mage::getModel('defcon2imaclean/imaclean');
|
43 |
+
foreach ($leer as $item) {
|
44 |
+
try {
|
45 |
+
$item = strtr($item, '\\', '/');
|
46 |
+
if (!in_array($item, $valores)) {
|
47 |
+
$valdir[]['filename'] = $item;
|
48 |
+
$model->setData(array('filename' => $item))->setId(null);
|
49 |
+
$model->save();
|
50 |
+
}
|
51 |
+
} catch (Zend_Db_Exception $e) {
|
52 |
+
|
53 |
+
} catch (Exception $e) {
|
54 |
+
Mage::log($e->getMessage());
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
app/code/community/Defcon2/Imaclean/Model/Imaclean.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Model_Imaclean extends Mage_Core_Model_Abstract {
|
11 |
+
|
12 |
+
public function _construct() {
|
13 |
+
parent::_construct();
|
14 |
+
$this->_init('defcon2imaclean/imaclean');
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
app/code/community/Defcon2/Imaclean/Model/Mysql4/Imaclean.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Model_Mysql4_Imaclean extends Mage_Core_Model_Mysql4_Abstract {
|
11 |
+
|
12 |
+
public function _construct() {
|
13 |
+
// Note that the imaclean_id refers to the key field in your database table.
|
14 |
+
$this->_init('defcon2imaclean/imaclean', 'imaclean_id');
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
app/code/community/Defcon2/Imaclean/Model/Mysql4/Imaclean/Collection.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Defcon2_Imaclean_Model_Mysql4_Imaclean_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
4 |
+
|
5 |
+
protected $total;
|
6 |
+
|
7 |
+
public function _construct() {
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('defcon2imaclean/imaclean');
|
10 |
+
}
|
11 |
+
|
12 |
+
// trae imagenes que estan guardadas en la base de datos...
|
13 |
+
|
14 |
+
public function getImages() {
|
15 |
+
try {
|
16 |
+
$this->setConnection($this->getResource()->getReadConnection());
|
17 |
+
$this->getSelect()
|
18 |
+
->from(array('main_table' => $this->getTable('catalog/product_attribute_media_gallery')), '*')
|
19 |
+
->group(array('value_id'));
|
20 |
+
|
21 |
+
$array = array();
|
22 |
+
foreach ($this->getData() as $item) {
|
23 |
+
$array[] = $item['value'];
|
24 |
+
}
|
25 |
+
} catch (Exception $e) {
|
26 |
+
Mage::log($e->getMessage());
|
27 |
+
}
|
28 |
+
|
29 |
+
return $array;
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
app/code/community/Defcon2/Imaclean/Model/Status.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Model_Status extends Varien_Object {
|
11 |
+
|
12 |
+
const STATUS_ENABLED = 1;
|
13 |
+
const STATUS_DISABLED = 2;
|
14 |
+
|
15 |
+
static public function getOptionArray() {
|
16 |
+
return array(
|
17 |
+
self::STATUS_ENABLED => Mage::helper('defcon2imaclean')->__('Enabled'),
|
18 |
+
self::STATUS_DISABLED => Mage::helper('defcon2imaclean')->__('Disabled')
|
19 |
+
);
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
app/code/community/Defcon2/Imaclean/controllers/Adminhtml/ImacleanController.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_Adminhtml_ImacleanController extends Mage_Adminhtml_Controller_Action {
|
11 |
+
|
12 |
+
protected function _initAction() {
|
13 |
+
$this->loadLayout()
|
14 |
+
->_setActiveMenu('defcon2imaclean/items')
|
15 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
16 |
+
|
17 |
+
return $this;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function indexAction() {
|
21 |
+
$this->loadLayout();
|
22 |
+
$this->_setActiveMenu('system/d2imaclean');
|
23 |
+
$this->_addContent($this->getLayout()->createBlock('defcon2imaclean/adminhtml_imaclean'));
|
24 |
+
$this->renderLayout();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function newAction() {
|
28 |
+
Mage::helper('defcon2imaclean')->compareList();
|
29 |
+
$this->_redirect('*/*/');
|
30 |
+
}
|
31 |
+
|
32 |
+
public function deleteAction() {
|
33 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
34 |
+
try {
|
35 |
+
$model = Mage::getModel('defcon2imaclean/imaclean');
|
36 |
+
$model->load($this->getRequest()->getParam('id'));
|
37 |
+
unlink('media/catalog/product' . $model->getFilename());
|
38 |
+
$model->setId($this->getRequest()->getParam('id'))->delete();
|
39 |
+
|
40 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
41 |
+
$this->_redirect('*/*/');
|
42 |
+
} catch (Exception $e) {
|
43 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
44 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
45 |
+
}
|
46 |
+
}
|
47 |
+
$this->_redirect('*/*/');
|
48 |
+
}
|
49 |
+
|
50 |
+
public function massDeleteAction() {
|
51 |
+
$imacleanIds = $this->getRequest()->getParam('imaclean');
|
52 |
+
if (!is_array($imacleanIds)) {
|
53 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
54 |
+
} else {
|
55 |
+
try {
|
56 |
+
$model = Mage::getModel('defcon2imaclean/imaclean');
|
57 |
+
foreach ($imacleanIds as $imacleanId) {
|
58 |
+
$model->load($imacleanId);
|
59 |
+
unlink('media/catalog/product' . $model->getFilename());
|
60 |
+
$model->setId($imacleanId)->delete();
|
61 |
+
}
|
62 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
63 |
+
Mage::helper('adminhtml')->__(
|
64 |
+
'Total of %d record(s) were successfully deleted', count($imacleanIds)
|
65 |
+
)
|
66 |
+
);
|
67 |
+
} catch (Exception $e) {
|
68 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
69 |
+
}
|
70 |
+
}
|
71 |
+
$this->_redirect('*/*/index');
|
72 |
+
}
|
73 |
+
|
74 |
+
}
|
app/code/community/Defcon2/Imaclean/controllers/IndexController.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
class Defcon2_Imaclean_IndexController extends Mage_Core_Controller_Front_Action {
|
11 |
+
|
12 |
+
public function indexAction() {
|
13 |
+
|
14 |
+
$this->loadLayout();
|
15 |
+
$this->renderLayout();
|
16 |
+
}
|
17 |
+
|
18 |
+
}
|
app/code/community/Defcon2/Imaclean/etc/adminhtml.xml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
Defcon2_Imaclean
|
4 |
+
|
5 |
+
@category Defcon2
|
6 |
+
@package Defcon2_Imaclean
|
7 |
+
@copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
8 |
+
-->
|
9 |
+
<config>
|
10 |
+
<menu>
|
11 |
+
<system>
|
12 |
+
<children>
|
13 |
+
<d2imaclean module="defcon2imaclean" translate="title">
|
14 |
+
<title>ImaClean</title>
|
15 |
+
<action>adminhtml/imaclean</action>
|
16 |
+
</d2imaclean>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</menu>
|
20 |
+
<acl>
|
21 |
+
<resources>
|
22 |
+
<admin>
|
23 |
+
<children>
|
24 |
+
<system>
|
25 |
+
<children>
|
26 |
+
<d2imaclean>
|
27 |
+
<title>ImaClean</title>
|
28 |
+
<sort_order>0</sort_order>
|
29 |
+
</d2imaclean>
|
30 |
+
</children>
|
31 |
+
</system>
|
32 |
+
</children>
|
33 |
+
</admin>
|
34 |
+
</resources>
|
35 |
+
</acl>
|
36 |
+
</config>
|
app/code/community/Defcon2/Imaclean/etc/config.xml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
Defcon2_Imaclean
|
4 |
+
|
5 |
+
@category Defcon2
|
6 |
+
@package Defcon2_Imaclean
|
7 |
+
@copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
8 |
+
-->
|
9 |
+
<config>
|
10 |
+
<modules>
|
11 |
+
<Defcon2_Imaclean>
|
12 |
+
<version>1.0.0</version>
|
13 |
+
</Defcon2_Imaclean>
|
14 |
+
</modules>
|
15 |
+
<global>
|
16 |
+
<models>
|
17 |
+
<defcon2imaclean>
|
18 |
+
<class>Defcon2_Imaclean_Model</class>
|
19 |
+
<resourceModel>defcon2imaclean_mysql4</resourceModel>
|
20 |
+
</defcon2imaclean>
|
21 |
+
<defcon2imaclean_mysql4>
|
22 |
+
<class>Defcon2_Imaclean_Model_Mysql4</class>
|
23 |
+
<entities>
|
24 |
+
<imaclean>
|
25 |
+
<table>imaclean</table>
|
26 |
+
</imaclean>
|
27 |
+
</entities>
|
28 |
+
</defcon2imaclean_mysql4>
|
29 |
+
</models>
|
30 |
+
<resources>
|
31 |
+
<defcon2imaclean_setup>
|
32 |
+
<setup>
|
33 |
+
<module>Defcon2_Imaclean</module>
|
34 |
+
</setup>
|
35 |
+
<connection>
|
36 |
+
<use>core_setup</use>
|
37 |
+
</connection>
|
38 |
+
</defcon2imaclean_setup>
|
39 |
+
<defcon2imaclean_write>
|
40 |
+
<connection>
|
41 |
+
<use>core_write</use>
|
42 |
+
</connection>
|
43 |
+
</defcon2imaclean_write>
|
44 |
+
<defcon2imaclean_read>
|
45 |
+
<connection>
|
46 |
+
<use>core_read</use>
|
47 |
+
</connection>
|
48 |
+
</defcon2imaclean_read>
|
49 |
+
</resources>
|
50 |
+
<blocks>
|
51 |
+
<defcon2imaclean>
|
52 |
+
<class>Defcon2_Imaclean_Block</class>
|
53 |
+
</defcon2imaclean>
|
54 |
+
</blocks>
|
55 |
+
<helpers>
|
56 |
+
<defcon2imaclean>
|
57 |
+
<class>Defcon2_Imaclean_Helper</class>
|
58 |
+
</defcon2imaclean>
|
59 |
+
</helpers>
|
60 |
+
</global>
|
61 |
+
<admin>
|
62 |
+
<routers>
|
63 |
+
<adminhtml>
|
64 |
+
<args>
|
65 |
+
<modules>
|
66 |
+
<defcon2imaclean after="Mage_Adminhtml">Defcon2_Imaclean_Adminhtml</defcon2imaclean>
|
67 |
+
</modules>
|
68 |
+
</args>
|
69 |
+
</adminhtml>
|
70 |
+
</routers>
|
71 |
+
</admin>
|
72 |
+
</config>
|
app/code/community/Defcon2/Imaclean/sql/defcon2imaclean_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Defcon2_Imaclean
|
5 |
+
*
|
6 |
+
* @category Defcon2
|
7 |
+
* @package Defcon2_Imaclean
|
8 |
+
* @copyright Copyright (c) 2016 Manuel Canepa (http://cv.manuelcanepa.com.ar/)
|
9 |
+
*/
|
10 |
+
$installer = $this;
|
11 |
+
|
12 |
+
$installer->startSetup();
|
13 |
+
|
14 |
+
$installer->run("
|
15 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('imaclean')} (
|
16 |
+
`imaclean_id` int(11) unsigned NOT NULL auto_increment,
|
17 |
+
`filename` varchar(255) NOT NULL default '',
|
18 |
+
PRIMARY KEY (`imaclean_id`),
|
19 |
+
UNIQUE KEY `filename` (`filename`)
|
20 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
21 |
+
");
|
22 |
+
|
23 |
+
$oldDir = Mage::getModuleDir('', 'Mage_Imaclean');
|
24 |
+
if (file_exists($oldDir)) {
|
25 |
+
$etcFile = Mage::getBaseDir('etc') . DS . 'modules' . DS . 'Mage_Imaclean.xml';
|
26 |
+
if (file_exists($etcFile) && is_file($etcFile)) {
|
27 |
+
if (unlink($etcFile)) {
|
28 |
+
unlink(Mage::getBaseDir('design') . DS . 'adminhtml' . DS . 'default' . DS . 'default' . DS . 'layout' . DS . 'imaclean.xml');
|
29 |
+
Varien_Io_File::rmdirRecursive($oldDir);
|
30 |
+
$installer->run("DELETE FROM `core_resource` WHERE `code` = 'imaclean_setup'");
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
$installer->endSetup();
|
app/code/local/Mage/Imaclean/Block/Adminhtml/Imaclean.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mage_Imaclean_Block_Adminhtml_Imaclean extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
-
{
|
4 |
-
public function __construct()
|
5 |
-
{
|
6 |
-
$this->_controller = 'adminhtml_imaclean';
|
7 |
-
$this->_blockGroup = 'imaclean';
|
8 |
-
$this->_headerText = Mage::helper('imaclean')->__('Items Manager. These files are not in database.');
|
9 |
-
$this->_addButtonLabel = Mage::helper('imaclean')->__('Refresh');
|
10 |
-
parent::__construct();
|
11 |
-
|
12 |
-
}
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Block/Adminhtml/Imaclean/Grid.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Block_Adminhtml_Imaclean_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
-
{
|
5 |
-
|
6 |
-
public function __construct()
|
7 |
-
{
|
8 |
-
parent::__construct();
|
9 |
-
$this->setId('imacleanGrid');
|
10 |
-
$this->setDefaultSort('imaclean_id');
|
11 |
-
$this->setDefaultDir('ASC');
|
12 |
-
$this->setSaveParametersInSession(true);
|
13 |
-
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
// **** // trae las imagenes que no estan en base de datos...
|
18 |
-
protected function _prepareCollection()
|
19 |
-
{
|
20 |
-
$collection = Mage::getModel('imaclean/imaclean')->getCollection();
|
21 |
-
|
22 |
-
$this->setCollection($collection);
|
23 |
-
|
24 |
-
return parent::_prepareCollection();
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
protected function _prepareColumns()
|
29 |
-
{
|
30 |
-
|
31 |
-
$this->addColumn('filename', array(
|
32 |
-
'header' => Mage::helper('imaclean')->__('Filename'),
|
33 |
-
'renderer' =>'Mage_Imaclean_Block_Adminhtml_Renderer_Image',
|
34 |
-
'align' =>'left',
|
35 |
-
'index' => 'filename'
|
36 |
-
|
37 |
-
));
|
38 |
-
|
39 |
-
$this->addColumn('action',
|
40 |
-
array(
|
41 |
-
'header' => Mage::helper('imaclean')->__('Action'),
|
42 |
-
'width' => '100',
|
43 |
-
'type' => 'action',
|
44 |
-
'getter' => 'getId',
|
45 |
-
'actions' => array(
|
46 |
-
array(
|
47 |
-
'caption' => Mage::helper('imaclean')->__('delete'),
|
48 |
-
'url' => array('base'=> '*/*/delete'),
|
49 |
-
'field' => 'id'
|
50 |
-
)
|
51 |
-
),
|
52 |
-
'filter' => false,
|
53 |
-
'sortable' => false,
|
54 |
-
'index' => 'stores',
|
55 |
-
'is_system' => true,
|
56 |
-
));
|
57 |
-
|
58 |
-
return parent::_prepareColumns();
|
59 |
-
}
|
60 |
-
|
61 |
-
|
62 |
-
protected function _prepareMassaction()
|
63 |
-
{
|
64 |
-
|
65 |
-
$this->setMassactionIdField('imaclean_id');
|
66 |
-
$this->getMassactionBlock()->setFormFieldName('imaclean');
|
67 |
-
|
68 |
-
$this->getMassactionBlock()->addItem('delete', array(
|
69 |
-
'label' => Mage::helper('imaclean')->__('Delete'),
|
70 |
-
'url' => $this->getUrl('*/*/massDelete'),
|
71 |
-
'confirm' => Mage::helper('imaclean')->__('Are you sure?')
|
72 |
-
));
|
73 |
-
return $this;
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Block/Adminhtml/Renderer/Image.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Block_Adminhtml_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
4 |
-
{
|
5 |
-
/**
|
6 |
-
* Format variables pattern
|
7 |
-
*
|
8 |
-
* @var string
|
9 |
-
*/
|
10 |
-
protected $_variablePattern = '/\\$([a-z0-9_]+)/i';
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Renders grid column
|
14 |
-
*
|
15 |
-
* @param Varien_Object $row
|
16 |
-
* @return mixed
|
17 |
-
*/
|
18 |
-
public function _getValue(Varien_Object $row)
|
19 |
-
{
|
20 |
-
|
21 |
-
$format = ( $this->getColumn()->getFormat() ) ? $this->getColumn()->getFormat() : null;
|
22 |
-
$defaultValue = $this->getColumn()->getDefault();
|
23 |
-
if (is_null($format)) {
|
24 |
-
// If no format and it column not filtered specified return data as is.
|
25 |
-
$data = parent::_getValue($row);
|
26 |
-
$string = is_null($data) ? $defaultValue : $data;
|
27 |
-
$url = htmlspecialchars($string);
|
28 |
-
}
|
29 |
-
elseif (preg_match_all($this->_variablePattern, $format, $matches)) {
|
30 |
-
// Parsing of format string
|
31 |
-
$formatedString = $format;
|
32 |
-
foreach ($matches[0] as $matchIndex=>$match) {
|
33 |
-
$value = $row->getData($matches[1][$matchIndex]);
|
34 |
-
$formatedString = str_replace($match, $value, $formatedString);
|
35 |
-
}
|
36 |
-
$url = $formatedString;
|
37 |
-
} else {
|
38 |
-
$url = htmlspecialchars($format);
|
39 |
-
}
|
40 |
-
|
41 |
-
$location = Mage::getStoreConfig('web/secure/base_url');
|
42 |
-
return "<img src='". $location ."media/catalog/product{$url}' alt='{$url}' title='{$url}' width='150' height='150' />";
|
43 |
-
|
44 |
-
}
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Block/Imaclean.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mage_Imaclean_Block_Imaclean extends Mage_Core_Block_Template
|
3 |
-
{
|
4 |
-
public function _prepareLayout()
|
5 |
-
{
|
6 |
-
return parent::_prepareLayout();
|
7 |
-
}
|
8 |
-
|
9 |
-
public function getImaclean()
|
10 |
-
{
|
11 |
-
if (!$this->hasData('imaclean')) {
|
12 |
-
$this->setData('imaclean', Mage::registry('imaclean'));
|
13 |
-
}
|
14 |
-
return $this->getData('imaclean');
|
15 |
-
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Helper/Data.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
-
{
|
5 |
-
|
6 |
-
protected $result = array();
|
7 |
-
protected $_mainTable;
|
8 |
-
public $valdir = array();
|
9 |
-
|
10 |
-
public function listDirectories($path){
|
11 |
-
if(is_dir($path)){
|
12 |
-
|
13 |
-
if ($dir = opendir($path)) {
|
14 |
-
while (($entry = readdir($dir)) !== false) {
|
15 |
-
if(preg_match('/^\./',$entry) != 1){
|
16 |
-
if (is_dir($path . DS . $entry) && !in_array($entry,array('cache','watermark')) ){
|
17 |
-
$this->listDirectories($path . DS . $entry);
|
18 |
-
} elseif(!in_array($entry,array('cache','watermark')) && (strpos($entry,'.') != 0)) {
|
19 |
-
$this->result[] = substr($path . DS . $entry, 21);
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
}
|
24 |
-
closedir($dir);
|
25 |
-
}
|
26 |
-
|
27 |
-
}
|
28 |
-
return $this->result;
|
29 |
-
}
|
30 |
-
|
31 |
-
|
32 |
-
public function compareList() {
|
33 |
-
|
34 |
-
$valores = Mage::getModel('imaclean/imaclean')->getCollection()->getImages();
|
35 |
-
|
36 |
-
$pepe = 'media' . DS . 'catalog' . DS . 'product';
|
37 |
-
|
38 |
-
$leer = $this->listDirectories($pepe);
|
39 |
-
|
40 |
-
$model = Mage::getModel('imaclean/imaclean');
|
41 |
-
foreach ($leer as $item){
|
42 |
-
try{
|
43 |
-
$item = strtr($item,'\\','/');
|
44 |
-
if(!in_array($item, $valores)){
|
45 |
-
$valdir[]['filename'] = $item;
|
46 |
-
$model->setData(array('filename'=>$item))->setId(null);
|
47 |
-
$model->save();
|
48 |
-
}
|
49 |
-
} catch(Zend_Db_Exception $e){
|
50 |
-
} catch(Exception $e){
|
51 |
-
Mage::log($e->getMessage());
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
56 |
-
|
57 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Model/Imaclean.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Model_Imaclean extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
public function _construct()
|
6 |
-
{
|
7 |
-
parent::_construct();
|
8 |
-
$this->_init('imaclean/imaclean');
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Model/Mysql4/Imaclean.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Model_Mysql4_Imaclean extends Mage_Core_Model_Mysql4_Abstract
|
4 |
-
{
|
5 |
-
public function _construct()
|
6 |
-
{
|
7 |
-
// Note that the imaclean_id refers to the key field in your database table.
|
8 |
-
$this->_init('imaclean/imaclean', 'imaclean_id');
|
9 |
-
}
|
10 |
-
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Model/Mysql4/Imaclean/Collection.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Model_Mysql4_Imaclean_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
-
{
|
5 |
-
protected $total;
|
6 |
-
public function _construct()
|
7 |
-
{
|
8 |
-
parent::_construct();
|
9 |
-
$this->_init('imaclean/imaclean');
|
10 |
-
|
11 |
-
}
|
12 |
-
|
13 |
-
// trae imagenes que estan guardadas en la base de datos...
|
14 |
-
|
15 |
-
public function getImages(){
|
16 |
-
try {
|
17 |
-
$this->setConnection($this->getResource()->getReadConnection());
|
18 |
-
$this->getSelect()
|
19 |
-
->from(array('main_table'=>$this->getTable('catalog/product_attribute_media_gallery')),'*')
|
20 |
-
->group(array('value_id'));
|
21 |
-
|
22 |
-
$array=array();
|
23 |
-
foreach ($this->getData() as $item){
|
24 |
-
$array[] = $item['value'];
|
25 |
-
}
|
26 |
-
}catch(Exception $e){
|
27 |
-
Mage::log($e->getMessage());
|
28 |
-
}
|
29 |
-
|
30 |
-
return $array;
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/Model/Status.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Model_Status extends Varien_Object
|
4 |
-
{
|
5 |
-
const STATUS_ENABLED = 1;
|
6 |
-
const STATUS_DISABLED = 2;
|
7 |
-
|
8 |
-
static public function getOptionArray()
|
9 |
-
{
|
10 |
-
return array(
|
11 |
-
self::STATUS_ENABLED => Mage::helper('imaclean')->__('Enabled'),
|
12 |
-
self::STATUS_DISABLED => Mage::helper('imaclean')->__('Disabled')
|
13 |
-
);
|
14 |
-
}
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/controllers/Adminhtml/ImacleanController.php
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mage_Imaclean_Adminhtml_ImacleanController extends Mage_Adminhtml_Controller_action
|
4 |
-
{
|
5 |
-
|
6 |
-
protected function _initAction() {
|
7 |
-
$this->loadLayout()
|
8 |
-
->_setActiveMenu('imaclean/items')
|
9 |
-
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
10 |
-
|
11 |
-
return $this;
|
12 |
-
}
|
13 |
-
|
14 |
-
public function indexAction() {
|
15 |
-
|
16 |
-
$this->_initAction()
|
17 |
-
->renderLayout();
|
18 |
-
}
|
19 |
-
|
20 |
-
public function newAction(){
|
21 |
-
|
22 |
-
Mage::helper('imaclean')->compareList();
|
23 |
-
$this->_redirect('*/*/');
|
24 |
-
}
|
25 |
-
|
26 |
-
public function deleteAction() {
|
27 |
-
if( $this->getRequest()->getParam('id') > 0 ) {
|
28 |
-
try {
|
29 |
-
$model = Mage::getModel('imaclean/imaclean');
|
30 |
-
$model->load($this->getRequest()->getParam('id'));
|
31 |
-
unlink('media/catalog/product'. $model->getFilename());
|
32 |
-
$model->setId($this->getRequest()->getParam('id'))->delete();
|
33 |
-
|
34 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
35 |
-
$this->_redirect('*/*/');
|
36 |
-
} catch (Exception $e) {
|
37 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
38 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
39 |
-
}
|
40 |
-
}
|
41 |
-
$this->_redirect('*/*/');
|
42 |
-
}
|
43 |
-
|
44 |
-
public function massDeleteAction() {
|
45 |
-
$imacleanIds = $this->getRequest()->getParam('imaclean');
|
46 |
-
if(!is_array($imacleanIds)) {
|
47 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
48 |
-
} else {
|
49 |
-
try {
|
50 |
-
$model = Mage::getModel('imaclean/imaclean');
|
51 |
-
foreach ($imacleanIds as $imacleanId) {
|
52 |
-
$model->load($imacleanId);
|
53 |
-
unlink('media/catalog/product'. $model->getFilename());
|
54 |
-
$model->setId($imacleanId)->delete();
|
55 |
-
}
|
56 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(
|
57 |
-
Mage::helper('adminhtml')->__(
|
58 |
-
'Total of %d record(s) were successfully deleted', count($imacleanIds)
|
59 |
-
)
|
60 |
-
);
|
61 |
-
} catch (Exception $e) {
|
62 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
63 |
-
}
|
64 |
-
}
|
65 |
-
$this->_redirect('*/*/index');
|
66 |
-
}
|
67 |
-
|
68 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/controllers/IndexController.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mage_Imaclean_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
-
{
|
4 |
-
public function indexAction()
|
5 |
-
{
|
6 |
-
|
7 |
-
$this->loadLayout();
|
8 |
-
$this->renderLayout();
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/etc/config.xml
DELETED
@@ -1,120 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Mage_Imaclean>
|
5 |
-
<version>0.1.0</version>
|
6 |
-
</Mage_Imaclean>
|
7 |
-
</modules>
|
8 |
-
<frontend>
|
9 |
-
<routers>
|
10 |
-
<imaclean>
|
11 |
-
<use>standard</use>
|
12 |
-
<args>
|
13 |
-
<module>Mage_Imaclean</module>
|
14 |
-
<frontName>imaclean</frontName>
|
15 |
-
</args>
|
16 |
-
</imaclean>
|
17 |
-
</routers>
|
18 |
-
<layout>
|
19 |
-
<updates>
|
20 |
-
<imaclean>
|
21 |
-
<file>imaclean.xml</file>
|
22 |
-
</imaclean>
|
23 |
-
</updates>
|
24 |
-
</layout>
|
25 |
-
</frontend>
|
26 |
-
<admin>
|
27 |
-
<routers>
|
28 |
-
<imaclean>
|
29 |
-
<use>admin</use>
|
30 |
-
<args>
|
31 |
-
<module>Mage_Imaclean</module>
|
32 |
-
<frontName>imaclean</frontName>
|
33 |
-
</args>
|
34 |
-
</imaclean>
|
35 |
-
</routers>
|
36 |
-
</admin>
|
37 |
-
<adminhtml>
|
38 |
-
<menu>
|
39 |
-
<imaclean module="imaclean">
|
40 |
-
<title>Imaclean</title>
|
41 |
-
<sort_order>71</sort_order>
|
42 |
-
<children>
|
43 |
-
<items module="imaclean">
|
44 |
-
<title>Manage Items</title>
|
45 |
-
<sort_order>0</sort_order>
|
46 |
-
<action>imaclean/adminhtml_imaclean</action>
|
47 |
-
</items>
|
48 |
-
</children>
|
49 |
-
</imaclean>
|
50 |
-
</menu>
|
51 |
-
<acl>
|
52 |
-
<resources>
|
53 |
-
<all>
|
54 |
-
<title>Allow Everything</title>
|
55 |
-
</all>
|
56 |
-
<admin>
|
57 |
-
<children>
|
58 |
-
<Mage_Imaclean>
|
59 |
-
<title>Imaclean Module</title>
|
60 |
-
<sort_order>10</sort_order>
|
61 |
-
</Mage_Imaclean>
|
62 |
-
</children>
|
63 |
-
</admin>
|
64 |
-
</resources>
|
65 |
-
</acl>
|
66 |
-
<layout>
|
67 |
-
<updates>
|
68 |
-
<imaclean>
|
69 |
-
<file>imaclean.xml</file>
|
70 |
-
</imaclean>
|
71 |
-
</updates>
|
72 |
-
</layout>
|
73 |
-
</adminhtml>
|
74 |
-
<global>
|
75 |
-
<models>
|
76 |
-
<imaclean>
|
77 |
-
<class>Mage_Imaclean_Model</class>
|
78 |
-
<resourceModel>imaclean_mysql4</resourceModel>
|
79 |
-
</imaclean>
|
80 |
-
<imaclean_mysql4>
|
81 |
-
<class>Mage_Imaclean_Model_Mysql4</class>
|
82 |
-
<entities>
|
83 |
-
<imaclean>
|
84 |
-
<table>imaclean</table>
|
85 |
-
</imaclean>
|
86 |
-
</entities>
|
87 |
-
</imaclean_mysql4>
|
88 |
-
</models>
|
89 |
-
<resources>
|
90 |
-
<imaclean_setup>
|
91 |
-
<setup>
|
92 |
-
<module>Mage_Imaclean</module>
|
93 |
-
</setup>
|
94 |
-
<connection>
|
95 |
-
<use>core_setup</use>
|
96 |
-
</connection>
|
97 |
-
</imaclean_setup>
|
98 |
-
<imaclean_write>
|
99 |
-
<connection>
|
100 |
-
<use>core_write</use>
|
101 |
-
</connection>
|
102 |
-
</imaclean_write>
|
103 |
-
<imaclean_read>
|
104 |
-
<connection>
|
105 |
-
<use>core_read</use>
|
106 |
-
</connection>
|
107 |
-
</imaclean_read>
|
108 |
-
</resources>
|
109 |
-
<blocks>
|
110 |
-
<imaclean>
|
111 |
-
<class>Mage_Imaclean_Block</class>
|
112 |
-
</imaclean>
|
113 |
-
</blocks>
|
114 |
-
<helpers>
|
115 |
-
<imaclean>
|
116 |
-
<class>Mage_Imaclean_Helper</class>
|
117 |
-
</imaclean>
|
118 |
-
</helpers>
|
119 |
-
</global>
|
120 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Imaclean/sql/imaclean_setup/mysql4-install-0.1.0.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
|
7 |
-
$installer->run("
|
8 |
-
|
9 |
-
DROP TABLE IF EXISTS {$this->getTable('imaclean')};
|
10 |
-
CREATE TABLE {$this->getTable('imaclean')} (
|
11 |
-
`imaclean_id` int(11) unsigned NOT NULL auto_increment,
|
12 |
-
`filename` varchar(255) NOT NULL default '',
|
13 |
-
PRIMARY KEY (`imaclean_id`),
|
14 |
-
UNIQUE KEY `filename` (`filename`)
|
15 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
16 |
-
");
|
17 |
-
|
18 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/layout/imaclean.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<imaclean_adminhtml_imaclean_index>
|
4 |
-
<reference name="content">
|
5 |
-
<block type="imaclean/adminhtml_imaclean" name="imaclean" />
|
6 |
-
</reference>
|
7 |
-
</imaclean_adminhtml_imaclean_index>
|
8 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Defcon2_Imaclean.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Defcon2_Imaclean>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Defcon2_Imaclean>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Mage_Imaclean.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Mage_Imaclean>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>local</codePool>
|
7 |
-
</Mage_Imaclean>
|
8 |
-
</modules>
|
9 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,20 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mage_Imaclean</name>
|
4 |
-
<version>
|
5 |
-
<stability>
|
6 |
-
<license uri="http://
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>This extension allows to list all the product images that already are not in use and to erase them
|
10 |
-
|
11 |
-
<
|
12 |
-
|
13 |
-
<
|
14 |
-
<
|
15 |
-
<
|
|
|
|
|
16 |
<compatible/>
|
17 |
-
<dependencies
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mage_Imaclean</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>This extension allows to list all the product images that already are not in use and to erase them.
|
10 |
+
</summary>
|
11 |
+
<description>This extension allows to list all the product images that already are not in use and to erase them.
|
12 |
+
</description>
|
13 |
+
<notes>* SUPEE-6788 FIX</notes>
|
14 |
+
<authors><author><name>Manuel Canepa</name><user>defcon2</user><email>manuelcanepa@gmail.com</email></author></authors>
|
15 |
+
<date>2015-10-23</date>
|
16 |
+
<time>19:29:21</time>
|
17 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Defcon2_Imaclean.xml" hash="157b3ce1c82a2b4b9a0a42875168cb56"/></dir></target><target name="magecommunity"><dir name="Defcon2"><dir name="Imaclean"><dir name="Block"><dir name="Adminhtml"><dir name="Defcon2imaclean"><file name="Grid.php" hash="af5b14246ee90f6d5c070f9eb3df423e"/></dir><dir name="Imaclean"><file name="Grid.php" hash="af5b14246ee90f6d5c070f9eb3df423e"/></dir><file name="Imaclean.php" hash="7e2f357b4b7976c82d14ad0d173adbf6"/><dir name="Renderer"><file name="Image.php" hash="d8d95b56e62d37ce2a60c19c04c9070d"/></dir></dir><file name="Imaclean.php" hash="229e40a71ac2213fb1fd262e78cf26c7"/></dir><dir name="Helper"><file name="Data.php" hash="dd309cde61b6565a2cb1893fb5feff83"/></dir><dir name="Model"><file name="Imaclean.php" hash="119d3950d04b4f31d3fc592daf100b50"/><dir name="Mysql4"><dir name="Imaclean"><file name="Collection.php" hash="8e06b24c560e0a65c97a2abb14594526"/></dir><file name="Imaclean.php" hash="f6577dccee30f77e583f79522d3bfeb4"/></dir><file name="Status.php" hash="21e06d3543492adc4caf7bf6b8b5ce97"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ImacleanController.php" hash="7ac62aa085d3d57a8774f07aedfa04f0"/></dir><file name="IndexController.php" hash="5337b897bb58eae4917a44abdf78368a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c8ca5697521cd2ce25fa03c36ca12403"/><file name="config.xml" hash="60fd366178a9cbd239966717eb51e384"/></dir><dir name="sql"><dir name="defcon2imaclean_setup"><file name="mysql4-install-1.0.0.php" hash="fe72157a9b937cc6efd029a0043b2da4"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="defcon2imaclean.xml" hash=""/></dir></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
+
<dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|