From 99951426edbbd43d718d0fcb8a0d240a7f757b4f Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Mon, 25 Jul 2011 14:34:30 +1000 Subject: [PATCH 1/2] BUGFIX: Change the doc folder search to use the correct folder name variable. BUGFIX: Use the full path to the basefolder when searching for folders; cwd is actually sapphire, so this ends up looking in the wrong path otherwise --- code/DocumentationService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/DocumentationService.php b/code/DocumentationService.php index 3234309..c21bb43 100755 --- a/code/DocumentationService.php +++ b/code/DocumentationService.php @@ -265,7 +265,7 @@ class DocumentationService { if($dir && !$ignored) { // check to see if it has docs - $docs = Controller::join_links($dir, 'docs'); + $docs = Director::baseFolder() . '/' . Controller::join_links($entity, 'docs'); if(is_dir($docs)) { self::register($entity, $docs, '', $entity, true); From c9f35cebbb30844db59b743c9cee017a3e46e7c8 Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Mon, 25 Jul 2011 14:35:11 +1000 Subject: [PATCH 2/2] BUGFIX: Changed the base URL for the search so it hits the correct action --- code/controllers/DocumentationViewer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index fbb31e5..fc0f7db 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -759,7 +759,7 @@ class DocumentationViewer extends Controller { $form = new Form($this, 'DocumentationSearchForm', $fields, $actions); $form->disableSecurityToken(); $form->setFormMethod('get'); - $form->setFormAction('home/DocumentationSearchForm'); + $form->setFormAction(self::$link_base . 'DocumentationSearchForm'); return $form; }