diff options
Diffstat (limited to 'application/LinkDB.php')
-rw-r--r-- | application/LinkDB.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php index 19ca6435..a95b3f36 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php | |||
@@ -260,14 +260,11 @@ You use the community supported version of the original Shaarli project, by Seba | |||
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
263 | // Keep the list of the mapping URLs-->linkdate up-to-date. | ||
264 | $this->_urls = array(); | 263 | $this->_urls = array(); |
265 | foreach ($this->_links as $link) { | 264 | foreach ($this->_links as &$link) { |
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 | |||
269 | // Escape links data | ||
270 | foreach($this->_links as &$link) { | ||
271 | sanitizeLink($link); | 268 | sanitizeLink($link); |
272 | // Do not use the redirector for internal links (Shaarli note URL starting with a '?'). | 269 | // Do not use the redirector for internal links (Shaarli note URL starting with a '?'). |
273 | if (!empty($this->_redirector) && !startsWith($link['url'], '?')) { | 270 | if (!empty($this->_redirector) && !startsWith($link['url'], '?')) { |
@@ -381,6 +378,7 @@ You use the community supported version of the original Shaarli project, by Seba | |||
381 | } | 378 | } |
382 | $linkDays = array_keys($linkDays); | 379 | $linkDays = array_keys($linkDays); |
383 | sort($linkDays); | 380 | sort($linkDays); |
381 | |||
384 | return $linkDays; | 382 | return $linkDays; |
385 | } | 383 | } |
386 | } | 384 | } |