Skip to content

Commit 7685eee

Browse files
committed
Merge branch 'release/1.5.0'
2 parents a85887e + 00b1b5a commit 7685eee

File tree

24 files changed

+327
-289
lines changed

24 files changed

+327
-289
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This extension provides some debbuging functionality for Magento.
44

55
Facts
66
-----
7-
- version: 1.4.0
7+
- version: 1.5.0
88
- [extension on GitHub](https://github.com/firegento/firegento)
99

1010

src/app/code/community/FireGento/Debug/Block/Diagnostic/CheckEvents.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
* @version 1.2.0
2121
*/
22+
2223
/**
2324
* CheckEvents Grid Container
2425
*
@@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckEvents
3435
{
3536
/**
3637
* Class constructor
37-
*
38-
* @return void
3938
*/
4039
public function __construct()
4140
{

src/app/code/community/FireGento/Debug/Block/Diagnostic/CheckEvents/Grid.php

Lines changed: 62 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
* @version 1.2.0
2121
*/
22+
2223
/**
2324
* CheckEvents Grid
2425
*
@@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckEvents_Grid
3435
{
3536
/**
3637
* Class constructor
37-
*
38-
* @return void
3938
*/
4039
public function __construct()
4140
{
@@ -44,7 +43,7 @@ public function __construct()
4443
$this->setDefaultSort('event');
4544
$this->setDefaultDir('ASC');
4645
//$this->_filterVisibility = false;
47-
$this->_pagerVisibility = false;
46+
$this->_pagerVisibility = false;
4847
}
4948

5049
/**
@@ -69,38 +68,38 @@ protected function _prepareColumns()
6968
{
7069
$baseUrl = $this->getUrl();
7170

72-
$this->addColumn(
73-
'module',
74-
array(
75-
'header' => $this->__('Module Name'),
76-
'align' => 'left',
77-
'index' => 'module',
78-
'sortable' => false,
79-
'filter' => false
80-
)
81-
);
82-
$this->addColumn(
83-
'code_pool',
84-
array(
85-
'header' => $this->__('Code Pool'),
86-
'align' => 'left',
87-
'index' => 'code_pool',
88-
'width' => '80px',
89-
'sortable' => true,
90-
'type' => 'options',
91-
'options' => Mage::helper('firegento')->getHashCodePools(),
92-
'filter_condition_callback' => array($this, '_codePoolFilter'),
93-
)
71+
$this->addColumn(
72+
'module',
73+
array(
74+
'header' => $this->__('Module Name'),
75+
'align' => 'left',
76+
'index' => 'module',
77+
'sortable' => false,
78+
'filter' => false
79+
)
80+
);
81+
$this->addColumn(
82+
'code_pool',
83+
array(
84+
'header' => $this->__('Code Pool'),
85+
'align' => 'left',
86+
'index' => 'code_pool',
87+
'width' => '80px',
88+
'sortable' => true,
89+
'type' => 'options',
90+
'options' => Mage::helper('firegento')->getHashCodePools(),
91+
'filter_condition_callback' => array($this, '_codePoolFilter'),
92+
)
9493
);
9594

9695
$this->addColumn(
9796
'event',
9897
array(
99-
'header' => $this->__('Event'),
100-
'align' => 'left',
101-
'index' => 'event',
102-
'width' => '50%',
103-
'sortable' => true,
98+
'header' => $this->__('Event'),
99+
'align' => 'left',
100+
'index' => 'event',
101+
'width' => '50%',
102+
'sortable' => true,
104103
'filter_condition_callback' => array($this, '_eventFilter'),
105104
)
106105
);
@@ -113,59 +112,58 @@ protected function _prepareColumns()
113112
'width' => '30%',
114113
'sortable' => false,
115114
'renderer' => 'firegento/diagnostic_renderer_paragraph',
116-
'filter' => false
115+
'filter' => false
117116
)
118117
);
119118

120119

121-
122120
return parent::_prepareColumns();
123121
}
124122

125123
/**
126124
* Filter code pool collection
127125
*
128-
* @param Varien_Data_Collection $collection
126+
* @param Varien_Data_Collection $collection
129127
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
130128
*/
131-
protected function _codePoolFilter($collection, $column)
132-
{
133-
if (!$value = $column->getFilter()->getValue()) {
134-
return $this;
129+
protected function _codePoolFilter($collection, $column)
130+
{
131+
if (!$value = $column->getFilter()->getValue()) {
132+
return $this;
135133
}
136134

137-
$collection = $this->getCollection();
135+
$collection = $this->getCollection();
138136

139-
foreach($collection as $itemKey=>$item) {
140-
if($value!=$item->getCodePool()) {
137+
foreach ($collection as $itemKey => $item) {
138+
if ($value != $item->getCodePool()) {
141139
$collection->removeItemByKey($itemKey);
142140
}
143-
}
144-
145-
return $this;
141+
}
142+
143+
return $this;
146144
}
147145

148-
/**
149-
* Filter event collection
150-
*
151-
* @param Varien_Data_Collection $collection
152-
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
153-
*/
154-
protected function _eventFilter($collection, $column)
155-
{
156-
if (!$value = $column->getFilter()->getValue()) {
157-
return $this;
158-
}
159-
160-
$collection = $this->getCollection();
161-
162-
foreach($collection as $itemKey=>$item) {
163-
if(strpos($item->getEvent(),$value)===false) {
164-
$collection->removeItemByKey($itemKey);
165-
}
166-
}
167-
168-
return $this;
146+
/**
147+
* Filter event collection
148+
*
149+
* @param Varien_Data_Collection $collection
150+
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
151+
*/
152+
protected function _eventFilter($collection, $column)
153+
{
154+
if (!$value = $column->getFilter()->getValue()) {
155+
return $this;
156+
}
157+
158+
$collection = $this->getCollection();
159+
160+
foreach ($collection as $itemKey => $item) {
161+
if (strpos($item->getEvent(), $value) === false) {
162+
$collection->removeItemByKey($itemKey);
163+
}
164+
}
165+
166+
return $this;
169167
}
170168

171169
/**

src/app/code/community/FireGento/Debug/Block/Diagnostic/CheckModules.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
* @version 1.2.0
2121
*/
22+
2223
/**
2324
* CheckModules Grid Container
2425
*
@@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckModules
3435
{
3536
/**
3637
* Class constructor
37-
*
38-
* @return void;
3938
*/
4039
public function __construct()
4140
{

src/app/code/community/FireGento/Debug/Block/Diagnostic/CheckModules/Grid.php

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
* @version 1.2.0
2121
*/
22+
2223
/**
2324
* CheckRewrites Grid
2425
*
@@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckModules_Grid
3435
{
3536
/**
3637
* Class constructor
37-
*
38-
* @return void
3938
*/
4039
public function __construct()
4140
{
@@ -44,7 +43,7 @@ public function __construct()
4443
$this->setDefaultSort('name');
4544
$this->setDefaultDir('ASC');
4645
$this->_filterVisibility = false;
47-
$this->_pagerVisibility = false;
46+
$this->_pagerVisibility = false;
4847
}
4948

5049
/**
@@ -154,11 +153,11 @@ protected function _prepareColumns()
154153
$this->addColumn(
155154
'action',
156155
array(
157-
'header' => Mage::helper('sales')->__('Action'),
158-
'width' => '50px',
159-
'type' => 'action',
160-
'getter' => 'getName',
161-
'actions' => array(
156+
'header' => Mage::helper('sales')->__('Action'),
157+
'width' => '50px',
158+
'type' => 'action',
159+
'getter' => 'getName',
160+
'actions' => array(
162161
array(
163162
'caption' => $this->__('Activate/Deactivate'),
164163
'url' => array('base' => '*/*/activation'),
@@ -204,9 +203,9 @@ public function checkActivationLink($value, $row)
204203
public function decorateTrueFalse($value, $row)
205204
{
206205
if ($row->getActive()) {
207-
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
206+
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
208207
} else {
209-
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
208+
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
210209
}
211210

212211
return $cell;
@@ -222,9 +221,9 @@ public function decorateTrueFalse($value, $row)
222221
public function decoratePathExists($value, $row)
223222
{
224223
if ($row->getPathExists()) {
225-
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
224+
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
226225
} else {
227-
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
226+
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
228227
}
229228

230229
return $cell;
@@ -240,9 +239,9 @@ public function decoratePathExists($value, $row)
240239
public function decorateConfigExists($value, $row)
241240
{
242241
if ($row->getConfigExists()) {
243-
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
242+
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
244243
} else {
245-
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
244+
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
246245
}
247246

248247
return $cell;
@@ -251,7 +250,7 @@ public function decorateConfigExists($value, $row)
251250
/**
252251
* Get row edit url
253252
*
254-
* @param Varien_Object $row Current row
253+
* @param Varien_Object $row Current row
255254
* @return string|boolean Row url | false = no url
256255
*/
257256
public function getRowUrl($row)

src/app/code/community/FireGento/Debug/Block/Diagnostic/CheckRewrites.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
* @version 1.2.0
2121
*/
22+
2223
/**
2324
* CheckRewrites Grid Container
2425
*
@@ -34,8 +35,6 @@ class FireGento_Debug_Block_Diagnostic_CheckRewrites
3435
{
3536
/**
3637
* Class constructor
37-
*
38-
* @return void
3938
*/
4039
public function __construct()
4140
{

src/app/code/community/FireGento/Debug/Block/Diagnostic/CheckRewrites/Grid.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
2020
* @version 1.2.0
2121
*/
22+
2223
/**
2324
* CheckRewrites Grid
2425
*
@@ -34,15 +35,13 @@ class FireGento_Debug_Block_Diagnostic_CheckRewrites_Grid
3435
{
3536
/**
3637
* Class constructor
37-
*
38-
* @return void
3938
*/
4039
public function __construct()
4140
{
4241
parent::__construct();
4342
$this->setId('check_rewrites_grid');
4443
$this->_filterVisibility = false;
45-
$this->_pagerVisibility = false;
44+
$this->_pagerVisibility = false;
4645
}
4746

4847
/**
@@ -122,9 +121,9 @@ public function decorateStatus($value, $row)
122121
{
123122
$class = '';
124123
if ($row->getStatus()) {
125-
$cell = '<span class="grid-severity-notice"><span>'.$value.'</span></span>';
124+
$cell = '<span class="grid-severity-notice"><span>' . $value . '</span></span>';
126125
} else {
127-
$cell = '<span class="grid-severity-critical"><span>'.$value.'</span></span>';
126+
$cell = '<span class="grid-severity-critical"><span>' . $value . '</span></span>';
128127
}
129128

130129
return $cell;

0 commit comments

Comments
 (0)