PSystem_OptimizationHead - Version 1.0.1

Version Notes

This module was tested in Magento Commerce version 1.4.0.1 and 1.5.0.1, and work in this version smoothly.

Download this release

Release Info

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


Code changes from version 1.0.0 to 1.0.1

app/code/community/PSystem/OptimizationHead/Block/Head.php CHANGED
@@ -54,8 +54,11 @@ class PSystem_OptimizationHead_Block_Head extends PSystem_OptimizationHead_Block
54
 
55
  $designPackage = Mage::getDesign();
56
  foreach ($lines as $cond => $types) {
 
57
  foreach ($types as $type => $params) {
 
58
  foreach ($params as $param => $items) {
 
59
  foreach ($items as $itemKey => $itemVal) {
60
  if ($type == 'js') {
61
  if (!isset($lines[$cond][$type][$param]['combine']))
54
 
55
  $designPackage = Mage::getDesign();
56
  foreach ($lines as $cond => $types) {
57
+ if (!is_array($types)) continue;
58
  foreach ($types as $type => $params) {
59
+ if (!is_array($params)) continue;
60
  foreach ($params as $param => $items) {
61
+ if (!is_array($items)) continue;
62
  foreach ($items as $itemKey => $itemVal) {
63
  if ($type == 'js') {
64
  if (!isset($lines[$cond][$type][$param]['combine']))
app/code/community/PSystem/OptimizationHead/Model/Observer.php CHANGED
@@ -9,7 +9,7 @@
9
  /**
10
  * @see PSystemHtmlMinify
11
  */
12
- require_once 'PSystem/OptimizationHead/lib/PSystemHtmlMinify.php';
13
 
14
  /**
15
  * Pascal Optimization observer
@@ -26,7 +26,7 @@ class PSystem_OptimizationHead_Model_Observer {
26
  * @param Varien_Event_Observer $event
27
  */
28
  public function postDispatch(Varien_Event_Observer $event) {
29
- if (Mage::getStoreConfig('psoptimizationhead/html/disable'))
30
  return;
31
 
32
  /* @var $controller Mage_Core_Controller_Varien_Action */
9
  /**
10
  * @see PSystemHtmlMinify
11
  */
12
+ require_once dirname(__FILE__).'/../lib/PSystemHtmlMinify.php';
13
 
14
  /**
15
  * Pascal Optimization observer
26
  * @param Varien_Event_Observer $event
27
  */
28
  public function postDispatch(Varien_Event_Observer $event) {
29
+ if (!Mage::getStoreConfig('psoptimizationhead/html/disable'))
30
  return;
31
 
32
  /* @var $controller Mage_Core_Controller_Varien_Action */
app/code/community/PSystem/OptimizationHead/etc/system.xml CHANGED
@@ -102,7 +102,7 @@
102
  <sort_order>15</sort_order>
103
  <fields>
104
  <disable>
105
- <label>Compress html off</label>
106
  <comment><![CDATA[default: no]]></comment>
107
  <frontend_type>select</frontend_type>
108
  <source_model>adminhtml/system_config_source_yesno</source_model>
102
  <sort_order>15</sort_order>
103
  <fields>
104
  <disable>
105
+ <label>Compress html (BETA)</label>
106
  <comment><![CDATA[default: no]]></comment>
107
  <frontend_type>select</frontend_type>
108
  <source_model>adminhtml/system_config_source_yesno</source_model>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>PSystem_OptimizationHead</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>This module combine (merge) your css and js files. Additionaly this module compress your files by gzip and minify. In addition this module compress your html.</description>
11
  <notes>This module was tested in Magento Commerce version 1.4.0.1 and 1.5.0.1, and work in this version smoothly.</notes>
12
  <authors><author><name>Pascal System</name><user>auto-converted</user><email>info@pascalsystem.pl</email></author></authors>
13
- <date>2011-03-28</date>
14
- <time>22:37:05</time>
15
- <contents><target name="mage"><dir name="js"><dir name="pascalsystem"><file name="combine.php" hash="ac34bd3b233b17472565872470e5c8f8"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PSystem_OptimizationHead.xml" hash="c275af0fe2e0a37029a739101d980241"/></dir></target><target name="magecommunity"><dir name="PSystem"><dir name="OptimizationHead"><dir name="Block"><file name="Head.php" hash="80fbc8fdcc33ab57bcfe9c986658e623"/><dir name="Head"><file name="Abstract.php" hash="1a4757995d9a9bdbbea1ed9b3f16f715"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4c98ce2468f6321c3faf18740ef703f7"/><file name="config.xml" hash="5d260c92bd8136cd80022e0b0559bad0"/><file name="system.xml" hash="8af6addcbcb3f5796e2b5f26075981a5"/></dir><dir name="lib"><file name="JSMin.php" hash="5716028656e1d402c98a43ee18648dd3"/><file name="PSystemHtmlMinify.php" hash="2d841f14aa166efb568b1aeee3cef522"/><dir name="Minify"><file name="CommentPreserver.php" hash="86bab05265083b57935503bdd735ce74"/><file name="CSS.php" hash="cdeb49c0f35a6cef166c6cfee7f1dd95"/><dir name="CSS"><file name="Compressor.php" hash="b514fdc1f7c010031631994c77a18bf6"/><file name="UriRewriter.php" hash="5ab5dfdb489e28a39a4e9d6ad70117d6"/></dir></dir></dir><dir name="Model"><file name="Observer.php" hash="1f6e674fd06697a48a1f02b153d53a13"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><package><name>PSystem_Base</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>PSystem_OptimizationHead</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
10
  <description>This module combine (merge) your css and js files. Additionaly this module compress your files by gzip and minify. In addition this module compress your html.</description>
11
  <notes>This module was tested in Magento Commerce version 1.4.0.1 and 1.5.0.1, and work in this version smoothly.</notes>
12
  <authors><author><name>Pascal System</name><user>auto-converted</user><email>info@pascalsystem.pl</email></author></authors>
13
+ <date>2011-04-17</date>
14
+ <time>19:31:14</time>
15
+ <contents><target name="mage"><dir name="js"><dir name="pascalsystem"><file name="combine.php" hash="ac34bd3b233b17472565872470e5c8f8"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PSystem_OptimizationHead.xml" hash="c275af0fe2e0a37029a739101d980241"/></dir></target><target name="magecommunity"><dir name="PSystem"><dir name="OptimizationHead"><dir name="Block"><file name="Head.php" hash="54987ec3eb837a7b23f52fc78509927d"/><dir name="Head"><file name="Abstract.php" hash="1a4757995d9a9bdbbea1ed9b3f16f715"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="4c98ce2468f6321c3faf18740ef703f7"/><file name="config.xml" hash="5d260c92bd8136cd80022e0b0559bad0"/><file name="system.xml" hash="90812fc21bd2172b2c9cce74aa25ae83"/></dir><dir name="lib"><file name="JSMin.php" hash="5716028656e1d402c98a43ee18648dd3"/><file name="PSystemHtmlMinify.php" hash="2d841f14aa166efb568b1aeee3cef522"/><dir name="Minify"><file name="CommentPreserver.php" hash="86bab05265083b57935503bdd735ce74"/><file name="CSS.php" hash="cdeb49c0f35a6cef166c6cfee7f1dd95"/><dir name="CSS"><file name="Compressor.php" hash="b514fdc1f7c010031631994c77a18bf6"/><file name="UriRewriter.php" hash="5ab5dfdb489e28a39a4e9d6ad70117d6"/></dir></dir></dir><dir name="Model"><file name="Observer.php" hash="5f364fa85796bf7024dde9e1435d15c9"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><package><name>PSystem_Base</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
  </package>