BUGFIX: Fixed issue next/previous page links missing the documentation base link

This commit is contained in:
UndefinedOffset 2016-02-24 17:56:14 -04:00
parent 35deb55613
commit 581c7cb53a

View File

@ -534,7 +534,7 @@ class DocumentationManifest
foreach ($this->getPages() as $url => $page) { foreach ($this->getPages() as $url => $page) {
if ($grabNext && strpos($page['filepath'], $entityBase) !== false) { if ($grabNext && strpos($page['filepath'], $entityBase) !== false) {
return new ArrayData(array( return new ArrayData(array(
'Link' => $url, 'Link' => Controller::join_links(Config::inst()->get('DocumentationViewer', 'link_base'), $url),
'Title' => $page['title'] 'Title' => $page['title']
)); ));
} }
@ -543,7 +543,7 @@ class DocumentationManifest
$grabNext = true; $grabNext = true;
} elseif (!$fallback && strpos($page['filepath'], $filepath) !== false) { } elseif (!$fallback && strpos($page['filepath'], $filepath) !== false) {
$fallback = new ArrayData(array( $fallback = new ArrayData(array(
'Link' => $url, 'Link' => Controller::join_links(Config::inst()->get('DocumentationViewer', 'link_base'), $url),
'Title' => $page['title'], 'Title' => $page['title'],
'Fallback' => true 'Fallback' => true
)); ));
@ -576,7 +576,7 @@ class DocumentationManifest
if ($filepath == $page['filepath']) { if ($filepath == $page['filepath']) {
if ($previousUrl) { if ($previousUrl) {
return new ArrayData(array( return new ArrayData(array(
'Link' => $previousUrl, 'Link' => Controller::join_links(Config::inst()->get('DocumentationViewer', 'link_base'), $previousUrl),
'Title' => $previousPage['title'] 'Title' => $previousPage['title']
)); ));
} }