|
19 | 19 |
|
20 | 20 | if ($siteId) {
|
21 | 21 |
|
22 |
| - /*path for noscript should take unadultered path*/ |
| 22 | + /*path for noscript should take unaltered path*/ |
23 | 23 | $bugPath = $installPath;
|
24 | 24 |
|
25 |
| - if (strpos($installPath, "https://") !== false) { |
26 |
| - $secureinstallPath = $installPath; |
27 |
| - $installPath = str_replace("https://", "http://", $installPath); |
| 25 | + if (strpos($installPath, 'https://') !== false) { |
| 26 | + $secureInstallPath = $installPath; |
| 27 | + $installPath = str_replace('https://', 'http://', $installPath); |
| 28 | + } |
| 29 | + if (strpos($installPath, 'http://') === false) { |
| 30 | + $installPath = 'http://' . $installPath; |
| 31 | + $secureInstallPath = str_replace('http://', 'https://', $installPath); |
28 | 32 | }
|
29 |
| - if (strpos($installPath, "http://") === false) |
30 |
| - $installPath = "http://" . $installPath; |
31 |
| - |
32 |
| - $secureinstallPath = str_replace("http://", "https://", $installPath); |
33 | 33 |
|
34 |
| - $last = $installPath[strlen($installPath)-1]; |
| 34 | + $last = $installPath[strlen($installPath) - 1]; |
35 | 35 |
|
36 |
| - if ($last != "/") { |
37 |
| - $installPath .= "/"; |
38 |
| - $secureinstallPath .= "/"; |
| 36 | + if ($last != '/') { |
| 37 | + $installPath .= '/'; |
| 38 | + $secureInstallPath .= '/'; |
39 | 39 | }
|
40 | 40 |
|
41 | 41 | // 0 Search Results
|
42 | 42 | if($this->getRequest()->getControllerName()=='result') {
|
43 |
| - $nores = Mage::helper('catalogsearch')->getEngine() |
| 43 | + $noRes = Mage::helper('catalogsearch')->getEngine() |
44 | 44 | ->getResultCollection()
|
45 | 45 | ->addSearchFilter(Mage::helper('catalogsearch')
|
46 | 46 | ->getQuery()
|
|
53 | 53 | <script type="text/javascript">
|
54 | 54 | //<![CDATA[
|
55 | 55 | var _paq = _paq || [];
|
56 |
| - (function(){ var u=(("https:" == document.location.protocol) ? "<?php echo $secureinstallPath ?>" : "<?php echo $installPath ?>"); |
| 56 | + (function(){ var u=(("https:" == document.location.protocol) ? "<?php echo $secureInstallPath ?>" : "<?php echo $installPath ?>"); |
57 | 57 | _paq.push(['setSiteId', <?php echo $siteId ?>]);
|
58 | 58 | _paq.push(['setTrackerUrl', u+'piwik.php']);
|
59 | 59 | <?php echo $this->_getEcommerceCartUpdate()?>
|
60 | 60 | <?php echo $this->_getOrdersTrackingCode()?>
|
61 | 61 | <?php echo $this->_getProductPageview()?>
|
62 | 62 | <?php echo $this->_getCategoryPageview()?>
|
63 | 63 |
|
64 |
| - <?php if (isset($nores)): ?> |
65 |
| - _paq.push(['setCustomUrl', '' + document.URL + '&search_count=<?php echo $nores ?>']); |
| 64 | + <?php if (isset($noRes)): ?> |
| 65 | + _paq.push(['setCustomUrl', '' + document.URL + '&search_count=<?php echo $noRes ?>']); |
66 | 66 | <?php endif ?>
|
67 | 67 |
|
68 | 68 | <?php
|
|
0 commit comments