diff --git a/.htaccess b/.htaccess index fdecdd0..adbd7c8 100644 --- a/.htaccess +++ b/.htaccess @@ -1,2 +1,2 @@ RewriteEngine On -RewriteRule .* public/%1 +RewriteRule ^(.*)$ public/$1 diff --git a/app/src/Page.php b/app/src/Page.php new file mode 100755 index 0000000..d5d11e7 --- /dev/null +++ b/app/src/Page.php @@ -0,0 +1,13 @@ + + * [ + * '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 = []; + + protected function init() + { + parent::init(); + // You can include any CSS or JS required by your project here. + // See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/ + } + } +} diff --git a/composer.json b/composer.json index 618c4ef..72c4ae3 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "http://silverstripe.org", "license": "BSD-3-Clause", "require": { - "silverstripe/recipe-plugin": "^1", + "silverstripe/recipe-plugin": "^1.2", "silverstripe/recipe-core": "2.x-dev", "silverstripe/admin": "2.x-dev", "silverstripe/asset-admin": "2.x-dev", @@ -22,7 +22,7 @@ }, "extra": { "project-files": [ - "mysite/code/*" + "app/src/*" ], "branch-alias": { "dev-master": "2.x-dev" diff --git a/mysite/code/Page.php b/mysite/code/Page.php deleted file mode 100755 index 6300926..0000000 --- a/mysite/code/Page.php +++ /dev/null @@ -1,10 +0,0 @@ - - * [ - * '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 = []; - - protected function init() - { - parent::init(); - // You can include any CSS or JS required by your project here. - // See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/ - } -}