ArtsOnIT_OfflineMaintenance - Version 1.5.0

Version Notes

Commercial edition.

Download this release

Release Info

Developer Magento Core Team
Extension ArtsOnIT_OfflineMaintenance
Version 1.5.0
Comparing to
See all releases


Code changes from version 1.0.4 to 1.5.0

app/code/community/ArtsOnIT/OfflineMaintenance/Controller/Router/Standard.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Magento ArtsOnIt Offline Maintenance Page
4
+ *
5
+ * @category ArtsOnIt
6
+ * @package Mage_OfflineMaintenance
7
+ * @copyright Copyright (c) 2009 ArtsOn.IT (http://www.ArtsOn.it)
8
+ * @author Calore Luca Erico (l.calore@ArtsOn.it)
9
+ *@licence www.artson.it/licence/magento/omp
10
+ */
11
+ class ArtsOnIT_OfflineMaintenance_Controller_Router_Standard extends Mage_Core_Controller_Varien_Router_Standard
12
+ {
13
+
14
+ public function match(Zend_Controller_Request_Http $request)
15
+ {
16
+
17
+ $storeenabled = Mage::getStoreConfig('offlineMaintenance/settings/enabled', $request->getStoreCodeFromPath());
18
+ if ($storeenabled)
19
+ {
20
+ Mage::getSingleton('core/session', array('name' => 'adminhtml'));
21
+ if (!Mage::getSingleton('admin/session')->isLoggedIn())
22
+ {
23
+ Mage::getSingleton('core/session', array('name' => 'front'));
24
+
25
+ $front = $this->getFront();
26
+ $response = $front->getResponse();
27
+ $response->setHeader('HTTP/1.1','503 Service Temporarily Unavailable');
28
+ $response->setHeader('Status','503 Service Temporarily Unavailable');
29
+ $response->setHeader('Retry-After','5000');
30
+
31
+ $response->setBody(html_entity_decode( Mage::getStoreConfig('offlineMaintenance/settings/message', $request->getStoreCodeFromPath()), ENT_QUOTES, "utf-8" )); $response->sendHeaders();
32
+ $response->outputBody();
33
+
34
+ exit;
35
+ }
36
+ else
37
+ {
38
+ $showreminder = Mage::getStoreConfig('offlineMaintenance/settings/showreminder', $request->getStoreCodeFromPath());
39
+ if ($showreminder)
40
+ {
41
+ $front = $this->getFront();
42
+ $response = $front->getResponse()->appendBody('<div style="height:12px; background:red; color: white; position:relative; width:100%;padding:3px; z-index:100000;text-trasform:capitalize;">Offline</div>');
43
+ }
44
+ }
45
+ }
46
+ return parent::match($request);
47
+
48
+ }
49
+
50
+
51
+
52
+ }
app/code/community/ArtsOnIT/OfflineMaintenance/Helper/Data.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Magento ArtsOnIt Offline Maintenance Page
4
+ *
5
+ * @category ArtsOnIt
6
+ * @package Mage_OfflineMaintenance
7
+ * @copyright Copyright (c) 2009 ArtsOn.IT (http://www.ArtsOn.it)
8
+ * @author Calore Luca Erico (l.calore@ArtsOn.it)
9
+ *@licence www.artson.it/licence/magento/omp
10
+ */
11
+ class ArtsOnIT_OfflineMaintenance_Helper_Data extends Mage_Core_Helper_Abstract
12
+ {
13
+
14
+ }
app/code/community/{Mage → ArtsOnIT}/OfflineMaintenance/etc/config.xml RENAMED
@@ -1,14 +1,42 @@
1
  <?xml version="1.0"?>
 
 
 
 
 
 
 
 
 
 
 
2
  <config>
3
  <modules>
4
- <Mage_OfflineMaintenance>
5
- <version>1.0.4</version>
6
- </Mage_OfflineMaintenance>
7
  </modules>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  <default>
9
  <web>
10
  <routers>
11
- <standard><area>frontend</area><class>Mage_OfflineMaintenance_Controller_Router_Standard</class></standard>
12
  </routers>
13
  </web>
14
  <offlineMaintenance>
@@ -56,11 +84,11 @@ h2
56
  <adminhtml>
57
  <translate>
58
  <modules>
59
- <Mage_OfflineMaintenance>
60
  <files>
61
- <default>Mage_OfflineMaintenance.csv</default>
62
  </files>
63
- </Mage_OfflineMaintenance>
64
  </modules>
65
  </translate>
66
  <acl>
@@ -72,7 +100,7 @@ h2
72
  <config>
73
  <children>
74
  <offlineMaintenance>
75
- <title>Maintenance</title>
76
  </offlineMaintenance>
77
  </children>
78
  </config>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * Magento ArtsOnIt Offline Maintenance Page
5
+ *
6
+ * @category ArtsOnIt
7
+ * @package Mage_OfflineMaintenance
8
+ * @copyright Copyright (c) 2009 ArtsOn.IT (http://www.ArtsOn.it)
9
+ * @author Calore Luca Erico (l.calore@ArtsOn.it)
10
+ *@licence www.artson.it/licence/magento/omp
11
+ */
12
+ -->
13
  <config>
14
  <modules>
15
+ <ArtsOnIT_OfflineMaintenance>
16
+ <version>1.5.1</version>
17
+ </ArtsOnIT_OfflineMaintenance>
18
  </modules>
19
+ <global>
20
+ <helpers>
21
+ <offlineMaintenance>
22
+ <class>ArtsOnIT_OfflineMaintenance_Helper</class>
23
+ </offlineMaintenance>
24
+ </helpers>
25
+
26
+ </global>
27
+ <stores>
28
+ <default>
29
+ <web>
30
+ <routers>
31
+ <standard><area>frontend</area><class>ArtsOnIT_OfflineMaintenance_Controller_Router_Standard</class></standard>
32
+ </routers>
33
+ </web>
34
+ </default>
35
+ </stores>
36
  <default>
37
  <web>
38
  <routers>
39
+ <standard><area>frontend</area><class>ArtsOnIT_OfflineMaintenance_Controller_Router_Standard</class></standard>
40
  </routers>
41
  </web>
42
  <offlineMaintenance>
84
  <adminhtml>
85
  <translate>
86
  <modules>
87
+ <ArtsOnIT_OfflineMaintenance>
88
  <files>
89
+ <default>ArtsOnIT_OfflineMaintenance.csv</default>
90
  </files>
91
+ </ArtsOnIT_OfflineMaintenance>
92
  </modules>
93
  </translate>
94
  <acl>
100
  <config>
101
  <children>
102
  <offlineMaintenance>
103
+ <title>Offline Maintenance</title>
104
  </offlineMaintenance>
105
  </children>
106
  </config>
app/code/community/{Mage → ArtsOnIT}/OfflineMaintenance/etc/system.xml RENAMED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  <config>
2
  <sections>
3
  <offlineMaintenance translate="label" module="offlineMaintenance">
1
+ <!--
2
+ /*
3
+ * Magento ArtsOnIt Offline Maintenance Page
4
+ *
5
+ * @category ArtsOnIt
6
+ * @package Mage_OfflineMaintenance
7
+ * @copyright Copyright (c) 2009 ArtsOn.IT (http://www.ArtsOn.it)
8
+ * @author Calore Luca Erico (l.calore@ArtsOn.it)
9
+ *@licence www.artson.it/licence/magento/omp
10
+ */
11
+ -->
12
  <config>
13
  <sections>
14
  <offlineMaintenance translate="label" module="offlineMaintenance">
app/code/community/Mage/OfflineMaintenance/Controller/Router/Standard.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- /*
3
- * Magento ArtsOnIt Offline Maintenance Page
4
- *
5
- * @category ArtsOnIt
6
- * @package Mage_OfflineMaintenance
7
- * @copyright Copyright (c) 2008 ArtsOn.IT (http://www.ArtsOn.it)
8
- * @author Calore Luca Erico (l.calore@ArtsOn.it)
9
- */
10
- class Mage_OfflineMaintenance_Controller_Router_Standard extends Mage_Core_Controller_Varien_Router_Standard
11
- {
12
-
13
- public function match(Zend_Controller_Request_Http $request)
14
- {
15
-
16
- $storeenabled = Mage::getStoreConfig('offlineMaintenance/settings/enabled', $request->getStoreCodeFromPath());
17
- $showreminder = Mage::getStoreConfig('offlineMaintenance/settings/showreminder', $request->getStoreCodeFromPath());
18
-
19
-
20
-
21
- if ($storeenabled)
22
- { Mage::getSingleton('core/session', array('name' => 'adminhtml'));
23
- if (!Mage::getSingleton('admin/session')->isLoggedIn())
24
- {
25
- Mage::getSingleton('core/session', array('name' => 'front'));
26
-
27
- $front = $this->getFront();
28
- $response = $front->getResponse();
29
- $response->setHeader('HTTP/1.1','503 Service Temporarily Unavailable');
30
- $response->setHeader('Status','503 Service Temporarily Unavailable');
31
- $response->setHeader('Retry-After','5000');
32
-
33
- $response->setBody(html_entity_decode( Mage::getStoreConfig('offlineMaintenance/settings/message', $request->getStoreCodeFromPath()), ENT_QUOTES, "utf-8" )); $response->sendHeaders();
34
- $response->outputBody();
35
-
36
- exit;
37
- }
38
- else if ($showreminder)
39
- {
40
- $front = $this->getFront();
41
- $response = $front->getResponse()->appendBody('<div style="height:12px; background:red; color: white; position:relative; width:100%;padding:3px; z-index:100000;text-trasform:capitalize;">Offline</div>');
42
- }
43
- }
44
- return parent::match($request);
45
-
46
- }
47
-
48
-
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Mage/OfflineMaintenance/Helper/Data.php DELETED
@@ -1,14 +0,0 @@
1
- <?php
2
- /*
3
- * Magento ArtsOnIt Offline Maintenance Page
4
- *
5
- * @category ArtsOnIt
6
- * @package Mage_OfflineMaintenance
7
- * @copyright Copyright (c) 2008 ArtsOn.IT (http://www.ArtsOn.it)
8
- * @author Calore Luca Erico (l.calore@ArtsOn.it)
9
- */
10
-
11
- class Mage_OfflineMaintenance_Helper_Data extends Mage_Core_Helper_Abstract
12
- {
13
-
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/etc/modules/{Mage_OfflineMaintenance.xml → ArtsOnIT_OfflineMaintenance.xml} RENAMED
@@ -1,9 +1,9 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Mage_OfflineMaintenance>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- </Mage_OfflineMaintenance>
8
- </modules>
9
  </config>
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <ArtsOnIT_OfflineMaintenance>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </ArtsOnIT_OfflineMaintenance>
8
+ </modules>
9
  </config>
package.xml CHANGED
@@ -1,9 +1,9 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ArtsOnIT_OfflineMaintenance</name>
4
- <version>1.0.4</version>
5
  <stability>stable</stability>
6
- <license>N/A</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Allow administrators to switch off any store view during mantenance operation.</summary>
@@ -15,11 +15,11 @@
15
  - Visual reminder of maintenance mode
16
  - SEO Build-in optimization: page status is set as 503
17
  - Courtesy page is showed in every single front page</description>
18
- <notes>Few small changes</notes>
19
  <authors><author><name>Luca</name><user>auto-converted</user><email>l.calore@artson.it</email></author></authors>
20
- <date>2008-11-13</date>
21
- <time>01:24:19</time>
22
- <contents><target name="magecommunity"><dir name="Mage"><dir name="OfflineMaintenance"><dir name="Controller"><dir name="Router"><file name="Standard.php" hash="27fd25c72c4f8954b9de671e78ad5a13"/></dir></dir><dir name="etc"><file name="config.xml" hash="c588c03ee6996e910b073e52324fa8b3"/><file name="system.xml" hash="1ba2075e51e6c36053001d4f4ec9493e"/></dir><dir name="Helper"><file name="Data.php" hash="7cc5de2a72ae5f613fadfdcaf500b8cf"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_OfflineMaintenance.xml" hash="2f662f17bf17645423b34bfdad183492"/></dir></target></contents>
23
  <compatible/>
24
- <dependencies/>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ArtsOnIT_OfflineMaintenance</name>
4
+ <version>1.5.0</version>
5
  <stability>stable</stability>
6
+ <license uri="http://www.artson.it/licence/magento/omp">Commercial</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Allow administrators to switch off any store view during mantenance operation.</summary>
15
  - Visual reminder of maintenance mode
16
  - SEO Build-in optimization: page status is set as 503
17
  - Courtesy page is showed in every single front page</description>
18
+ <notes>Commercial edition.</notes>
19
  <authors><author><name>Luca</name><user>auto-converted</user><email>l.calore@artson.it</email></author></authors>
20
+ <date>2009-01-14</date>
21
+ <time>10:36:30</time>
22
+ <contents><target name="magecommunity"><dir name="ArtsOnIT"><dir name="OfflineMaintenance"><dir name="Controller"><dir name="Router"><file name="Standard.php" hash="9e24574cee4524ebb8e2d2016f5d472c"/></dir></dir><dir name="etc"><file name="config.xml" hash="4c4566884411b3d79d74025d84f2e958"/><file name="system.xml" hash="847b560b840e1eded9202150a38185df"/></dir><dir name="Helper"><file name="Data.php" hash="b49a99931f1def5d422bb382a60c343f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="ArtsOnIT_OfflineMaintenance.xml" hash="156b2a9b03f92e88b31891fd5099aa7f"/></dir></target></contents>
23
  <compatible/>
24
+ <dependencies><required><package><name>ArtsOnIT_OfflineMaintenance</name><channel>magento-communityv</channel><min>0.0.0</min><max>1.0.4</max></package></required></dependencies>
25
  </package>