From d3099c4bd4134711f760941a19bcf047388e4cfe Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Wed, 25 Oct 2017 11:08:46 +1300 Subject: [PATCH 1/2] Update plugin to 1.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dc2fe3f..216e5aa 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "http://silverstripe.org", "license": "BSD-3-Clause", "require": { - "silverstripe/recipe-plugin": ">=0.1@dev <1.0", + "silverstripe/recipe-plugin": "^1", "silverstripe/recipe-core": "1.0.x-dev", "silverstripe/admin": "1.0.x-dev", "silverstripe/asset-admin": "1.0.x-dev", From e3ad4e71c8fe85bfe15706bc7023f7ece78409ce Mon Sep 17 00:00:00 2001 From: JorisDebonnet Date: Mon, 6 Nov 2017 01:46:05 +0100 Subject: [PATCH 2/2] Short array syntax [] in Page and PageController --- mysite/code/Page.php | 6 ++---- mysite/code/PageController.php | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/mysite/code/Page.php b/mysite/code/Page.php index b83000d..6300926 100755 --- a/mysite/code/Page.php +++ b/mysite/code/Page.php @@ -4,9 +4,7 @@ use SilverStripe\CMS\Model\SiteTree; class Page extends SiteTree { - private static $db = array( - ); + private static $db = []; - private static $has_one = array( - ); + private static $has_one = []; } diff --git a/mysite/code/PageController.php b/mysite/code/PageController.php index 5a0adf9..0c36ff8 100644 --- a/mysite/code/PageController.php +++ b/mysite/code/PageController.php @@ -9,19 +9,17 @@ class PageController extends ContentController * permissions or conditions required to allow the user to access it. * * - * array ( + * [ * 'action', // anyone can access this action * 'action' => true, // same as above * 'action' => 'ADMIN', // you must have ADMIN permissions to access this action * 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true - * ); + * ]; * * * @var array */ - private static $allowed_actions = array( - - ); + private static $allowed_actions = []; protected function init() {