]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
added commentsand fixed something forgotten
authorThomas Citharel <tcit@tcit.fr>
Fri, 22 May 2015 18:09:23 +0000 (20:09 +0200)
committerThomas Citharel <tcit@tcit.fr>
Fri, 22 May 2015 18:09:23 +0000 (20:09 +0200)
inc/poche/Poche.class.php
inc/poche/Tools.class.php

index 7b13c97e4b2d4dd0780a89c9bf679c91388a3cb1..d039de1f1877d6cc9b70b86d44cd2d3dabce47d0 100755 (executable)
@@ -733,7 +733,7 @@ class Poche
           $data = array();
           $read = 0;
 
-          if (Tools:: get_doctype($html)) {
+          if (Tools::get_doctype($html)->innertext == "<!DOCTYPE NETSCAPE-Bookmark-file-1>") {
             // Firefox-bookmarks HTML
             foreach (array('DL','ul') as $list) {
                 foreach ($html->find($list) as $ul) {
index 1c55459082c439cd0a1bf77644bccac135337fa2..f34e8bebe885dede2bad79bce859499542d68546 100755 (executable)
@@ -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');