Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit b4a1d3c

Browse files
committed
Merge branch 'release/1.1.54'
2 parents 3d37a00 + 76a8888 commit b4a1d3c

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# SEOmatic Changelog
22

3+
## 1.1.54 - 2017.10.10
4+
### Changed
5+
* More intelligent handling of `addTrailingSlashesToUrls`
6+
37
## 1.1.53 - 2017.10.06
48
### Changed
59
* Fixed a regression with certain types of localized sites

SeomaticPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getReleaseFeedUrl()
2626

2727
public function getVersion()
2828
{
29-
return '1.1.53';
29+
return '1.1.54';
3030
}
3131

3232
public function getSchemaVersion()

releases.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"version": "1.1.54",
4+
"downloadUrl": "https://github.com/nystudio107/seomatic/archive/master.zip",
5+
"date": "2017-10-10T11:00:00-11:00",
6+
"notes": [
7+
"[Improved] More intelligent handling of `addTrailingSlashesToUrls`"
8+
]
9+
},
210
{
311
"version": "1.1.53",
412
"downloadUrl": "https://github.com/nystudio107/seomatic/archive/master.zip",

services/SeomaticService.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,13 +3114,15 @@ public function getFullyQualifiedUrl($url)
31143114
$result = UrlHelper::getSiteUrl($url, null, null, craft()->language);
31153115
}
31163116
}
3117-
// Add a trailing / if `addTrailingSlashesToUrls` is set, but only if there's one extension
3118-
if (craft()->config->get('addTrailingSlashesToUrls')) {
3119-
$path = parse_url($result, PHP_URL_PATH);
3120-
$pathExtension = pathinfo($path,PATHINFO_EXTENSION);
3121-
if (empty($pathExtension))
3122-
$result = rtrim($result, '/') . '/';
3123-
}
3117+
}
3118+
3119+
$result = rtrim($result, '/');
3120+
// Add a trailing / if `addTrailingSlashesToUrls` is set, but only if there's one extension
3121+
if (craft()->config->get('addTrailingSlashesToUrls')) {
3122+
$path = parse_url($result, PHP_URL_PATH);
3123+
$pathExtension = pathinfo($path,PATHINFO_EXTENSION);
3124+
if (empty($pathExtension))
3125+
$result = rtrim($result, '/') . '/';
31243126
}
31253127

31263128
return $result;

0 commit comments

Comments
 (0)