From ae595d85451284ea623cee37f82bfeeb741156ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Apr 2021 14:18:05 +0200 Subject: [PATCH] Fix sitemap --- htdocs/website/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 3e705ad33d0..0c59d582872 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2335,8 +2335,8 @@ if ($action == 'generatesitemaps' && $usercanedit) { if ($tmpshortlangcode != $shortlangcode) { $xhtmllink = $domtree->createElement('xhtml:link', ''); $xhtmllink->setAttribute("rel", "alternante"); - $xhtmllink->setAttribute("hreflang", "'.$tmpshortlangcode.'"); - $xhtmllink->setAttribute("href", "'.$pageurl.'"); + $xhtmllink->setAttribute("hreflang", $tmpshortlangcode); + $xhtmllink->setAttribute("href", $domainname.'/'.$tmppage->pageurl); $url->appendChild($xhtmllink); } } @@ -2356,8 +2356,8 @@ if ($action == 'generatesitemaps' && $usercanedit) { if ($tmpshortlangcode != $shortlangcode) { $xhtmllink = $domtree->createElement('xhtml:link', ''); $xhtmllink->setAttribute("rel", "alternante"); - $xhtmllink->setAttribute("hreflang", "'.$tmpshortlangcode.'"); - $xhtmllink->setAttribute("href", "'.$pageurl.'"); + $xhtmllink->setAttribute("hreflang", $tmpshortlangcode); + $xhtmllink->setAttribute("href", $domainname.'/'.$objhastrans->pageurl); $url->appendChild($xhtmllink); } } @@ -2369,8 +2369,8 @@ if ($action == 'generatesitemaps' && $usercanedit) { // Add myself $xhtmllink = $domtree->createElement('xhtml:link', ''); $xhtmllink->setAttribute("rel", "alternante"); - $xhtmllink->setAttribute("hreflang", "'.$shortlang.'"); - $xhtmllink->setAttribute("href", "'.$pageurl.'"); + $xhtmllink->setAttribute("hreflang", $shortlang); + $xhtmllink->setAttribute("href", $domainname.'/'.$pageurl); $url->appendChild($xhtmllink); }