Skip to content

Commit

Permalink
ENH Remove references to non-existent installer tool
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Jun 11, 2024
1 parent b53cda8 commit b179993
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 28 deletions.
22 changes: 0 additions & 22 deletions src/Core/BaseKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,28 +304,6 @@ protected function detectLegacyEnvironment()
throw new HTTPResponse_Exception($response);
}

/**
* If missing configuration, redirect to install.php if it exists.
* Otherwise show a server error to the user.
*
* @param string $msg Optional message to show to the user on an installed project (install.php missing).
*/
protected function redirectToInstaller($msg = '')
{
// Error if installer not available
if (!file_exists(Director::publicFolder() . '/install.php')) {
throw new HTTPResponse_Exception(
$msg,
500
);
}

// Redirect to installer
$response = new HTTPResponse();
$response->redirect(Director::absoluteURL('install.php'));
throw new HTTPResponse_Exception($response);
}

/**
* @return ManifestCacheFactory
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Core/CoreKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public function boot($flush = false)
protected function validateDatabase()
{
$databaseConfig = DB::getConfig();
// Gracefully fail if no DB is configured
// Fail if no DB is configured
if (empty($databaseConfig['database'])) {
$msg = 'Silverstripe Framework requires a "database" key in DB::getConfig(). ' .
'Did you forget to set SS_DATABASE_NAME or SS_DATABASE_CHOOSE_NAME in your environment?';
$this->detectLegacyEnvironment();
$this->redirectToInstaller($msg);
throw new HTTPResponse_Exception($msg, 500);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"public-files-installed": [
".htaccess",
"index.php",
"install-frameworkmissing.html",
"install.php",
"web.config"
],
"resources-dir": "customised-resources-dir"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"public-files-installed": [
".htaccess",
"index.php",
"install-frameworkmissing.html",
"install.php",
"web.config"
]
},
Expand Down

0 comments on commit b179993

Please sign in to comment.