diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-05-22 20:09:23 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-05-22 20:09:23 +0200 |
commit | f0a819a968e5d935c757bb65acdfbca480398274 (patch) | |
tree | c0112fadc7b0ac3b47ab43da191bebe75624dae8 /inc | |
parent | d31766300a4c15acf0d6d496eb0156f2e6d3a269 (diff) | |
download | wallabag-f0a819a968e5d935c757bb65acdfbca480398274.tar.gz wallabag-f0a819a968e5d935c757bb65acdfbca480398274.tar.zst wallabag-f0a819a968e5d935c757bb65acdfbca480398274.zip |
added commentsand fixed something forgotten
Diffstat (limited to 'inc')
-rwxr-xr-x | inc/poche/Poche.class.php | 2 | ||||
-rwxr-xr-x | inc/poche/Tools.class.php | 8 |
2 files changed, 9 insertions, 1 deletions
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 | |||
733 | $data = array(); | 733 | $data = array(); |
734 | $read = 0; | 734 | $read = 0; |
735 | 735 | ||
736 | if (Tools:: get_doctype($html)) { | 736 | if (Tools::get_doctype($html)->innertext == "<!DOCTYPE NETSCAPE-Bookmark-file-1>") { |
737 | // Firefox-bookmarks HTML | 737 | // Firefox-bookmarks HTML |
738 | foreach (array('DL','ul') as $list) { | 738 | foreach (array('DL','ul') as $list) { |
739 | foreach ($html->find($list) as $ul) { | 739 | 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 | |||
420 | return str_replace('+', '', $token); | 420 | return str_replace('+', '', $token); |
421 | } | 421 | } |
422 | 422 | ||
423 | /** | ||
424 | * | ||
425 | * Returns the doctype for an HTML document (used for Mozilla Bookmarks) | ||
426 | * @param simple_html_dom $doc | ||
427 | * @return doctype $el | ||
428 | * | ||
429 | */ | ||
430 | |||
423 | function get_doctype($doc) | 431 | function get_doctype($doc) |
424 | { | 432 | { |
425 | $els = $doc->find('unknown'); | 433 | $els = $doc->find('unknown'); |