diff --git a/code/GridFieldTestPage.php b/code/GridFieldTestPage.php index d21f7a4..2170322 100644 --- a/code/GridFieldTestPage.php +++ b/code/GridFieldTestPage.php @@ -41,9 +41,15 @@ class GridFieldTestPage extends TestPage { return $fields; } + + } class GridFieldTestPage_Controller extends Page_Controller { + + private static $allowed_actions = array( + 'Form', + ); /** * diff --git a/code/TestFileUploadPage.php b/code/TestFileUploadPage.php index eab67e2..765975e 100644 --- a/code/TestFileUploadPage.php +++ b/code/TestFileUploadPage.php @@ -5,6 +5,10 @@ class TestFileUploadPage extends TestPage{ } class TestFileUploadPage_Controller extends TestPage_Controller{ + + private static $allowed_actions = array( + 'Form' + ); function Form(){ $fields = new FieldList( @@ -25,6 +29,6 @@ class TestFileUploadPage_Controller extends TestPage_Controller{ $member = new Member(); $form->saveInto($member); $member->write(); - Director::redirectBack(); + $this->redirectBack(); } } \ No newline at end of file diff --git a/code/TestPage.php b/code/TestPage.php index 3fbaef3..0d4395d 100644 --- a/code/TestPage.php +++ b/code/TestPage.php @@ -72,7 +72,7 @@ class TestPage_Controller extends Page_Controller { function save($data, $form) { $form->saveInto($this->dataRecord); $this->dataRecord->write(); - Director::redirectBack(); + $this->redirectBack(); } function gohome() {