aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 09:45:27 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 09:45:27 +0100
commit42c80841c846610be280218d53fcde06b0f0063b (patch)
tree26f7b26af6ca27ec8d3d7b8579e93cfe8a85be22 /inc/poche/Poche.class.php
parent59cc585271a5f253b15617d97e26a29403a929dc (diff)
downloadwallabag-42c80841c846610be280218d53fcde06b0f0063b.tar.gz
wallabag-42c80841c846610be280218d53fcde06b0f0063b.tar.zst
wallabag-42c80841c846610be280218d53fcde06b0f0063b.zip
[change] we now use Full-Text RSS 3.1, thank you so much @fivefilters
Diffstat (limited to 'inc/poche/Poche.class.php')
-rw-r--r--inc/poche/Poche.class.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index a8a54ff0..5862befb 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -332,9 +332,12 @@ class Poche
332 switch ($action) 332 switch ($action)
333 { 333 {
334 case 'add': 334 case 'add':
335 $content = $url->extract(); 335 $json = file_get_contents(Tools::getPocheUrl() . '/inc/3rdparty/makefulltextfeed.php?url='.urlencode($url->getUrl()).'&max=5&links=preserve&exc=&format=json&submit=Create+Feed');
336 $content = json_decode($json, true);
337 $title = $content['rss']['channel']['item']['title'];
338 $body = $content['rss']['channel']['item']['description'];
336 339
337 if ($this->store->add($url->getUrl(), $content['title'], $content['body'], $this->user->getId())) { 340 if ($this->store->add($url->getUrl(), $title, $body, $this->user->getId())) {
338 Tools::logm('add link ' . $url->getUrl()); 341 Tools::logm('add link ' . $url->getUrl());
339 $sequence = ''; 342 $sequence = '';
340 if (STORAGE == 'postgres') { 343 if (STORAGE == 'postgres') {
@@ -342,7 +345,7 @@ class Poche
342 } 345 }
343 $last_id = $this->store->getLastId($sequence); 346 $last_id = $this->store->getLastId($sequence);
344 if (DOWNLOAD_PICTURES) { 347 if (DOWNLOAD_PICTURES) {
345 $content = filtre_picture($content['body'], $url->getUrl(), $last_id); 348 $content = filtre_picture($body, $url->getUrl(), $last_id);
346 Tools::logm('updating content article'); 349 Tools::logm('updating content article');
347 $this->store->updateContent($last_id, $content, $this->user->getId()); 350 $this->store->updateContent($last_id, $content, $this->user->getId());
348 } 351 }