aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 00:49:43 -0800
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-12-06 00:49:43 -0800
commitd5501950e2470d52f6bf5954d2179010cdee0475 (patch)
treec452a0cbcbe3a49fa72e5ba7e8c249302da8ae29 /inc/poche/Poche.class.php
parent0b5c6ff3195e145a1fb5edb67741b8f6ed231fa2 (diff)
parent42c80841c846610be280218d53fcde06b0f0063b (diff)
downloadwallabag-d5501950e2470d52f6bf5954d2179010cdee0475.tar.gz
wallabag-d5501950e2470d52f6bf5954d2179010cdee0475.tar.zst
wallabag-d5501950e2470d52f6bf5954d2179010cdee0475.zip
Merge pull request #353 from inthepoche/ftr
[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 }