diff options
Diffstat (limited to 'formats/MrssFormat.php')
-rw-r--r-- | formats/MrssFormat.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/formats/MrssFormat.php b/formats/MrssFormat.php index 2fcf283..6d07928 100644 --- a/formats/MrssFormat.php +++ b/formats/MrssFormat.php @@ -18,10 +18,11 @@ class MrssFormat extends FormatAbstract { if(!empty($extraInfos['uri'])) { $uri = $this->xml_encode($extraInfos['uri']); } else { - $uri = 'https://github.com/sebsauvage/rss-bridge'; + $uri = 'https://github.com/RSS-Bridge/rss-bridge'; } - $icon = $this->xml_encode('http://icons.better-idea.org/icon?url='. $uri .'&size=64'); + $uriparts = parse_url($uri); + $icon = $this->xml_encode($uriparts['scheme'] . '://' . $uriparts['host'] .'/favicon.ico'); $items = ''; foreach($this->getItems() as $item) { @@ -50,6 +51,16 @@ Some media files might not be shown to you. Consider using the ATOM format inste } } + $entryCategories = ''; + if(isset($item['categories'])) { + + foreach($item['categories'] as $category) { + $entryCategories .= '<category>' + . $category . '</category>' + . PHP_EOL; + } + } + $items .= <<<EOD <item> @@ -60,6 +71,7 @@ Some media files might not be shown to you. Consider using the ATOM format inste <description>{$itemContent}{$entryEnclosuresWarning}</description> <author>{$itemAuthor}</author> {$entryEnclosures} + {$entryCategories} </item> EOD; |