From 1198eb922811dc2a1723019b3cdce7d6e5ac608f Mon Sep 17 00:00:00 2001 From: Michael Andrewartha Date: Tue, 18 Feb 2014 10:04:11 +1300 Subject: [PATCH] BUG: fixes for 3.1 version, updated function calls --- code/GridFieldTestPage.php | 6 ++++++ code/TestFileUploadPage.php | 6 +++++- code/TestPage.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) 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() {