aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/feed/FeedBuilder.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-03 14:51:41 +0200
committerArthurHoaro <arthur@hoa.ro>2020-09-12 21:39:01 +0200
commit650a5f09cbeb1c1bef19810c6cc504c06d5b7e87 (patch)
tree6be70f1658128246e57d39c73e1bc3b13e992de1 /application/feed/FeedBuilder.php
parente809908f9e593b2cec11f72849caa1dae6394451 (diff)
downloadShaarli-650a5f09cbeb1c1bef19810c6cc504c06d5b7e87.tar.gz
Shaarli-650a5f09cbeb1c1bef19810c6cc504c06d5b7e87.tar.zst
Shaarli-650a5f09cbeb1c1bef19810c6cc504c06d5b7e87.zip
Add manual configuration for root URL
This new setting under 'general.root_url' allows to override automatic discovery of Shaarli instance's URL. Fixes #1339
Diffstat (limited to 'application/feed/FeedBuilder.php')
-rw-r--r--application/feed/FeedBuilder.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/application/feed/FeedBuilder.php b/application/feed/FeedBuilder.php
index 3653c32f..f6def630 100644
--- a/application/feed/FeedBuilder.php
+++ b/application/feed/FeedBuilder.php
@@ -122,9 +122,9 @@ class FeedBuilder
122 $data['language'] = $this->getTypeLanguage($feedType); 122 $data['language'] = $this->getTypeLanguage($feedType);
123 $data['last_update'] = $this->getLatestDateFormatted($feedType); 123 $data['last_update'] = $this->getLatestDateFormatted($feedType);
124 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn; 124 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn;
125 // Remove leading slash from REQUEST_URI. 125 // Remove leading path from REQUEST_URI (already contained in $pageaddr).
126 $data['self_link'] = escape(server_url($this->serverInfo)) 126 $requestUri = preg_replace('#(.*?/)(feed.*)#', '$2', escape($this->serverInfo['REQUEST_URI']));
127 . escape($this->serverInfo['REQUEST_URI']); 127 $data['self_link'] = $pageaddr . $requestUri;
128 $data['index_url'] = $pageaddr; 128 $data['index_url'] = $pageaddr;
129 $data['usepermalinks'] = $this->usePermalinks === true; 129 $data['usepermalinks'] = $this->usePermalinks === true;
130 $data['links'] = $linkDisplayed; 130 $data['links'] = $linkDisplayed;