Config_XML_Browser - Version 1.0.2

Version Notes

Fixed PHP 5.4 compatibility

Download this release

Release Info

Developer Alexander Egelsky
Extension Config_XML_Browser
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/Bricks/Xmlbrowser/Helper/Data.php CHANGED
@@ -29,14 +29,14 @@ class Bricks_Xmlbrowser_Helper_Data extends Mage_Core_Helper_Data
29
  return $this;
30
  }
31
 
32
- public function searchFiles($dir, $str, $filesList = array()) {
33
  $dir = rtrim($dir, '\\\/').DS;
34
 
35
  $files = scandir($dir);
36
  foreach ($files as $file) {
37
  if (is_dir($dir.$file)) {
38
  if (($file != '.') && ($file != '..')) {
39
- $this->searchFiles($dir.$file, $str, &$filesList);
40
  }
41
  } else {
42
  $needToSearch = true;
29
  return $this;
30
  }
31
 
32
+ public function searchFiles($dir, $str, &$filesList = array()) {
33
  $dir = rtrim($dir, '\\\/').DS;
34
 
35
  $files = scandir($dir);
36
  foreach ($files as $file) {
37
  if (is_dir($dir.$file)) {
38
  if (($file != '.') && ($file != '..')) {
39
+ $this->searchFiles($dir.$file, $str, $filesList);
40
  }
41
  } else {
42
  $needToSearch = true;
app/code/community/Bricks/Xmlbrowser/controllers/Adminhtml/ReportController.php CHANGED
@@ -56,7 +56,7 @@ class Bricks_Xmlbrowser_Adminhtml_ReportController extends Mage_Adminhtml_Contro
56
  ->setCaseSensitive($searchCaseSensitive);
57
 
58
  foreach ($searchPlaces as $place) {
59
- $helper->searchFiles($place, $searchString, &$files);
60
  }
61
 
62
  if ($numFound = count($files)) {
56
  ->setCaseSensitive($searchCaseSensitive);
57
 
58
  foreach ($searchPlaces as $place) {
59
+ $helper->searchFiles($place, $searchString, $files);
60
  }
61
 
62
  if ($numFound = count($files)) {
app/design/adminhtml/default/default/template/report/xmlbrowser/preparesearch.phtml CHANGED
@@ -43,20 +43,20 @@ function checkAll(name, checked)
43
  <div>
44
  <h4><?=$this->__('Search inside')?> ( <a href="javascript:void(0);" onclick="checkAll('search_where',true);return false;"><?=$this->__('Check All')?></a>, <a href="javascript:void(0);" onclick="checkAll('search_where',false);return false;"><?=$this->__('Check None')?></a> ) </h4>
45
  <?php $i = 0; foreach ($helper->getSearchPlaces() as $place): ?>
46
- <input type="checkbox" class="search_where <?=(++$i == count($helper->getSearchPlaces()))? 'validate-one-required': ''?>" name="search_where[]" value="<?=$place['path']?>" checked="checked">&nbsp; <?=$place['label']?><br>
47
  <?php endforeach; ?>
48
  <br>
49
  </div>
50
  <div>
51
  <h4><?=$this->__('Search for file type')?> ( <a href="javascript:void(0);" onclick="checkAll('search_filetype',true);return false;"><?=$this->__('Check All')?></a>, <a href="javascript:void(0);" onclick="checkAll('search_filetype',false);return false;"><?=$this->__('Check None')?></a> ) </h4>
52
  <?php $i = 0; foreach ($helper->getFileTypes() as $item): ?>
53
- <input type="checkbox" class="search_filetype <?=(++$i == count($helper->getFileTypes()))? 'validate-one-required': ''?>" name="search_filetype[]" value="<?=$item['extension']?>" checked="checked">&nbsp; <?=$item['label']?><br>
54
  <?php endforeach; ?>
55
  <br>
56
  </div>
57
  <br><br>
58
  <div style="margin-bottom: 30px;">
59
- <input type="checkbox" name="search_case_sensitive" value="1">&nbsp; <?=$this->__('Search case sensitive')?><br>
60
  <br>
61
  </div>
62
  <input name="form_key" type="hidden" value="<?= Mage::getSingleton('core/session')->getFormKey(); ?>">
43
  <div>
44
  <h4><?=$this->__('Search inside')?> ( <a href="javascript:void(0);" onclick="checkAll('search_where',true);return false;"><?=$this->__('Check All')?></a>, <a href="javascript:void(0);" onclick="checkAll('search_where',false);return false;"><?=$this->__('Check None')?></a> ) </h4>
45
  <?php $i = 0; foreach ($helper->getSearchPlaces() as $place): ?>
46
+ <label><input type="checkbox" class="search_where <?=(++$i == count($helper->getSearchPlaces()))? 'validate-one-required-by-name': ''?>" name="search_where[]" value="<?=$place['path']?>" checked="checked">&nbsp; <?=$place['label']?></label><br>
47
  <?php endforeach; ?>
48
  <br>
49
  </div>
50
  <div>
51
  <h4><?=$this->__('Search for file type')?> ( <a href="javascript:void(0);" onclick="checkAll('search_filetype',true);return false;"><?=$this->__('Check All')?></a>, <a href="javascript:void(0);" onclick="checkAll('search_filetype',false);return false;"><?=$this->__('Check None')?></a> ) </h4>
52
  <?php $i = 0; foreach ($helper->getFileTypes() as $item): ?>
53
+ <label><input type="checkbox" class="search_filetype <?=(++$i == count($helper->getFileTypes()))? 'validate-one-required-by-name': ''?>" name="search_filetype[]" value="<?=$item['extension']?>" checked="checked">&nbsp; <?=$item['label']?></label><br>
54
  <?php endforeach; ?>
55
  <br>
56
  </div>
57
  <br><br>
58
  <div style="margin-bottom: 30px;">
59
+ <label><input type="checkbox" name="search_case_sensitive" value="1">&nbsp; <?=$this->__('Search case sensitive')?></label><br>
60
  <br>
61
  </div>
62
  <input name="form_key" type="hidden" value="<?= Mage::getSingleton('core/session')->getFormKey(); ?>">
app/design/adminhtml/default/default/template/report/xmlbrowser/search.phtml CHANGED
@@ -11,12 +11,8 @@
11
  */
12
  ?>
13
 
14
- <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>index.php?c=auto&amp;f=,prototype/prototype.js" ></script>
15
- <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>index.php?c=auto&amp;f=,extjs/ext-tree.js,extjs/ext-tree-checkbox.js" ></script>
16
  <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>mage/adminhtml/form.js"></script>
17
 
18
- <link rel="stylesheet" type="text/css" href="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>extjs/resources/css/ext-all.css" />
19
-
20
  <script type="text/javascript">
21
  Event.observe(window, 'load', function() {
22
  window.xmlbrowserForm = new varienForm('xmlbrowser_search_form');
11
  */
12
  ?>
13
 
 
 
14
  <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>mage/adminhtml/form.js"></script>
15
 
 
 
16
  <script type="text/javascript">
17
  Event.observe(window, 'load', function() {
18
  window.xmlbrowserForm = new varienForm('xmlbrowser_search_form');
app/design/adminhtml/default/default/template/report/xmlbrowser/view.phtml CHANGED
@@ -11,18 +11,6 @@
11
  */
12
  ?>
13
 
14
- <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>index.php?c=auto&amp;f=,prototype/prototype.js" ></script>
15
- <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>index.php?c=auto&amp;f=,extjs/ext-tree.js,extjs/ext-tree-checkbox.js" ></script>
16
- <script type="text/javascript" src="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>mage/adminhtml/form.js"></script>
17
-
18
- <link rel="stylesheet" type="text/css" href="<?=Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>extjs/resources/css/ext-all.css" />
19
-
20
- <script type="text/javascript">
21
- Event.observe(window, 'load', function() {
22
- window.xmlbrowserForm = new varienForm('xmlbrowser_search_form');
23
- });
24
- </script>
25
-
26
  <style type="text/css">
27
  .span-matched { font-weight: bold; background-color: #6EC462; }
28
  </style>
11
  */
12
  ?>
13
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  <style type="text/css">
15
  .span-matched { font-weight: bold; background-color: #6EC462; }
16
  </style>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Config_XML_Browser</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
@@ -26,7 +26,7 @@ This is a "MUST HAVE!" extension for beginners and it is very useful for profess
26
  <description>No changes to the core needed,&#xD;
27
  no dependent modules.&#xD;
28
  &#xD;
29
- Tested on Mage 1.2-1.6.&#xD;
30
  &#xD;
31
  Lots of code, but small amount of Mage key code,&#xD;
32
  so it should work on future releases too.&#xD;
@@ -36,12 +36,11 @@ and some were too lazy to do it.&#xD;
36
  I just needed it more than others I guess.&#xD;
37
  &#xD;
38
  I've spent a lot of time to build it, so I want to share it with community.</description>
39
- <notes>Stable v1.0.1&#xD;
40
- Fixed Magento Connect v1.0 installation</notes>
41
- <authors><author><name>Alexander Egelsky</name><user>auto-converted</user><email>alexegelsky@gmail.com</email></author></authors>
42
- <date>2012-05-27</date>
43
- <time>09:50:25</time>
44
- <contents><target name="magecommunity"><dir name="Bricks"><dir name="Xmlbrowser"><dir name="Block"><dir name="Adminhtml"><file name="Preparesearch.php" hash="7bd4be0c93c86bf145f5de5f3f25b858"/><file name="Report.php" hash="d44009b79612bc73572a695d7ebb6111"/><file name="Search.php" hash="afb6926b383779ef0863c7932c3c2bbf"/><file name="View.php" hash="14bc8713ce5e51bdc57b2ba464a9c376"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4e77299a8b1efaa1584ee3f6cfc18792"/></dir><dir name="Model"><file name="Config.php" hash="36d3fc95ce0301ff1e31c43eceec712e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ReportController.php" hash="e78929bf408e0fe41951e247d8211c39"/></dir></dir><dir name="etc"><file name="config.xml" hash="39e8e72aa9783a84414b5d0c6e1ee5f5"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="report"><dir name="xmlbrowser"><file name="preparesearch.phtml" hash="7c832c347a654a0fe658096d06a3e279"/><file name="report.phtml" hash="897d4337967c9af25699650914d24274"/><file name="search.phtml" hash="370385597d4cbbfc10bcc22c13d7cbf2"/><file name="view.phtml" hash="d58ff40a6223de39d1b6aee60e97f11d"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bricks_Xmlbrowser.xml" hash="f59c9995c9d4b6144b4698815b316d1d"/></dir></target></contents>
45
  <compatible/>
46
- <dependencies/>
47
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Config_XML_Browser</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
  <channel>community</channel>
26
  <description>No changes to the core needed,&#xD;
27
  no dependent modules.&#xD;
28
  &#xD;
29
+ Tested on Mage 1.2-1.7.&#xD;
30
  &#xD;
31
  Lots of code, but small amount of Mage key code,&#xD;
32
  so it should work on future releases too.&#xD;
36
  I just needed it more than others I guess.&#xD;
37
  &#xD;
38
  I've spent a lot of time to build it, so I want to share it with community.</description>
39
+ <notes>Fixed PHP 5.4 compatibility</notes>
40
+ <authors><author><name>Alexander Egelsky</name><user>aegelsky</user><email>alexegelsky@gmail.com</email></author></authors>
41
+ <date>2013-09-14</date>
42
+ <time>12:36:20</time>
43
+ <contents><target name="magecommunity"><dir name="Bricks"><dir name="Xmlbrowser"><dir name="Block"><dir name="Adminhtml"><file name="Preparesearch.php" hash="7bd4be0c93c86bf145f5de5f3f25b858"/><file name="Report.php" hash="d44009b79612bc73572a695d7ebb6111"/><file name="Search.php" hash="afb6926b383779ef0863c7932c3c2bbf"/><file name="View.php" hash="14bc8713ce5e51bdc57b2ba464a9c376"/></dir></dir><dir name="Helper"><file name="Data.php" hash="f5a325e479780564b830a87fee442b09"/></dir><dir name="Model"><file name="Config.php" hash="36d3fc95ce0301ff1e31c43eceec712e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ReportController.php" hash="ca1332058a935ba64b999449d106890e"/></dir></dir><dir name="etc"><file name="config.xml" hash="39e8e72aa9783a84414b5d0c6e1ee5f5"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="report"><dir name="xmlbrowser"><file name="preparesearch.phtml" hash="11443c53db2e2ac6d20fe54e34424772"/><file name="report.phtml" hash="897d4337967c9af25699650914d24274"/><file name="search.phtml" hash="0a5e9ca600de698d41814dea7336dd87"/><file name="view.phtml" hash="be010bf603f89603d43ed6de0241b853"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bricks_Xmlbrowser.xml" hash="f59c9995c9d4b6144b4698815b316d1d"/></dir></target></contents>
 
44
  <compatible/>
45
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
46
  </package>