mirror of
https://github.com/friendica/friendica
synced 2024-11-10 22:22:53 +00:00
Correct self attribute in ATOM feeds
Fix for https://github.com/friendica/friendica/issues/6128#issuecomment-439016471 Special case for DFRN to reduce the risk of unintended side effects
This commit is contained in:
parent
58e35f037b
commit
97d164f69e
1 changed files with 7 additions and 1 deletions
|
@ -1320,7 +1320,13 @@ class OStatus
|
|||
$attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"];
|
||||
XML::addElement($doc, $root, "link", "", $attributes);
|
||||
|
||||
$attributes = ["href" => System::baseUrl() . "/dfrn_poll/" . $owner["nick"],
|
||||
if (empty($_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], '/dfrn_poll/') !== false) {
|
||||
$selfUri = "/dfrn_poll/" . $owner["nick"];
|
||||
} else {
|
||||
$selfUri = $_SERVER['REQUEST_URI'];
|
||||
}
|
||||
|
||||
$attributes = ["href" => System::baseUrl() . $selfUri,
|
||||
"rel" => "self", "type" => "application/atom+xml"];
|
||||
XML::addElement($doc, $root, "link", "", $attributes);
|
||||
|
||||
|
|
Loading…
Reference in a new issue