Explorar o código

OPML bug import not using title

Fix https://github.com/FreshRSS/FreshRSS/issues/1048
Alexandre Alapetite %!s(int64=10) %!d(string=hai) anos
pai
achega
9d1f35d4b8
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      lib/lib_opml.php

+ 4 - 0
lib/lib_opml.php

@@ -105,6 +105,10 @@ function libopml_parse_outline($outline_xml, $strict = true) {
 		);
 		);
 	}
 	}
 
 
+	if (empty($outline['text']) && isset($outline['title'])) {
+		$outline['text'] = $outline['title'];
+	}
+
 	foreach ($outline_xml->children() as $key => $value) {
 	foreach ($outline_xml->children() as $key => $value) {
 		// An outline may contain any number of outline children
 		// An outline may contain any number of outline children
 		if ($key === 'outline') {
 		if ($key === 'outline') {