Completed
Push — devel ( 407f4a...b62948 )
by Miguel
06:02
created
app/code/community/Nexcessnet/Turpentine/controllers/EsiController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -183,9 +183,9 @@
 block discarded – undo
183 183
             }
184 184
         }
185 185
         $layout = Mage::getSingleton('core/layout');
186
-        Mage::getSingleton( 'core/design_package' )
187
-                ->setPackageName( $esiData->getDesignPackage() )
188
-                ->setTheme( $esiData->getDesignTheme() );
186
+        Mage::getSingleton('core/design_package')
187
+                ->setPackageName($esiData->getDesignPackage())
188
+                ->setTheme($esiData->getDesignTheme());
189 189
 
190 190
         // dispatch event for adding handles to layout update
191 191
         Mage::dispatchEvent(
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 1 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.
app/code/community/Nexcessnet/Turpentine/Model/Varnish/Admin/Socket.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -500,7 +500,7 @@
 block discarded – undo
500 500
                 $response['code'], $response['text'] ));
501 501
         } else {
502 502
             if (Mage::getStoreConfig('turpentine_varnish/general/varnish_log_commands')) { 
503
-                Mage::helper('turpentine/debug')->logDebug('VARNISH command sent: ' . $data);
503
+                Mage::helper('turpentine/debug')->logDebug('VARNISH command sent: '.$data);
504 504
             }
505 505
             return $response;
506 506
         }
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -227,9 +227,9 @@  discard block
 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 &&
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
         $methodParam = $esiHelper->getEsiMethodParam();
333 333
         $esiData = new Varien_Object();
334 334
         $esiData->setStoreId(Mage::app()->getStore()->getId());
335
-        $esiData->setDesignPackage( Mage::getDesign()->getPackageName() );
336
-        $esiData->setDesignTheme( Mage::getDesign()->getTheme( 'layout' ) );
335
+        $esiData->setDesignPackage(Mage::getDesign()->getPackageName());
336
+        $esiData->setDesignTheme(Mage::getDesign()->getTheme('layout'));
337 337
         $esiData->setNameInLayout($blockObject->getNameInLayout());
338 338
         $esiData->setBlockType(get_class($blockObject));
339 339
         $esiData->setLayoutHandles($this->_getBlockLayoutHandles($blockObject));
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Helper/Esi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
      * @param string $blockName value of name= attribute in layout XML
374 374
      * @return Mage_Core_Model_Layout_Element
375 375
      */
376
-    public function getEsiLayoutBlockNode($layout,$blockName) {
376
+    public function getEsiLayoutBlockNode($layout, $blockName) {
377 377
         // first try very specific by checking for action setEsiOptions inside block
378 378
         $blockNode = current($layout->getNode()->xpath(
379 379
             sprintf('//block[@name=\'%s\'][action[@method=\'setEsiOptions\']]',
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Model/Varnish/Admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
         $result = false;
139 139
 
140 140
         if ($helper->csrfFixupNeeded()) {
141
-            if ($socket->getVersion() === '4.0' || $socket->getVersion() === '4.1' ) {
141
+            if ($socket->getVersion() === '4.0' || $socket->getVersion() === '4.1') {
142 142
                 $paramName = 'feature';
143 143
                 $value = $socket->param_show($paramName);
144 144
                 $value = explode("\n", $value['text']);
Please login to merge, or discard this patch.
community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Abstract.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      *
132 132
      * @return string
133 133
      */
134
-    protected function _getCustomIncludeFilename($position='') {
134
+    protected function _getCustomIncludeFilename($position = '') {
135 135
         $key = 'custom_include_file';
136 136
         $key .= ($position) ? '_'.$position : '';
137 137
         return $this->_formatTemplate(
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
      */
194 194
     protected function _getAdminFrontname() {
195 195
         if (Mage::getStoreConfig('admin/url/use_custom_path')) {
196
-            if(Mage::getStoreConfig('web/url/use_store')) {
197
-                return Mage::getModel('core/store')->load(0)->getCode() . "/" . Mage::getStoreConfig('admin/url/custom_path');
196
+            if (Mage::getStoreConfig('web/url/use_store')) {
197
+                return Mage::getModel('core/store')->load(0)->getCode()."/".Mage::getStoreConfig('admin/url/custom_path');
198 198
             } else {
199 199
                 return Mage::getStoreConfig('admin/url/custom_path');
200 200
             }
@@ -909,8 +909,8 @@  discard block
 block discarded – undo
909 909
      */
910 910
     protected function _vcl_sub_https_redirect_fix() {
911 911
         $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
912
-        $baseUrl = str_replace(array('http://','https://'), '', $baseUrl);
913
-        $baseUrl = rtrim($baseUrl,'/');
912
+        $baseUrl = str_replace(array('http://', 'https://'), '', $baseUrl);
913
+        $baseUrl = rtrim($baseUrl, '/');
914 914
         
915 915
         switch (Mage::getStoreConfig('turpentine_varnish/servers/version')) {
916 916
             case 4.0:
@@ -982,7 +982,7 @@  discard block
 block discarded – undo
982 982
     {
983 983
         $tpl = $this->_vcl_sub_synth();
984 984
 
985
-        if(!$tpl){
985
+        if ( ! $tpl) {
986 986
             $tpl = <<<EOS
987 987
 sub vcl_synth {
988 988
     if (resp.status == 750) {
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
     }
993 993
 }
994 994
 EOS;
995
-        }else{
995
+        } else {
996 996
             $tpl_750 = '
997 997
 sub vcl_synth {
998 998
     if (resp.status == 750) {
@@ -1089,12 +1089,12 @@  discard block
 block discarded – undo
1089 1089
         
1090 1090
         if (Mage::getStoreConfig('turpentine_varnish/general/https_redirect_fix')) {
1091 1091
             $vars['https_redirect'] = $this->_vcl_sub_https_redirect_fix();
1092
-            if(Mage::getStoreConfig('turpentine_varnish/servers/version') == '4.0' || Mage::getStoreConfig('turpentine_varnish/servers/version') == '4.1'){
1092
+            if (Mage::getStoreConfig('turpentine_varnish/servers/version') == '4.0' || Mage::getStoreConfig('turpentine_varnish/servers/version') == '4.1') {
1093 1093
                 $vars['vcl_synth'] = $this->_vcl_sub_synth_https_fix();
1094 1094
             }
1095 1095
         }
1096 1096
 
1097
-        foreach (array('','top') as $position) {
1097
+        foreach (array('', 'top') as $position) {
1098 1098
             $customIncludeFile = $this->_getCustomIncludeFilename($position);
1099 1099
             if (is_readable($customIncludeFile)) {
1100 1100
                 $key = 'custom_vcl_include';
Please login to merge, or discard this patch.
app/code/community/Nexcessnet/Turpentine/Model/Observer/Varnish.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
     public function fixCmRedisSessionLocks($eventObject) {
67 67
         if (Mage::helper('core')->isModuleEnabled('Cm_RedisSession')) {
68 68
             if ( ! empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend'] &&
69
-                    !defined('CM_REDISSESSION_LOCKING_ENABLED') ) {
69
+                    ! defined('CM_REDISSESSION_LOCKING_ENABLED')) {
70 70
                 define('CM_REDISSESSION_LOCKING_ENABLED', false);
71 71
             }
72 72
         }
Please login to merge, or discard this patch.