mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
BUGFIX: use sapphire as the default location. BUGFIX: fixed index templates being thrown as 404
This commit is contained in:
parent
9335c789af
commit
30b5134b80
@ -102,7 +102,6 @@ class DocumentationViewer extends Controller {
|
||||
* @return SS_HTTPResponse
|
||||
*/
|
||||
public function handleRequest(SS_HTTPRequest $request) {
|
||||
|
||||
// if we submitted a form, let that pass
|
||||
if(!$request->isGET()) return parent::handleRequest($request);
|
||||
|
||||
@ -158,6 +157,7 @@ class DocumentationViewer extends Controller {
|
||||
$this->version = 'current';
|
||||
$link = $this->Link($this->Remaining);
|
||||
$this->response = new SS_HTTPResponse();
|
||||
|
||||
$this->redirect($link, 301); // permanent redirect
|
||||
|
||||
return $this->response;
|
||||
@ -392,7 +392,7 @@ class DocumentationViewer extends Controller {
|
||||
$linkParts = array();
|
||||
|
||||
// don't include the 'index in the url
|
||||
if($page->Title != "Index") $linkParts[] = $page->Filename;
|
||||
if(strtolower($page->Title) != "index") $linkParts[] = $page->Filename;
|
||||
|
||||
$page->Link = $this->Link($linkParts);
|
||||
$page->LinkingMode = 'link';
|
||||
|
Loading…
x
Reference in New Issue
Block a user