A free, self-hostable news aggregator…
Fix bug get_content_by_parsing()
Marien Fressinaud85cc23fb4fde
diff --git a/lib/lib_rss.php b/lib/lib_rss.phpindex 8f4b6cc3a..f0a65fa49 100644--- a/lib/lib_rss.php+++ b/lib/lib_rss.php@@ -190,17 +190,16 @@ function good_bye_extra ($element) {}/* permet de récupérer le contenu d'un article pour un flux qui n'est pas complet */function get_content_by_parsing ($url, $path) {- $content = new simple_html_dom ();- $content->set_callback ('good_bye_extra');- $ok = $content->load_file ($url);+ $html = new simple_html_dom ();+ $html->set_callback ('good_bye_extra');+ $ok = $html->load_file ($url);if ($ok !== false) {- // Le __toString () permet d'écraser le DOM (on n'en a plus besoin)- // une autre solution serait $content->clear () qui vide le dom- $content = $content->find ($path, 0)->__toString ();+ $content = $html->find ($path, 0);+ $html->clear ();if ($content) {- return $content;+ return $content->__toString ();} else {throw new Exception ();}diff --git a/public/scripts/endless_mode.js b/public/scripts/endless_mode.jsindex ca3c12572..a05da97db 100644--- a/public/scripts/endless_mode.js+++ b/public/scripts/endless_mode.js@@ -16,7 +16,7 @@ function load_more_posts () {$(document).ready (function () {url = $(".pagination:last li.pager-next a").attr ("href");- $(".pagination").remove ();+ $(".pagination:last").remove ();$("#stream").append ("<a id=\"load_more\" href=\"#\">Charger plus d'articles</a>");