Skip to content

Commit 21a5db3

Browse files
author
Rafael Grigorian
committed
Fixes GH-83
1 parent ab7e5a4 commit 21a5db3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+130
-65
lines changed

package.xml

Lines changed: 77 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,83 @@
11
<?xml version="1.0"?>
22
<package>
33
<date>2018-07-13</date>
4-
<time>13:49:44</time>
4+
<time>16:27:34</time>
55
<version>1.0.1</version>
66
<contents>
77
<target name="magecommunity">
88
<dir name="JetRails">
99
<dir name="Cloudflare">
1010
<dir name="Controller">
11-
<dir name="Action.php" hash="b48a902b4139e3c4931da821eeada3f9"/>
12-
<dir name="Getter.php" hash="cb1cee110b99a31846168061b28d7a92"/>
13-
<dir name="Toggle.php" hash="73b278f88b7c29e2c938f3f65fb913ce"/>
14-
<dir name="Update.php" hash="45ed547e7f6db71fd4b65558b9e37080"/>
11+
<dir name="Action.php" hash="4b284cd4a141247b070c5f34cfd917e8"/>
12+
<dir name="Getter.php" hash="9f3e0739d2d181d70393bf6791995887"/>
13+
<dir name="Toggle.php" hash="e7c161a8659be5f736f567c8d4abbe9b"/>
14+
<dir name="Update.php" hash="7827704e4589767ecd5de5be443df46c"/>
1515
</dir>
1616
<dir name="Helper">
1717
<dir name="Data.php" hash="963b2f83ad8e16f3e9e109ac8c78e30a"/>
1818
</dir>
1919
<dir name="controllers">
2020
<dir name="DashboardController.php" hash="78d79028d899e33c56faeb1cda5a5ca9"/>
21+
<dir name="DebugController.php" hash="6791279fcf9f21498bc29f0607d2be80"/>
22+
<dir name="Cloudflare">
23+
<dir name="DashboardController.php" hash="d264f2edf250edeb805d5f12867df111"/>
24+
<dir name="DebugController.php" hash="fafab914d1485b6eb7dd3fb6dfbff137"/>
25+
<dir name="Api">
26+
<dir name="Caching">
27+
<dir name="AlwaysOnlineController.php" hash="53afa73d6df5c7701287bb8498b14750"/>
28+
<dir name="BrowserCacheExpirationController.php" hash="b62d39b49db5e172137e780d2bd309a4"/>
29+
<dir name="CachingLevelController.php" hash="b0c916e9f5ff5abd41905067945b486e"/>
30+
<dir name="DevelopmentModeController.php" hash="9bdee668fd51648d0666373448aefbaf"/>
31+
<dir name="PurgeCacheController.php" hash="70ca4b8c83ee24d4281c471c66ab1d2c"/>
32+
</dir>
33+
<dir name="Crypto">
34+
<dir name="AlwaysUseHttpsController.php" hash="9bbc86831297f27b227811b8c6b79d9a"/>
35+
<dir name="AuthenticatedOriginPullsController.php" hash="53d042405f86db601eab733c631880bb"/>
36+
<dir name="AutomaticHttpsRewritesController.php" hash="e43a3ac408681ea2292d6231461ea850"/>
37+
<dir name="DisableUniversalSslController.php" hash="a7a2379637476eae0de739350f80d7fb"/>
38+
<dir name="HttpStrictTransportSecurityController.php" hash="5fe10b893fe19354bf077c9edb34e893"/>
39+
<dir name="MinimumTlsVersionController.php" hash="39eb8a4a3728370f06aba7e93aaa4b84"/>
40+
<dir name="OpportunisticEncryptionController.php" hash="0ca4abda901920d2bf0694641ad2aac6"/>
41+
<dir name="SslController.php" hash="e14a88d1628dd7da89de1b224a102145"/>
42+
<dir name="Tls13Controller.php" hash="0723ac9194df9b68c2c005f5463e3b57"/>
43+
</dir>
44+
<dir name="Dns">
45+
<dir name="CloudflareNameserversController.php" hash="99bd2889f965e9b12cacde02efe67481"/>
46+
<dir name="DnsRecordsController.php" hash="bbbc6d0f9f115588758dc178211410bc"/>
47+
</dir>
48+
<dir name="Firewall">
49+
<dir name="AccessRulesController.php" hash="e09fe1c5b9b2481c30d110e5b0de3962"/>
50+
<dir name="ChallengePassageController.php" hash="22cfa477ff57a76e5130d03e8e43fc8b"/>
51+
<dir name="SecurityLevelController.php" hash="3aa131edd0565a3a550083f7f190d547"/>
52+
<dir name="UserAgentBlockingController.php" hash="d53f5926f9dea30f46cb6fb0a268b015"/>
53+
</dir>
54+
<dir name="Network">
55+
<dir name="Http2Controller.php" hash="cec02362712bb3012cfa083dbd8bd4af"/>
56+
<dir name="IpGeolocationController.php" hash="a66151c62dd4d13058e0d6d84cb17381"/>
57+
<dir name="Ipv6CompatibilityController.php" hash="814922927bae3e45c254112cd5f75865"/>
58+
<dir name="PseudoIpv4Controller.php" hash="ffdea6ea79557377703f8e36bdceb02c"/>
59+
<dir name="WebsocketsController.php" hash="8881485d4c172cec1cb2595e27bf8ebc"/>
60+
</dir>
61+
<dir name="PageRules">
62+
<dir name="PageRulesController.php" hash="76c5912e6343c6d00d7791c37f81d606"/>
63+
</dir>
64+
<dir name="Overview">
65+
<dir name="StatusController.php" hash="e6e9f2a3ce5eb0d8fed4d2b651d82d04"/>
66+
</dir>
67+
<dir name="ScrapeShield">
68+
<dir name="EmailAddressObfuscationController.php" hash="1ee3ec5e41d93bf6079ff87887ea5643"/>
69+
<dir name="HotlinkProtectionController.php" hash="d157db779894f2dca577c98693ee582f"/>
70+
<dir name="ServerSideExcludesController.php" hash="c19634caa99e6ac96180d6c47bbe3a99"/>
71+
</dir>
72+
<dir name="Speed">
73+
<dir name="AutoMinifyController.php" hash="ef2af15ff38fae7d980324e571302b2b"/>
74+
<dir name="BrotliController.php" hash="19c44ad03d14f59a93e0f085ae8eb16f"/>
75+
<dir name="MirageController.php" hash="0aebbcd977514482c137afe507955038"/>
76+
<dir name="PolishController.php" hash="89c773e67cd713ec5145572838722474"/>
77+
<dir name="RocketLoaderController.php" hash="fe2a3069eca330a71ac5e12c917fb277"/>
78+
</dir>
79+
</dir>
80+
</dir>
2181
<dir name="Api">
2282
<dir name="Caching">
2383
<dir name="AlwaysOnlineController.php" hash="3a72396cf6f3229c7790fbe1af4c28a0"/>
@@ -76,14 +136,14 @@
76136
</dir>
77137
</dir>
78138
<dir name="etc">
79-
<dir name="adminhtml.xml" hash="a14aa0448ac903f6c695882a48566f98"/>
80-
<dir name="config.xml" hash="ad6467f848768f0b45c8b6185661d75e"/>
139+
<dir name="adminhtml.xml" hash="40fddb62fcacb851210b4ad6ccd105cc"/>
140+
<dir name="config.xml" hash="d4ab1eb13b2de2d7050165ec1fdd5085"/>
81141
</dir>
82142
<dir name="Block">
83143
<dir name="Adminhtml">
84144
<dir name="Dashboard.php" hash="b29053b9aeafde22f10a98d81fb68507"/>
85145
<dir name="Dashboard">
86-
<dir name="Section.php" hash="9ed09f16d769067bcd5a7c8355cf20b7"/>
146+
<dir name="Section.php" hash="49c268efab4f3f09f9c718d1b4654885"/>
87147
<dir name="Tab.php" hash="dccfacfb0d1233483ef8d2ed2ff79d9c"/>
88148
</dir>
89149
</dir>
@@ -124,20 +184,20 @@
124184
<dir name="SecurityLevel.php" hash="53e97d8097256379989b1ba5dab40b51"/>
125185
<dir name="UserAgentBlocking.php" hash="c13ec821972845f4faa6ccfaeec06e22"/>
126186
</dir>
127-
<dir name="Network">
128-
<dir name="Http2.php" hash="2dfe36da760f4e5c8bf12fb59393d8a3"/>
129-
<dir name="IpGeolocation.php" hash="c4446df1da6e5fd50972767ea2f25e72"/>
130-
<dir name="Ipv6Compatibility.php" hash="dc8e53e4ed64ee8f2fab77314a5191aa"/>
131-
<dir name="PseudoIpv4.php" hash="98d0faf8ea93dea645d01a10fd91bd65"/>
132-
<dir name="Websockets.php" hash="911edc3af79b891c0e1a846a6c294b26"/>
133-
</dir>
134187
<dir name="Overview">
135188
<dir name="Configuration.php" hash="f31c48bdf57f5855486adc42b0ac2c66"/>
136189
<dir name="Status.php" hash="e412319f8dd06b9410957c8cbbe770cf"/>
137190
</dir>
138191
<dir name="PageRules">
139192
<dir name="PageRules.php" hash="57b844cb25bc9af89e8d8ab513e0d9d8"/>
140193
</dir>
194+
<dir name="Network">
195+
<dir name="Http2.php" hash="2dfe36da760f4e5c8bf12fb59393d8a3"/>
196+
<dir name="IpGeolocation.php" hash="c4446df1da6e5fd50972767ea2f25e72"/>
197+
<dir name="Ipv6Compatibility.php" hash="dc8e53e4ed64ee8f2fab77314a5191aa"/>
198+
<dir name="PseudoIpv4.php" hash="98d0faf8ea93dea645d01a10fd91bd65"/>
199+
<dir name="Websockets.php" hash="911edc3af79b891c0e1a846a6c294b26"/>
200+
</dir>
141201
<dir name="ScrapeShield">
142202
<dir name="EmailAddressObfuscation.php" hash="a3d6a4c0fec2c32345a70652624054dd"/>
143203
<dir name="HotlinkProtection.php" hash="1ee2cf0356f8a2e65b2e557866d0d390"/>
@@ -161,7 +221,7 @@
161221
<dir name="base">
162222
<dir name="default">
163223
<dir name="layout">
164-
<dir name="cloudflare.xml" hash="396f65d33615ebeaf7fdfba2684acf43"/>
224+
<dir name="cloudflare.xml" hash="8110a63822a7aacf9b4507e75a11670a"/>
165225
</dir>
166226
<dir name="template">
167227
<dir name="cloudflare">
@@ -218,7 +278,7 @@
218278
<dir name="websockets.phtml" hash="fc21aa4fd5199dbd8c5c6bc8b29fead0"/>
219279
</dir>
220280
<dir name="overview">
221-
<dir name="configuration.phtml" hash="81ede666fa4600f423cd22c83e34d8c6"/>
281+
<dir name="configuration.phtml" hash="d21c7c377199bd23c3b4e446736a841d"/>
222282
<dir name="status.phtml" hash="92cc62f829f7c7b40d35f2ff28c3b8c1"/>
223283
</dir>
224284
<dir name="page_rules">

src/app/code/community/JetRails/Cloudflare/Block/Adminhtml/Dashboard/Section.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class JetRails_Cloudflare_Block_Adminhtml_Dashboard_Section
1616

1717
/**
1818
* Uses core session model to return a valid form key. This form key is
19-
* used to enable AJAX communitcations.
19+
* used to enable AJAX communications.
2020
* @return string Form key
2121
*/
2222
public function getFormKey () {
@@ -26,7 +26,7 @@ public function getFormKey () {
2626
/**
2727
* This method takes the template that is binded to this block and it
2828
* uses the template name to generate a custom endpoint. This endpoint
29-
* is used to enable AJAX communitications with the template's
29+
* is used to enable AJAX communications with the template's
3030
* respective controllers.
3131
* @return string URL to custom endpoint
3232
*/
@@ -42,7 +42,7 @@ public function getApiEndpoint () {
4242
return $i;
4343
}, $route );
4444
$route = implode ( "_", $route );
45-
return Mage::getUrl ("cloudflare/api_$route");
45+
return Mage::getUrl ("adminhtml/cloudflare_api_$route");
4646
}
4747

4848
}

src/app/code/community/JetRails/Cloudflare/Controller/Action.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function _construct () {
3333
*/
3434
protected function _getResourceName () {
3535
$resource = Mage::app ()->getRequest ()->getControllerName ();
36+
$resource = preg_replace ( "/^cloudflare_/", "", $resource );
3637
$resource = str_replace ( "api_", "", $resource );
3738
$resource = str_replace ( "_", "/", $resource );
3839
$resource = preg_replace ( "/([A-Z])/", '_$1', $resource );

src/app/code/community/JetRails/Cloudflare/Controller/Getter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class JetRails_Cloudflare_Controller_Getter
2323
*/
2424
public function indexAction () {
2525
$resource = Mage::app ()->getRequest ()->getControllerName ();
26+
$resource = preg_replace ( "/^cloudflare_/", "", $resource );
2627
$api = Mage::getModel ("cloudflare/$resource");
2728
$response = $api->getValue ();
2829
return $this->_sendResponse ( $response );

src/app/code/community/JetRails/Cloudflare/Controller/Toggle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class JetRails_Cloudflare_Controller_Toggle
2323
*/
2424
public function toggleAction () {
2525
$resource = Mage::app ()->getRequest ()->getControllerName ();
26+
$resource = preg_replace ( "/^cloudflare_/", "", $resource );
2627
$api = Mage::getModel ("cloudflare/$resource");
2728
$state = $this->_request->getParam ("state");
2829
$response = $api->setValue ( $state === "true" );

src/app/code/community/JetRails/Cloudflare/Controller/Update.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class JetRails_Cloudflare_Controller_Update
2121
*/
2222
public function updateAction () {
2323
$resource = Mage::app ()->getRequest ()->getControllerName ();
24+
$resource = preg_replace ( "/^cloudflare_/", "", $resource );
2425
$api = Mage::getModel ("cloudflare/$resource");
2526
$value = $this->_request->getParam ("value");
2627
$response = $api->setValue ( $value );

src/app/code/community/JetRails/Cloudflare/controllers/Api/Caching/AlwaysOnlineController.php renamed to src/app/code/community/JetRails/Cloudflare/controllers/Cloudflare/Api/Caching/AlwaysOnlineController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
* @copyright © 2018 JETRAILS, All rights reserved
1313
* @license MIT https://opensource.org/licenses/MIT
1414
*/
15-
class JetRails_Cloudflare_Api_Caching_AlwaysOnlineController
15+
class JetRails_Cloudflare_Cloudflare_Api_Caching_AlwaysOnlineController
1616
extends JetRails_Cloudflare_Controller_Toggle {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
* @copyright © 2018 JETRAILS, All rights reserved
1313
* @license MIT https://opensource.org/licenses/MIT
1414
*/
15-
class JetRails_Cloudflare_Api_Caching_BrowserCacheExpirationController
15+
class JetRails_Cloudflare_Cloudflare_Api_Caching_BrowserCacheExpirationController
1616
extends JetRails_Cloudflare_Controller_Update {}

src/app/code/community/JetRails/Cloudflare/controllers/Api/Caching/CachingLevelController.php renamed to src/app/code/community/JetRails/Cloudflare/controllers/Cloudflare/Api/Caching/CachingLevelController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
* @copyright © 2018 JETRAILS, All rights reserved
1313
* @license MIT https://opensource.org/licenses/MIT
1414
*/
15-
class JetRails_Cloudflare_Api_Caching_CachingLevelController
15+
class JetRails_Cloudflare_Cloudflare_Api_Caching_CachingLevelController
1616
extends JetRails_Cloudflare_Controller_Update {}

src/app/code/community/JetRails/Cloudflare/controllers/Api/Caching/DevelopmentModeController.php renamed to src/app/code/community/JetRails/Cloudflare/controllers/Cloudflare/Api/Caching/DevelopmentModeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
* @copyright © 2018 JETRAILS, All rights reserved
1313
* @license MIT https://opensource.org/licenses/MIT
1414
*/
15-
class JetRails_Cloudflare_Api_Caching_DevelopmentModeController
15+
class JetRails_Cloudflare_Cloudflare_Api_Caching_DevelopmentModeController
1616
extends JetRails_Cloudflare_Controller_Toggle {}

0 commit comments

Comments
 (0)