System_Configuration_Search - Version 0.6.1

Version Notes

No Notes

Download this release

Release Info

Developer Magento Core Team
Extension System_Configuration_Search
Version 0.6.1
Comparing to
See all releases


Code changes from version 0.6.0 to 0.6.1

app/code/local/Alanstormdotcom/Systemsearch/Block/Template.php CHANGED
@@ -2,7 +2,31 @@
2
 
3
  class Alanstormdotcom_Systemsearch_Block_Template extends Mage_Core_Block_Template
4
  {
5
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  public function fetchView($fileName)
7
  {
8
  //ignores file name, just uses a simple include with template name
2
 
3
  class Alanstormdotcom_Systemsearch_Block_Template extends Mage_Core_Block_Template
4
  {
5
+ protected function _checkValidScriptPath($scriptPath)
6
+ {
7
+ $paths_to_check = array(Mage::getBaseDir('design'),Mage::getModuleDir('', 'Alanstormdotcom_Systemsearch'));
8
+ $valid = false;
9
+ foreach($paths_to_check as $path)
10
+ {
11
+ if(strpos($scriptPath, realpath($path)) === 0)
12
+ {
13
+ $valid = true;
14
+ }
15
+ }
16
+ return $valid;
17
+ }
18
+
19
+ public function setScriptPath($dir)
20
+ {
21
+ $scriptPath = realpath($dir);
22
+ if ($this->_checkValidScriptPath($scriptPath)) {
23
+ $this->_viewDir = $dir;
24
+ } else {
25
+ Mage::log('Not valid script path:' . $dir, Zend_Log::CRIT, null, null, true);
26
+ }
27
+ return $this;
28
+ }
29
+
30
  public function fetchView($fileName)
31
  {
32
  //ignores file name, just uses a simple include with template name
app/code/local/Alanstormdotcom/Systemsearch/phtml/prototype.phtml CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  <script type="text/javascript">
2
  var Alanstormdotcom_Systemsearch = Class.create({
3
  pointToItem:function(area,label)
@@ -38,13 +42,14 @@
38
  },
39
  getArrow:function(direction)
40
  {
 
41
  direction = direction ? direction : 'left';
42
  Alanstormdotcom_Systemsearch.arrowCount++;
43
  var arrow_id = 'alanstormdotcom_alanstormdotcomsystemsearch_arrow'+'_'+Alanstormdotcom_Systemsearch.arrowCount;
44
  if(!$(arrow_id))
45
  {
46
  var arrow = new Element('img');
47
- arrow.writeAttribute({'id':arrow_id,'src':'/skin/adminhtml/default/default/images/alanstormdotcom/'+direction+'.gif'});
48
  arrow.setStyle({'display':'none'});
49
  arrow.makePositioned();
50
  arrow.addClassName('alanstormdotcom_alanstormdotcomsystemsearch_arrows');
1
+ <?php
2
+ $info = new stdClass();
3
+ $info->baseSkinUrl = Mage::getBaseUrl('skin');
4
+ ?>
5
  <script type="text/javascript">
6
  var Alanstormdotcom_Systemsearch = Class.create({
7
  pointToItem:function(area,label)
42
  },
43
  getArrow:function(direction)
44
  {
45
+ var info = <?php echo Mage::helper('core')->jsonEncode($info);?>;
46
  direction = direction ? direction : 'left';
47
  Alanstormdotcom_Systemsearch.arrowCount++;
48
  var arrow_id = 'alanstormdotcom_alanstormdotcomsystemsearch_arrow'+'_'+Alanstormdotcom_Systemsearch.arrowCount;
49
  if(!$(arrow_id))
50
  {
51
  var arrow = new Element('img');
52
+ arrow.writeAttribute({'id':arrow_id,'src':info.baseSkinUrl + 'adminhtml/default/default/images/alanstormdotcom/'+direction+'.gif'});
53
  arrow.setStyle({'display':'none'});
54
  arrow.makePositioned();
55
  arrow.addClassName('alanstormdotcom_alanstormdotcomsystemsearch_arrows');
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>System_Configuration_Search</name>
4
- <version>0.6.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://www.opensource.org/licenses/mit-license.php">MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension installs a search form that allows you to quickly find System Configuration fields.</summary>
10
  <description>This extension installs a search form that allows you to quickly find System Configuration fields.</description>
11
- <notes>Repackaging for changes to Magento Connect.</notes>
12
  <authors><author><name>Alan Storm</name><user>auto-converted</user><email>astorm@alanstorm.com</email></author></authors>
13
- <date>2011-11-18</date>
14
- <time>17:04:20</time>
15
- <contents><target name="magelocal"><dir name="Alanstormdotcom"><dir name="Systemsearch"><dir name="Block"><file name="Searchresults.php" hash="dcd5571a85c6ccdfbae1bc3930ef70b9"/><file name="Template.php" hash="208415bbec76a0e942082a4b97df60c1"/></dir><dir name="Helper"><file name="Data.php" hash="0fcf7e17144034b624adcf6070698bf2"/><file name="Jsonconfigsearch.php" hash="31f782f1be96f11b14a24ac9d49aaaa0"/><file name="Simplexml.php" hash="1e1707137c6af4866b2f02d018b0b405"/></dir><dir name="Model"><file name="Configsearch.php" hash="6e9b342844636a36223abb37cbf3cb81"/><file name="Observer.php" hash="bc1c8420368b79254850a15bb05b10da"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AlanstormdotcomsystemsearchController.php" hash="6e68896b7cfc2da7df318218e2bf9e34"/></dir></dir><dir name="etc"><file name="config.xml" hash="c401b64df1f957161756a9ce135867e8"/></dir><dir name="images"><file name="left.gif" hash="c1da3e89cc4fb46463e32f9ca6a66d3e"/><file name="right.gif" hash="1214f3e4f3689a5bc4b8468f2a757910"/></dir><dir name="phtml"><file name="prototype.phtml" hash="ff57d1063e538ec5579b81b342c9f3ed"/><file name="results.phtml" hash="127f2400470f47a2b0b3c021a19a83ef"/><file name="searchform.phtml" hash="6d50fc769c3d046cd12d463385e5e57c"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Alanstormdotcom_Systemsearch.xml" hash="974e2e20ab0a6d2993dc196930136ddb"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="alanstormdotcom"><file name="left.gif" hash="c1da3e89cc4fb46463e32f9ca6a66d3e"/><file name="right.gif" hash="1214f3e4f3689a5bc4b8468f2a757910"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>System_Configuration_Search</name>
4
+ <version>0.6.1</version>
5
  <stability>stable</stability>
6
+ <license>MIT License</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension installs a search form that allows you to quickly find System Configuration fields.</summary>
10
  <description>This extension installs a search form that allows you to quickly find System Configuration fields.</description>
11
+ <notes>No Notes</notes>
12
  <authors><author><name>Alan Storm</name><user>auto-converted</user><email>astorm@alanstorm.com</email></author></authors>
13
+ <date>2011-12-06</date>
14
+ <time>22:46:12</time>
15
+ <contents><target name="magelocal"><dir name="Alanstormdotcom"><dir name="Systemsearch"><dir name="Block"><file name="Searchresults.php" hash="dcd5571a85c6ccdfbae1bc3930ef70b9"/><file name="Template.php" hash="8fedb670ba870ad3b948b429dc486cc9"/></dir><dir name="Helper"><file name="Data.php" hash="0fcf7e17144034b624adcf6070698bf2"/><file name="Jsonconfigsearch.php" hash="31f782f1be96f11b14a24ac9d49aaaa0"/><file name="Simplexml.php" hash="1e1707137c6af4866b2f02d018b0b405"/></dir><dir name="Model"><file name="Configsearch.php" hash="6e9b342844636a36223abb37cbf3cb81"/><file name="Observer.php" hash="bc1c8420368b79254850a15bb05b10da"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AlanstormdotcomsystemsearchController.php" hash="6e68896b7cfc2da7df318218e2bf9e34"/></dir></dir><dir name="etc"><file name="config.xml" hash="c401b64df1f957161756a9ce135867e8"/></dir><dir name="images"><file name="left.gif" hash="c1da3e89cc4fb46463e32f9ca6a66d3e"/><file name="right.gif" hash="1214f3e4f3689a5bc4b8468f2a757910"/></dir><dir name="phtml"><file name="prototype.phtml" hash="ed9b4dfaf14915693c209ee9aefb2d32"/><file name="results.phtml" hash="127f2400470f47a2b0b3c021a19a83ef"/><file name="searchform.phtml" hash="6d50fc769c3d046cd12d463385e5e57c"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Alanstormdotcom_Systemsearch.xml" hash="974e2e20ab0a6d2993dc196930136ddb"/></dir></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="alanstormdotcom"><file name="left.gif" hash="c1da3e89cc4fb46463e32f9ca6a66d3e"/><file name="right.gif" hash="1214f3e4f3689a5bc4b8468f2a757910"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>