opml: remove CRs, tweak category node detection

This commit is contained in:
Andrew Dolgov 2012-08-15 15:58:05 +04:00
parent 65c8267980
commit 3f9de6ccbc
1 changed files with 453 additions and 452 deletions

View File

@ -393,8 +393,9 @@ class Opml extends Protected_Handler {
if ($node->hasAttributes() && strtolower($node->tagName) == "outline") {
$attrs = $node->attributes;
$node_cat_title = db_escape_string($attrs->getNamedItem('title')->nodeValue);
$node_feed_url = db_escape_string($attrs->getNamedItem('xmlUrl')->nodeValue);
if ($node->hasChildNodes() && $node_cat_title) {
if ($node_cat_title && !$node_feed_url) {
$this->opml_import_category($doc, $node, $owner_uid, $cat_id);
} else {