Completed
Pull Request — devel (#1225)
by Aric
03:10
created
contrib/tools/esi-decoder.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
-     * ESI DECODER
4
-     *
5
-     * This tool can be used to decode an ESI request.
6
-     * You can just paste the whole ESI URL and push the button to decode it.
7
-     *
8
-     * Make sure you place this utility on a protected spot on your web server where only authorized users can use it.
9
-     *
10
-     * If the URLs you see in "varnishlog" or "varnishncsa" are not working because they are cut off, read this FAQ item:
11
-     * https://github.com/nexcess/magento-turpentine/wiki/FAQ#im-using-varnishncsa-to-generate-logs-and-the-esi-urls-are-cut-off-how-do-i-get-the-full-url-in-the-logs
12
-     *
13
-     */
3
+ * ESI DECODER
4
+ *
5
+ * This tool can be used to decode an ESI request.
6
+ * You can just paste the whole ESI URL and push the button to decode it.
7
+ *
8
+ * Make sure you place this utility on a protected spot on your web server where only authorized users can use it.
9
+ *
10
+ * If the URLs you see in "varnishlog" or "varnishncsa" are not working because they are cut off, read this FAQ item:
11
+ * https://github.com/nexcess/magento-turpentine/wiki/FAQ#im-using-varnishncsa-to-generate-logs-and-the-esi-urls-are-cut-off-how-do-i-get-the-full-url-in-the-logs
12
+ *
13
+ */
14 14
 
15 15
 $tries = 5;
16 16
 $dir = dirname(__FILE__);
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Model/Core/Session.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function renewFormKey()
58 58
     {
59
-     	$this->setData('_form_key', Mage::helper('core')->getRandomString(16));
59
+            $this->setData('_form_key', Mage::helper('core')->getRandomString(16));
60 60
     }
61 61
 
62 62
     /**
Please login to merge, or discard this patch.
community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Abstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,8 +173,8 @@
 block discarded – undo
173 173
      */
174 174
     protected function _getAdminFrontname() {
175 175
         if (Mage::getStoreConfig('admin/url/use_custom_path')) {
176
-            if(Mage::getStoreConfig('web/url/use_store')) {
177
-                return Mage::getModel('core/store')->load(0)->getCode() . "/" . Mage::getStoreConfig('admin/url/custom_path');
176
+            if (Mage::getStoreConfig('web/url/use_store')) {
177
+                return Mage::getModel('core/store')->load(0)->getCode()."/".Mage::getStoreConfig('admin/url/custom_path');
178 178
             } else {
179 179
                 return Mage::getStoreConfig('admin/url/custom_path');
180 180
             }
Please login to merge, or discard this patch.
community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Version4.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
         $backendNodes = Mage::helper('turpentine/data')->cleanExplode(PHP_EOL,
88 88
             Mage::getStoreConfig('turpentine_vcl/backend/backend_nodes'));
89 89
 
90
-        for($i = 0, $iMax = count($backendNodes); $i < $iMax; $i++) {
90
+        for ($i = 0, $iMax = count($backendNodes); $i < $iMax; $i++) {
91 91
             $tpl .= <<<EOS
92 92
     vdir.add_backend(web{$i});
93 93
 EOS;
94 94
         }
95 95
 
96
-        for($i = 0, $iMax = count($adminBackendNodes); $i < $iMax; $i++) {
96
+        for ($i = 0, $iMax = count($adminBackendNodes); $i < $iMax; $i++) {
97 97
             $tpl .= <<<EOS
98 98
     vdir_admin.add_backend(webadmin{$i});
99 99
 EOS;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 Mage::getStoreConfig('turpentine_vcl/backend/backend_nodes'));
126 126
             $probeUrl = Mage::getStoreConfig('turpentine_vcl/backend/backend_probe_url');
127 127
 
128
-            if('admin' == $name) {
128
+            if ('admin' == $name) {
129 129
                 $prefix = 'admin';
130 130
             } else {
131 131
                 $prefix = '';
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             $parts = explode(':', $backendNode, 2);
139 139
             $host = (empty($parts[0])) ? '127.0.0.1' : $parts[0];
140 140
             $port = (empty($parts[1])) ? '80' : $parts[1];
141
-            $backends .= $this->_vcl_director_backend($host, $port, $prefix . $number, $probeUrl, $backendOptions);
141
+            $backends .= $this->_vcl_director_backend($host, $port, $prefix.$number, $probeUrl, $backendOptions);
142 142
 
143 143
             $number++;
144 144
         }
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Block/Poll/ActivePoll.php 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -21,19 +21,19 @@
 block discarded – undo
21 21
 
22 22
 class Nexcessnet_Turpentine_Block_Poll_ActivePoll extends Mage_Poll_Block_ActivePoll {
23 23
 
24
-	public function setTemplate($template)
25
-	{
26
-		if ((Mage::getConfig()->getModuleConfig('Mage_Poll')->is('active', 'true')) &&
27
-		(!Mage::getStoreConfig('advanced/modules_disable_output/Mage_Poll')))
28
-		{
29
-			$this->_template = $template;
30
-			$this->setPollTemplate('turpentine/ajax.phtml', 'poll');
31
-			$this->setPollTemplate('turpentine/ajax.phtml', 'results');
32
-		}
33
-		else
34
-		{
35
-			// Mage_Poll is disabled, so do nothing
36
-		}
37
-		return $this;
38
-	}
24
+    public function setTemplate($template)
25
+    {
26
+        if ((Mage::getConfig()->getModuleConfig('Mage_Poll')->is('active', 'true')) &&
27
+        (!Mage::getStoreConfig('advanced/modules_disable_output/Mage_Poll')))
28
+        {
29
+            $this->_template = $template;
30
+            $this->setPollTemplate('turpentine/ajax.phtml', 'poll');
31
+            $this->setPollTemplate('turpentine/ajax.phtml', 'results');
32
+        }
33
+        else
34
+        {
35
+            // Mage_Poll is disabled, so do nothing
36
+        }
37
+        return $this;
38
+    }
39 39
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	public function setTemplate($template)
25 25
 	{
26 26
 		if ((Mage::getConfig()->getModuleConfig('Mage_Poll')->is('active', 'true')) &&
27
-		(!Mage::getStoreConfig('advanced/modules_disable_output/Mage_Poll')))
27
+		( ! Mage::getStoreConfig('advanced/modules_disable_output/Mage_Poll')))
28 28
 		{
29 29
 			$this->_template = $template;
30 30
 			$this->setPollTemplate('turpentine/ajax.phtml', 'poll');
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
 			$this->_template = $template;
30 30
 			$this->setPollTemplate('turpentine/ajax.phtml', 'poll');
31 31
 			$this->setPollTemplate('turpentine/ajax.phtml', 'results');
32
-		}
33
-		else
32
+		} else
34 33
 		{
35 34
 			// Mage_Poll is disabled, so do nothing
36 35
 		}
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -227,9 +227,9 @@
 block discarded – undo
227 227
                 'Checking ESI block candidate: %s',
228 228
                 $blockObject->getNameInLayout() ? $blockObject->getNameInLayout() : $blockObject->getModuleName() );
229 229
 
230
-            $debugHelper->logInfo( "-- block testing: shouldResponseUseEsi = " . $esiHelper->shouldResponseUseEsi());
231
-            $debugHelper->logInfo( "-- block testing: instanceof Mage_Core_Block_Template = " . $blockObject instanceof Mage_Core_Block_Template );
232
-            $debugHelper->logInfo( "-- block testing: Esi Options = " . print_r($blockObject->getEsiOptions(), true) );
230
+            $debugHelper->logInfo("-- block testing: shouldResponseUseEsi = ".$esiHelper->shouldResponseUseEsi());
231
+            $debugHelper->logInfo("-- block testing: instanceof Mage_Core_Block_Template = ".$blockObject instanceof Mage_Core_Block_Template);
232
+            $debugHelper->logInfo("-- block testing: Esi Options = ".print_r($blockObject->getEsiOptions(), true));
233 233
         }        
234 234
         if ($esiHelper->shouldResponseUseEsi() &&
235 235
                 $blockObject instanceof Mage_Core_Block_Template &&
Please login to merge, or discard this patch.