Layout_Unremove - Version 1.0.1

Version Notes

Tested with Magento 1.4.2.

Download this release

Release Info

Developer Magento Core Team
Extension Layout_Unremove
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0 to 1.0.1

app/code/local/Alanstormdotcom/Unremove/Model/Observer.php CHANGED
@@ -29,17 +29,19 @@ THE SOFTWARE.
29
  $update = $observer->getLayout()->getUpdate();
30
  $original_updates = $update->asArray();
31
  $update->resetUpdates();
 
 
 
32
  foreach($original_updates as $s_xml_update)
33
  {
34
- $s_xml_update = $this->_processUnremoveNodes($s_xml_update);
35
  $update->addUpdate($s_xml_update);
36
- }
37
  }
38
 
39
- protected function _processUnremoveNodes($string)
40
  {
41
  $o_xml_update = $this->_getSimplexmlFromFragment($string);
42
- $to_unremove = $this->_getUnremoveNames($o_xml_update);
43
  $nodes = $o_xml_update->xpath('//remove');
44
  foreach($nodes as $node)
45
  {
29
  $update = $observer->getLayout()->getUpdate();
30
  $original_updates = $update->asArray();
31
  $update->resetUpdates();
32
+
33
+ $to_unremove = $this->_getUnremoveNames($this->_getSimplexmlFromFragment(implode('',$original_updates)));
34
+
35
  foreach($original_updates as $s_xml_update)
36
  {
37
+ $s_xml_update = $this->_processUnremoveNodes($s_xml_update, $to_unremove);
38
  $update->addUpdate($s_xml_update);
39
+ }
40
  }
41
 
42
+ protected function _processUnremoveNodes($string, $to_unremove)
43
  {
44
  $o_xml_update = $this->_getSimplexmlFromFragment($string);
 
45
  $nodes = $o_xml_update->xpath('//remove');
46
  foreach($nodes as $node)
47
  {
app/code/local/Alanstormdotcom/Unremove/etc/config.xml CHANGED
@@ -23,7 +23,7 @@ THE SOFTWARE.
23
  <config>
24
  <modules>
25
  <Alanstormdotcom_Unremove>
26
- <version>1.0.0</version>
27
  </Alanstormdotcom_Unremove>
28
  </modules>
29
  <global>
23
  <config>
24
  <modules>
25
  <Alanstormdotcom_Unremove>
26
+ <version>1.0.1</version>
27
  </Alanstormdotcom_Unremove>
28
  </modules>
29
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Layout_Unremove</name>
4
- <version>1.0</version>
5
  <stability>stable</stability>
6
  <license>MIT License</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Allows you to use "x-unremove" in local.xml to undo a block removal.</description>
11
  <notes>Tested with Magento 1.4.2.</notes>
12
  <authors><author><name>Alan Storm</name><user>auto-converted</user><email>astorm@alanstorm.com</email></author></authors>
13
- <date>2011-01-03</date>
14
- <time>19:16:01</time>
15
- <contents><target name="magelocal"><dir name="Alanstormdotcom"><dir name="Unremove"><dir name="etc"><file name="config.xml" hash="428920683aa902dab106a3610ead1738"/></dir><dir name="Model"><file name="Observer.php" hash="3428d1a7f1a942eb6e7761355e7e38b7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Alanstormdotcom_Unremove.xml" hash="0de8ee6e3514ee1c25976140005528b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Layout_Unremove</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>MIT License</license>
7
  <channel>community</channel>
10
  <description>Allows you to use "x-unremove" in local.xml to undo a block removal.</description>
11
  <notes>Tested with Magento 1.4.2.</notes>
12
  <authors><author><name>Alan Storm</name><user>auto-converted</user><email>astorm@alanstorm.com</email></author></authors>
13
+ <date>2011-01-04</date>
14
+ <time>23:25:24</time>
15
+ <contents><target name="magelocal"><dir name="Alanstormdotcom"><dir name="Unremove"><dir name="etc"><file name="config.xml" hash="540b65897402268921278f0a1ad78bee"/></dir><dir name="Model"><file name="Observer.php" hash="6c9f10fede8e6b1b6cf2e2d8c2f1b84b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Alanstormdotcom_Unremove.xml" hash="0de8ee6e3514ee1c25976140005528b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>