mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-19 19:42:59 -04:00
Merge branch 'importOpmlTitles' of https://github.com/Alkarex/FreshRSS into Alkarex-importOpmlTitles
This commit is contained in:
@@ -200,8 +200,10 @@ class Feed extends Model {
|
||||
}
|
||||
$this->_url ($subscribe_url);
|
||||
}
|
||||
if (empty($this->name)) { // May come from OPML
|
||||
$title = $feed->get_title ();
|
||||
$this->_name (!is_null ($title) ? $title : $this->url);
|
||||
}
|
||||
$this->_website ($feed->get_link ());
|
||||
$this->_description ($feed->get_description ());
|
||||
|
||||
|
||||
@@ -133,9 +133,15 @@ function getFeedsOutline ($outline, $cat_id) {
|
||||
|
||||
function getFeed ($outline, $cat_id) {
|
||||
$url = (string) $outline['xmlUrl'];
|
||||
$title = '';
|
||||
if (isset ($outline['text'])) {
|
||||
$title = (string) $outline['text'];
|
||||
} elseif (isset ($outline['title'])) {
|
||||
$title = (string) $outline['title'];
|
||||
}
|
||||
$feed = new Feed ($url);
|
||||
$feed->_category ($cat_id);
|
||||
|
||||
$feed->_name ($title);
|
||||
return $feed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user