forked from indymedia/epicyon
Title for site rss feed
parent
67fa0b5a8f
commit
bf1bf3a46d
|
@ -4291,7 +4291,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if msg:
|
if msg:
|
||||||
msg = rss2Header(httpPrefix,
|
msg = rss2Header(httpPrefix,
|
||||||
'news', domainFull,
|
'news', domainFull,
|
||||||
'News', translate) + msg + rss2Footer()
|
'Site', translate) + msg + rss2Footer()
|
||||||
|
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
self._set_headers('text/xml', len(msg),
|
self._set_headers('text/xml', len(msg),
|
||||||
|
|
|
@ -26,14 +26,17 @@ def rss2Header(httpPrefix: str,
|
||||||
rssStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
|
rssStr = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
|
||||||
rssStr += "<rss version=\"2.0\">"
|
rssStr += "<rss version=\"2.0\">"
|
||||||
rssStr += '<channel>'
|
rssStr += '<channel>'
|
||||||
|
|
||||||
if title.startswith('News'):
|
if title.startswith('News'):
|
||||||
rssStr += ' <title>Newswire</title>'
|
rssStr += ' <title>Newswire</title>'
|
||||||
else:
|
|
||||||
rssStr += ' <title>' + translate[title] + '</title>'
|
|
||||||
if title.startswith('News'):
|
|
||||||
rssStr += ' <link>' + httpPrefix + '://' + domainFull + \
|
rssStr += ' <link>' + httpPrefix + '://' + domainFull + \
|
||||||
'/newswire.xml' + '</link>'
|
'/newswire.xml' + '</link>'
|
||||||
|
elif title.startswith('Site'):
|
||||||
|
rssStr += ' <title>' + domainFull + '</title>'
|
||||||
|
rssStr += ' <link>' + httpPrefix + '://' + domainFull + \
|
||||||
|
'/blogs/rss.xml' + '</link>'
|
||||||
else:
|
else:
|
||||||
|
rssStr += ' <title>' + translate[title] + '</title>'
|
||||||
rssStr += ' <link>' + httpPrefix + '://' + domainFull + \
|
rssStr += ' <link>' + httpPrefix + '://' + domainFull + \
|
||||||
'/users/' + nickname + '/rss.xml' + '</link>'
|
'/users/' + nickname + '/rss.xml' + '</link>'
|
||||||
return rssStr
|
return rssStr
|
||||||
|
|
Loading…
Reference in New Issue