mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
FIX Ensure first processed stable version is treated as canonical
This commit is contained in:
parent
b8cfbc204e
commit
d51ece7308
@ -459,7 +459,12 @@ class DocumentationManifest
|
||||
{
|
||||
$fromLink = $this->stripLinkBase($from);
|
||||
$toLink = $this->stripLinkBase($to);
|
||||
$this->redirects[$fromLink] = $toLink;
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user