From 2ac344467537d6c5f5ac26c497e7d7dfdc58e803 Mon Sep 17 00:00:00 2001 From: CheeseSucker Date: Wed, 19 Jun 2013 16:48:49 +0200 Subject: [PATCH 1/3] MINOR: Fixed typo --- docs/en/reference/grid-field.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/grid-field.md b/docs/en/reference/grid-field.md index a3c0ac114..9317f3fec 100644 --- a/docs/en/reference/grid-field.md +++ b/docs/en/reference/grid-field.md @@ -1,7 +1,7 @@ # Gridfield Gridfield is SilverStripe's implementation of data grids. Its main purpose is to display tabular data -in a format that is easy to view and modify. It's a can be thought of as a HTML table with some tricks. +in a format that is easy to view and modify. It can be thought of as a HTML table with some tricks. It's built in a way that provides developers with an extensible way to display tabular data in a table and minimise the amount of code that needs to be written. From d1756a5a58f4c3000f9777feb4a39dc7889c4061 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 20 Jun 2013 18:35:12 +1200 Subject: [PATCH 2/3] Update simple-contact-form.md --- docs/en/howto/simple-contact-form.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/howto/simple-contact-form.md b/docs/en/howto/simple-contact-form.md index 73facd0d7..8a37fd250 100644 --- a/docs/en/howto/simple-contact-form.md +++ b/docs/en/howto/simple-contact-form.md @@ -44,7 +44,7 @@ First we create all the fields we want in the contact form, and put them inside We then create a `[api:FieldList]` of the form actions, or the buttons that submit the form. Here we add a single form action, with the name 'submit', and the label 'Submit'. We'll use the name of the form action later. :::php - return new Form('Form', $this, $fields, $actions); + return new Form($this, 'Form', $fields, $actions); Finally we create the `Form` object and return it. The first argument is the name of the form – this has to be the same as the name of the function that creates the form, so we've used 'Form'. The second argument is the controller that the form is on – this is almost always $this. The third and fourth arguments are the fields and actions we created earlier. @@ -61,7 +61,7 @@ Now that we have a contact form, we need some way of collecting the data submitt :::php class ContactPage_Controller extends Page_Controller { - static $allowed_actions = array('Form'); + private static $allowed_actions = array('Form'); public function Form() { // ... } From d8b106e6ee3b75561b67cdd11712432ec959ec38 Mon Sep 17 00:00:00 2001 From: Craig Weber Date: Fri, 26 Oct 2012 20:54:08 +0000 Subject: [PATCH 3/3] FIX: TestRunner was not cleaning up DB on failure When a unit test being run by PHPUnit encountered a fatal error, TestRunner::tearDown was never being called. This resulted in tmpdb schemas littering the database from failed test runs. This changeset fixes the issue by registering TestRunner::tearDown as a shutdown function, so that it gets called even in the event of a PHP Fatal Error. --- dev/TestRunner.php | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 dev/TestRunner.php diff --git a/dev/TestRunner.php b/dev/TestRunner.php old mode 100644 new mode 100755 index d186ae87e..34cc423dc --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -315,6 +315,12 @@ class TestRunner extends Controller { $phpunitwrapper->setSuite($suite); $phpunitwrapper->setCoverageStatus($coverage); + // Make sure TearDown is called (even in the case of a fatal error) + $self = $this; + register_shutdown_function(function() use ($self) { + $self->tearDown(); + }); + $phpunitwrapper->runTests(); // get results of the PhpUnitWrapper class