@@ -22,7 +22,7 @@ |
||
| 22 | 22 | public function getCanonical() |
| 23 | 23 | { |
| 24 | 24 | $params = neon()->controller->actionParams; |
| 25 | - $params[0] = neon()->controller->getRoute(); |
|
| 25 | + $params[0] = neon()->controller->getRoute(); |
|
| 26 | 26 | $urlManager = neon()->getUrlManager(); |
| 27 | 27 | $url = $urlManager->createUrl($params); |
| 28 | 28 | if (strpos($url, '://') === false) { |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | if (strpos($url, '://') === false) { |
| 29 | 29 | $hostInfo = setting('cms', 'canonical', $urlManager->getHostInfo()); |
| 30 | 30 | if (strncmp($url, '//', 2) === 0) { |
| 31 | - $url = substr($hostInfo, 0, strpos($hostInfo, '://')) . ':' . $url; |
|
| 31 | + $url = substr($hostInfo, 0, strpos($hostInfo, '://')).':'.$url; |
|
| 32 | 32 | } else { |
| 33 | - $url = $hostInfo . $url; |
|
| 33 | + $url = $hostInfo.$url; |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | return Url::ensureScheme($url, null); |
@@ -923,7 +923,4 @@ |
||
| 923 | 923 | if (!empty($params['assign'])) { |
| 924 | 924 | $smarty->assign($params['assign'], $output); |
| 925 | 925 | } else { |
| 926 | - return $output; |
|
| 927 | - } |
|
| 928 | - } |
|
| 929 | -} |
|
| 926 | + return $output |
|
| 930 | 927 | \ No newline at end of file |
@@ -923,7 +923,4 @@ |
||
| 923 | 923 | if (!empty($params['assign'])) { |
| 924 | 924 | $smarty->assign($params['assign'], $output); |
| 925 | 925 | } else { |
| 926 | - return $output; |
|
| 927 | - } |
|
| 928 | - } |
|
| 929 | -} |
|
| 926 | + return $output |
|
| 930 | 927 | \ No newline at end of file |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | $sources = $this->generateSrcset($id, Arr::pull($params,'widths'), $quality); |
| 560 | 560 | foreach ($sources as $width=>$url) $srcsetParts[] = $url.' '.$width.'w'; |
| 561 | 561 | if (!isset($params['src-width']) && !isset($params['src'])) { |
| 562 | - $params[Arr::get($params, 'src-name', 'src')] = reset($sources); |
|
| 562 | + $params[Arr::get($params, 'src-name', 'src')] = reset($sources); |
|
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | // collate the tag attributes |
@@ -567,14 +567,14 @@ discard block |
||
| 567 | 567 | $srcWidth = Arr::pull($params,'src-width'); |
| 568 | 568 | if (!is_numeric($srcWidth)) throw new \InvalidArgumentException("src-width '".$srcWidth."' must be numeric"); |
| 569 | 569 | if (!isset($params['src'])) { |
| 570 | - $params[Arr::get($params, 'src-name', 'src')] = $this->firefly_image(['id' => $id, 'w' => (int)$srcWidth, 'q' => $quality]); |
|
| 570 | + $params[Arr::get($params, 'src-name', 'src')] = $this->firefly_image(['id' => $id, 'w' => (int)$srcWidth, 'q' => $quality]); |
|
| 571 | 571 | } |
| 572 | 572 | } |
| 573 | 573 | if ($srcSizeParts && !isset($params['sizes'])) { |
| 574 | 574 | $params['sizes'] = implode(', ', $srcSizeParts); |
| 575 | 575 | } |
| 576 | 576 | if ($srcsetParts && !isset($params['srcset'])) { |
| 577 | - $params[Arr::get($params, 'srcset-name', 'srcset')] = implode(', ', $srcsetParts); |
|
| 577 | + $params[Arr::get($params, 'srcset-name', 'srcset')] = implode(', ', $srcsetParts); |
|
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | // finally generate the tag ... note that these can overwrite the previously generated params |
@@ -923,7 +923,4 @@ discard block |
||
| 923 | 923 | if (!empty($params['assign'])) { |
| 924 | 924 | $smarty->assign($params['assign'], $output); |
| 925 | 925 | } else { |
| 926 | - return $output; |
|
| 927 | - } |
|
| 928 | - } |
|
| 929 | -} |
|
| 926 | + return $output |
|
| 930 | 927 | \ No newline at end of file |
@@ -126,7 +126,9 @@ discard block |
||
| 126 | 126 | public function googleCode($params) |
| 127 | 127 | { |
| 128 | 128 | $id = setting('cms', 'google_code'); |
| 129 | - if (empty($id)) return ''; |
|
| 129 | + if (empty($id)) { |
|
| 130 | + return ''; |
|
| 131 | + } |
|
| 130 | 132 | // if using google tag manager |
| 131 | 133 | if (substr($id, 0, 3) === 'GTM') { |
| 132 | 134 | $head = <<<HEADJS |
@@ -923,7 +925,4 @@ discard block |
||
| 923 | 925 | if (!empty($params['assign'])) { |
| 924 | 926 | $smarty->assign($params['assign'], $output); |
| 925 | 927 | } else { |
| 926 | - return $output; |
|
| 927 | - } |
|
| 928 | - } |
|
| 929 | -} |
|
| 928 | + return $output |
|
| 930 | 929 | \ No newline at end of file |
@@ -923,7 +923,4 @@ |
||
| 923 | 923 | if (!empty($params['assign'])) { |
| 924 | 924 | $smarty->assign($params['assign'], $output); |
| 925 | 925 | } else { |
| 926 | - return $output; |
|
| 927 | - } |
|
| 928 | - } |
|
| 929 | -} |
|
| 926 | + return $output |
|
| 930 | 927 | \ No newline at end of file |