Wall: [RSS] Fix URLs

This commit is contained in:
veselcraft 2022-02-05 17:58:02 +03:00
parent f668aad262
commit 6b0da27328
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -113,14 +113,14 @@ final class WallPresenter extends OpenVKPresenter
$feed = new Feed(); $feed = new Feed();
$channel = new Channel(); $channel = new Channel();
$channel->title(OPENVK_ROOT_CONF['openvk']['appearance']['name'])->url(ovk_scheme(true))->appendTo($feed); $channel->title(OPENVK_ROOT_CONF['openvk']['appearance']['name'])->url(ovk_scheme(true) . $_SERVER["SERVER_NAME"])->appendTo($feed);
foreach($posts as $post) { foreach($posts as $post) {
$item = new Item(); $item = new Item();
$item $item
->title($post->getOwner()->getCanonicalName()) ->title($post->getOwner()->getCanonicalName())
->description($post->getText()) ->description($post->getText())
->url(ovk_scheme(true)."/wall{$post->getPrettyId()}") ->url(ovk_scheme(true).$_SERVER["SERVER_NAME"]."/wall{$post->getPrettyId()}")
->pubDate($post->getPublicationTime()->timestamp()) ->pubDate($post->getPublicationTime()->timestamp())
->appendTo($channel); ->appendTo($channel);
} }