fix rss again :)
This commit is contained in:
parent
984ba3f1b2
commit
8d5149ccf0
@ -147,11 +147,14 @@ class MainHandler extends request_handler {
|
||||
global $config;
|
||||
|
||||
$lang = PostLanguage::getDefault();
|
||||
$items = array_map(function(Post $post) use ($lang) {
|
||||
$items = array_map(function(Post $post) use ($lang, $config) {
|
||||
$pt = $post->getText($lang);
|
||||
$url = $post->getUrl();
|
||||
if (!str_starts_with($url, 'https://'))
|
||||
$url = 'https://'.$config['domain'].$url;
|
||||
return [
|
||||
'title' => $pt->title,
|
||||
'link' => $post->getUrl(),
|
||||
'link' => $url,
|
||||
'pub_date' => date(DATE_RSS, $post->getTimestamp()),
|
||||
'description' => $pt->getDescriptionPreview(500)
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user