PSystem_Base - Version 1.0.2

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_Base
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/community/PSystem/Base/Helper/Data.php CHANGED
@@ -3,7 +3,7 @@
3
* @category PSystem
4
* @package PSystem_Base
5
* @author Pascal System <info@pascalsystem.pl>
6
- * @version 1.0.1
7
*/
8
9
/**
@@ -12,7 +12,7 @@
12
* @category PSystem
13
* @package PSystem_Base
14
* @author Pascal System <info@pascalsystem.pl>
15
- * @version 1.0.1
16
*/
17
class PSystem_Base_Helper_Data extends Mage_Core_Helper_Abstract {
18
}
3
* @category PSystem
4
* @package PSystem_Base
5
* @author Pascal System <info@pascalsystem.pl>
6
+ * @version 1.0.0
7
*/
8
9
/**
12
* @category PSystem
13
* @package PSystem_Base
14
* @author Pascal System <info@pascalsystem.pl>
15
+ * @version 1.0.0
16
*/
17
class PSystem_Base_Helper_Data extends Mage_Core_Helper_Abstract {
18
}
app/code/community/PSystem/Base/Model/Observer.php CHANGED
@@ -1,55 +1,57 @@
1
- <?php
2
- /**
3
- * @category PSystem
4
- * @package PSystem_Base
5
- * @author Pascal System <info@pascalsystem.pl>
6
- * @version 1.0.1
7
- */
8
-
9
- /**
10
- * Pascal Base utility observer
11
- *
12
- * @category PSystem
13
- * @package PSystem_Base
14
- * @author Pascal System <info@pascalsystem.pl>
15
- * @version 1.0.1
16
- */
17
- class PSystem_Base_Model_Observer {
18
- /**
19
- * Observer post dispatching
20
- *
21
- * @param Varien_Event_Observer $event
22
- */
23
- public function postdispatch(Varien_Event_Observer $event) {
24
- /* @var $controller Mage_Core_Controller_Varien_Action */
25
- $controller = $event->getControllerAction();
26
- if (!$controller->getRequest()->getHeader('X-Requested-With')) {
27
- return;
28
- }
29
-
30
- $param = array();
31
-
32
- if (function_exists('apache_request_headers'))
33
- $headers = apache_request_headers();
34
- else
35
- $headers = getallheader();
36
- foreach ($headers as $headerName => $headerValue) {
37
- $headerName = strtolower($headerName);
38
- if (!preg_match('/pascalsystem(.*)/',$headerName,$regs))
39
- continue;
40
- $param[$regs[1]] = $headerValue;
41
- }
42
-
43
- $layout = Mage::app()->getLayout();
44
- $blocks = array();
45
- foreach ($param as $blockName => $selector) {
46
- $temp = $layout->getBlock($blockName);
47
- $blocks[$blockName] = array(
48
- 'selector' => $selector,
49
- 'html' => ($temp)?$temp->toHtml():''
50
- );
51
- }
52
- echo json_encode($blocks);
53
- exit;
54
- }
55
}
1
+ <?php
2
+ /**
3
+ * @category PSystem
4
+ * @package PSystem_Base
5
+ * @author Pascal System <info@pascalsystem.pl>
6
+ * @version 1.0.0
7
+ */
8
+
9
+ /**
10
+ * Pascal Base utility observer
11
+ *
12
+ * @category PSystem
13
+ * @package PSystem_Base
14
+ * @author Pascal System <info@pascalsystem.pl>
15
+ * @version 1.0.1
16
+ */
17
+ class PSystem_Base_Model_Observer {
18
+ /**
19
+ * Observer post dispatching
20
+ *
21
+ * @param Varien_Event_Observer $event
22
+ */
23
+ public function postdispatch(Varien_Event_Observer $event) {
24
+ /* @var $controller Mage_Core_Controller_Varien_Action */
25
+ $controller = $event->getControllerAction();
26
+ if (!$controller->getRequest()->getHeader('X-Requested-With')) {
27
+ return;
28
+ }
29
+
30
+ $param = array();
31
+
32
+ if (function_exists('apache_request_headers'))
33
+ $headers = apache_request_headers();
34
+ elseif (function_exists('getallheader'))
35
+ $headers = getallheader();
36
+ else
37
+ $headers = $_SERVER;
38
+ foreach ($headers as $headerName => $headerValue) {
39
+ $headerName = strtolower($headerName);
40
+ if (!preg_match('/pascalsystem(.*)/',$headerName,$regs))
41
+ continue;
42
+ $param[str_replace('_','.',$regs[1])] = $headerValue;
43
+ }
44
+
45
+ $layout = Mage::app()->getLayout();
46
+ $blocks = array();
47
+ foreach ($param as $blockName => $selector) {
48
+ $temp = $layout->getBlock($blockName);
49
+ $blocks[$blockName] = array(
50
+ 'selector' => $selector,
51
+ 'html' => ($temp)?$temp->toHtml():''
52
+ );
53
+ }
54
+ echo json_encode($blocks);
55
+ exit;
56
+ }
57
}
app/code/community/PSystem/Base/etc/config.xml CHANGED
@@ -4,13 +4,13 @@
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
- * @version 1.0.1
8
*/
9
-->
10
<config>
11
<modules>
12
<PSystem_Base>
13
- <version>1.0.1</version>
14
</PSystem_Base>
15
</modules>
16
<global>
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
+ * @version 1.0.0
8
*/
9
-->
10
<config>
11
<modules>
12
<PSystem_Base>
13
+ <version>1.0.0</version>
14
</PSystem_Base>
15
</modules>
16
<global>
app/code/community/PSystem/Base/etc/system.xml CHANGED
@@ -4,7 +4,7 @@
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
- * @version 1.0.1
8
*/
9
-->
10
<config>
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
+ * @version 1.0.0
8
*/
9
-->
10
<config>
app/design/frontend/default/default/layout/ps_base.xml CHANGED
@@ -4,7 +4,7 @@
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
- * @version 1.0.1
8
*/
9
-->
10
<layout version="1.0.0">
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
+ * @version 1.0.0
8
*/
9
-->
10
<layout version="1.0.0">
app/etc/modules/PSystem_Base.xml CHANGED
@@ -4,7 +4,7 @@
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
- * @version 1.0.1
8
*/
9
-->
10
<config>
4
* @category PSystem
5
* @package PSystem_Base
6
* @author Pascal System <info@pascalsystem.pl>
7
+ * @version 1.0.0
8
*/
9
-->
10
<config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
<?xml version="1.0"?>
2
<package>
3
<name>PSystem_Base</name>
4
- <version>1.0.1</version>
5
<stability>stable</stability>
6
<license>OSL v3.0</license>
7
<channel>community</channel>
@@ -10,9 +10,9 @@
10
<description>Common libraries for other pascal system modules.</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:00:03</time>
15
- <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="pascalsystem"><file name="base.css" hash="49bcce4684a42b1a116d4bae15c9680b"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ps_base.xml" hash="d3723f04260852ffcbe6b96e9d1c7383"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="pascalsystem"><file name="base.js" hash="c822b4380927f213685ac6a40a74708a"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PSystem_Base.xml" hash="f08fb44f4cab0e6d94977f4ae0032e7c"/></dir></target><target name="magecommunity"><dir name="PSystem"><dir name="Base"><dir name="etc"><file name="config.xml" hash="bfad3697b7d5705baa3d2a7917cfe8f2"/><file name="system.xml" hash="f6c0a59e41c60459dce68c947c05aae2"/></dir><dir name="Helper"><file name="Data.php" hash="ebc68ac0163e1fa369cc55382e188690"/></dir><dir name="Model"><file name="Observer.php" hash="8fcf59110401faf4adda7402883f08cb"/></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>
1
<?xml version="1.0"?>
2
<package>
3
<name>PSystem_Base</name>
4
+ <version>1.0.2</version>
5
<stability>stable</stability>
6
<license>OSL v3.0</license>
7
<channel>community</channel>
10
<description>Common libraries for other pascal system modules.</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-29</date>
14
+ <time>21:23:27</time>
15
+ <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="pascalsystem"><file name="base.css" hash="49bcce4684a42b1a116d4bae15c9680b"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ps_base.xml" hash="9b87da09b49c9e19d2676767e7c82f2f"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="pascalsystem"><file name="base.js" hash="c822b4380927f213685ac6a40a74708a"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PSystem_Base.xml" hash="4b67afa10cc26b7c855d6ae2e1fe1de7"/></dir></target><target name="magecommunity"><dir name="PSystem"><dir name="Base"><dir name="etc"><file name="config.xml" hash="94618c443c83a147b8714ca9d2a7ef2b"/><file name="system.xml" hash="6f68329705dc49a0262ca2ed7c5ed628"/></dir><dir name="Helper"><file name="Data.php" hash="1888f26b764a776a0a6585336e912f8f"/></dir><dir name="Model"><file name="Observer.php" hash="99b5c66599ef06f50a88ab49af21798c"/></dir></dir></dir></target></contents>
16
<compatible/>
17
<dependencies/>
18
</package>