]> git.wh0rd.org - tt-rss.git/commitdiff
opml import: add workaround for LiveJournal OPML files with xmlURL attribute
authorAndrew Dolgov <fox@bah.org.ru>
Tue, 21 Sep 2010 07:53:54 +0000 (11:53 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Tue, 21 Sep 2010 07:53:54 +0000 (11:53 +0400)
modules/opml_domdoc.php
modules/opml_domxml.php

index a1efb1e93503ce187a28c7c511d964488e18e43c..08715093a9cb4dcfea42dc62443c8cd5a51e6180 100644 (file)
                                        }
 
                                        $feed_url = db_escape_string($outline->attributes->getNamedItem('xmlUrl')->nodeValue);
+
+                                       if (!$feed_url) 
+                                               $feed_url = db_escape_string($outline->attributes->getNamedItem('xmlURL')->nodeValue);
+
                                        $site_url = db_escape_string($outline->attributes->getNamedItem('htmlUrl')->nodeValue);
 
                                        $pref_name = db_escape_string($outline->attributes->getNamedItem('pref-name')->nodeValue);
index 1cc1467a844b6c8f784b7ef3535e4444f4bbe3e5..8262c304029dd574de15dbcf7bb236369412b018 100644 (file)
                                        }
 
                                        $feed_url = db_escape_string($outline->get_attribute('xmlUrl'));
+
+                                       if (!$feed_url)
+                                               $feed_url = db_escape_string($outline->get_attribute('xmlURL'));
+
                                        $site_url = db_escape_string($outline->get_attribute('htmlUrl'));
 
                                        if ($cat_title && !$feed_url) {