mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
Merge pull request #144 from creative-commoners/pulls/2.0/fix-canonical-redirects
FIX Ensure first processed stable version is treated as canonical
This commit is contained in:
commit
fccde14751
@ -459,8 +459,13 @@ class DocumentationManifest
|
|||||||
{
|
{
|
||||||
$fromLink = $this->stripLinkBase($from);
|
$fromLink = $this->stripLinkBase($from);
|
||||||
$toLink = $this->stripLinkBase($to);
|
$toLink = $this->stripLinkBase($to);
|
||||||
|
|
||||||
|
// If the redirect "from" is already registered with a "to", don't override it. This ensures
|
||||||
|
// that the first version processed is treated as the canonical version.
|
||||||
|
if (!isset($this->redirects[$fromLink])) {
|
||||||
$this->redirects[$fromLink] = $toLink;
|
$this->redirects[$fromLink] = $toLink;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user