diff options
author | Arthur <arthur@hoa.ro> | 2016-02-15 21:22:35 +0100 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-02-15 21:22:35 +0100 |
commit | 3a38c95d4232aed4a40f70eb11d26cafc9188bac (patch) | |
tree | 351663f03ed606f095b88b2f96ca0ef3d41e7f6a /application | |
parent | 1e7331126d81a5759ab91c221f7e0f164aeebfb5 (diff) | |
parent | 195acf9f0931aa3b1a6db8832ab52a260d11090d (diff) | |
download | Shaarli-3a38c95d4232aed4a40f70eb11d26cafc9188bac.tar.gz Shaarli-3a38c95d4232aed4a40f70eb11d26cafc9188bac.tar.zst Shaarli-3a38c95d4232aed4a40f70eb11d26cafc9188bac.zip |
Merge pull request #447 from ArthurHoaro/hidden-tags
Private/Hidden tags
Diffstat (limited to 'application')
-rw-r--r-- | application/LinkDB.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php index 416aa0d3..9f4d3e3c 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php | |||
@@ -264,8 +264,15 @@ You use the community supported version of the original Shaarli project, by Seba | |||
264 | foreach ($this->_links as &$link) { | 264 | foreach ($this->_links as &$link) { |
265 | // Keep the list of the mapping URLs-->linkdate up-to-date. | 265 | // Keep the list of the mapping URLs-->linkdate up-to-date. |
266 | $this->_urls[$link['url']] = $link['linkdate']; | 266 | $this->_urls[$link['url']] = $link['linkdate']; |
267 | |||
267 | // Sanitize data fields. | 268 | // Sanitize data fields. |
268 | sanitizeLink($link); | 269 | sanitizeLink($link); |
270 | |||
271 | // Remove private tags if the user is not logged in. | ||
272 | if (! $this->_loggedIn) { | ||
273 | $link['tags'] = preg_replace('/(^| )\.[^($| )]+/', '', $link['tags']); | ||
274 | } | ||
275 | |||
269 | // Do not use the redirector for internal links (Shaarli note URL starting with a '?'). | 276 | // Do not use the redirector for internal links (Shaarli note URL starting with a '?'). |
270 | if (!empty($this->_redirector) && !startsWith($link['url'], '?')) { | 277 | if (!empty($this->_redirector) && !startsWith($link['url'], '?')) { |
271 | $link['real_url'] = $this->_redirector . urlencode($link['url']); | 278 | $link['real_url'] = $this->_redirector . urlencode($link['url']); |