aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/LinkDB.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-02-15 20:36:42 +0100
committerArthur <arthur@hoa.ro>2016-02-15 20:36:42 +0100
commit854ea372553d6ef8174cae320801e5ff3a101a87 (patch)
treeda9185d7c5d733219ca4638b512b18f2d9a55174 /application/LinkDB.php
parent2865118ca44661c7535aaf7b83e3b9222bc1f9a6 (diff)
parent510377d2cb4b12d1a421e8a88bd7edb86f223451 (diff)
downloadShaarli-854ea372553d6ef8174cae320801e5ff3a101a87.tar.gz
Shaarli-854ea372553d6ef8174cae320801e5ff3a101a87.tar.zst
Shaarli-854ea372553d6ef8174cae320801e5ff3a101a87.zip
Merge pull request #442 from ArthurHoaro/updater
Introduce the Updater class which
Diffstat (limited to 'application/LinkDB.php')
-rw-r--r--application/LinkDB.php10
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}