Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Rescue Master Branch PR: Remove isDev / isTest querystring arguments #10456

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/Core/BaseKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,6 @@ public function getEnvironment()
return $this->enviroment;
}

// Check saved session
$env = $this->sessionEnvironment();
if ($env) {
return $env;
}

// Check getenv
if ($env = Environment::getEnv('SS_ENVIRONMENT_TYPE')) {
return $env;
Expand All @@ -283,23 +277,6 @@ public function getEnvironment()
return self::LIVE;
}

/**
* Check or update any temporary environment specified in the session.
*
* @return null|string
*
* @deprecated 5.0 Use Director::get_session_environment_type() instead
*/
protected function sessionEnvironment()
{
if (!$this->booted) {
// session is not initialyzed yet, neither is manifest
return null;
}

return Director::get_session_environment_type();
}

abstract public function boot($flush = false);

abstract public function isFlushed();
Expand Down
5 changes: 1 addition & 4 deletions src/Core/Startup/ErrorControlChainMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ protected function prepareConfirmationTokenChain(HTTPRequest $request)
{
$chain = new ConfirmationTokenChain();
$chain->pushToken(new URLConfirmationToken('dev/build', $request));

foreach (['isTest', 'isDev', 'flush'] as $parameter) {
$chain->pushToken(new ParameterConfirmationToken($parameter, $request));
}
$chain->pushToken(new ParameterConfirmationToken('flush', $request));

return $chain;
}
Expand Down
1 change: 0 additions & 1 deletion src/Core/Startup/ParameterConfirmationToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public function reloadRequiredIfError()

public function suppress()
{
unset($_GET[$this->parameterName]);
$this->request->offsetUnset($this->parameterName);
}

Expand Down