Split Core.php into Constants.php and Core.php and adjust main.php startup #2255

Merged
merged 2 commits into from Jul 22, 2013

2 participants

@hafriedlander
SilverStripe Ltd. member

The recent flush filter fix had a problem that you couldn't set a custom
BASE_PATH in _ss_environment because that file didn't get included until
after checking the confirmation token. This patch pulls the part of Core.php
that defines BASE_PATH into a separate file that can be included earlier
in the startup sequence so that ParameterConfirmationToken can access it.

Core.php includes Constants.php with a require_once call, so for startup
scripts that don't pull in Constants.php themselves (like cli-script.php)
no change is needed.

Twin of PR #2254

@hafriedlander hafriedlander Split Core.php into Constants.php and Core.php and adjust main.php st…
…artup

The recent flush filter fix had a problem that you couldnt set a custom
BASE_PATH in _ss_environment because that file didnt get included until
after checking the confirmation token. This patch pulls the part of Core.php
that defines BASE_PATH into a seperate file that can be included earlier
in the startup sequence so that ParameterConfirmationToken can access it.

Core.php includes Constants.php with a require_once call, so for startup
scripts that dont pull in Constants.php themselves (like cli-script.php)
no change is needed.
604d9bf
@sminnee sminnee merged commit 88d0cbe into silverstripe:3.0 Jul 22, 2013

1 check passed

Details default Scrutinizer: Errored — Travis: Passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment