diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-10 10:46:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 10:46:04 +0100 |
commit | 302662797cb5e8ac6579a99297ceae301f7927a6 (patch) | |
tree | 67f493a1cc6d3691742946f1d7e512bffe41e02f /application/front/controller/visitor/ShaarliVisitorController.php | |
parent | c94c32d1a3e86a479cb2582eadc668a5bb476fc6 (diff) | |
parent | 2f4df753041088d788d1923692a7d530167a6840 (diff) | |
download | Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.tar.gz Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.tar.zst Shaarli-302662797cb5e8ac6579a99297ceae301f7927a6.zip |
Merge pull request #1635 from ArthurHoaro/feature/phpcs
Diffstat (limited to 'application/front/controller/visitor/ShaarliVisitorController.php')
-rw-r--r-- | application/front/controller/visitor/ShaarliVisitorController.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php index 54f9fe03..ae946c59 100644 --- a/application/front/controller/visitor/ShaarliVisitorController.php +++ b/application/front/controller/visitor/ShaarliVisitorController.php | |||
@@ -144,7 +144,8 @@ abstract class ShaarliVisitorController | |||
144 | if (null !== $referer) { | 144 | if (null !== $referer) { |
145 | $currentUrl = parse_url($referer); | 145 | $currentUrl = parse_url($referer); |
146 | // If the referer is not related to Shaarli instance, redirect to default | 146 | // If the referer is not related to Shaarli instance, redirect to default |
147 | if (isset($currentUrl['host']) | 147 | if ( |
148 | isset($currentUrl['host']) | ||
148 | && strpos(index_url($this->container->environment), $currentUrl['host']) === false | 149 | && strpos(index_url($this->container->environment), $currentUrl['host']) === false |
149 | ) { | 150 | ) { |
150 | return $response->withRedirect($defaultPath); | 151 | return $response->withRedirect($defaultPath); |
@@ -173,7 +174,7 @@ abstract class ShaarliVisitorController | |||
173 | } | 174 | } |
174 | } | 175 | } |
175 | 176 | ||
176 | $queryString = count($params) > 0 ? '?'. http_build_query($params) : ''; | 177 | $queryString = count($params) > 0 ? '?' . http_build_query($params) : ''; |
177 | $anchor = $anchor ? '#' . $anchor : ''; | 178 | $anchor = $anchor ? '#' . $anchor : ''; |
178 | 179 | ||
179 | return $response->withRedirect($path . $queryString . $anchor); | 180 | return $response->withRedirect($path . $queryString . $anchor); |