From f0a819a968e5d935c757bb65acdfbca480398274 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 22 May 2015 20:09:23 +0200 Subject: [PATCH] added commentsand fixed something forgotten --- inc/poche/Poche.class.php | 2 +- inc/poche/Tools.class.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 7b13c97e..d039de1f 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -733,7 +733,7 @@ class Poche $data = array(); $read = 0; - if (Tools:: get_doctype($html)) { + if (Tools::get_doctype($html)->innertext == "") { // Firefox-bookmarks HTML foreach (array('DL','ul') as $list) { foreach ($html->find($list) as $ul) { diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 1c554590..f34e8beb 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -420,6 +420,14 @@ final class Tools return str_replace('+', '', $token); } + /** + * + * Returns the doctype for an HTML document (used for Mozilla Bookmarks) + * @param simple_html_dom $doc + * @return doctype $el + * + */ + function get_doctype($doc) { $els = $doc->find('unknown'); -- 2.41.0