From 0d471a1233f5ba1e0c70adfab2d90a42f7a7d370 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@bah.org.ru>
Date: Tue, 21 Sep 2010 11:53:54 +0400
Subject: [PATCH] opml import: add workaround for LiveJournal OPML files with
 xmlURL attribute

---
 modules/opml_domdoc.php | 4 ++++
 modules/opml_domxml.php | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/modules/opml_domdoc.php b/modules/opml_domdoc.php
index a1efb1e93..08715093a 100644
--- a/modules/opml_domdoc.php
+++ b/modules/opml_domdoc.php
@@ -37,6 +37,10 @@
 					}
 
 					$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);
diff --git a/modules/opml_domxml.php b/modules/opml_domxml.php
index 1cc1467a8..8262c3040 100644
--- a/modules/opml_domxml.php
+++ b/modules/opml_domxml.php
@@ -39,6 +39,10 @@
 					}
 
 					$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) {
-- 
GitLab