mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
🐛 Adjust deleteinstallfiles
to use PUBLIC_PATH.
This commit is contained in:
parent
0f27e9696b
commit
d2f4ded3ef
@ -512,24 +512,22 @@ HTML;
|
|||||||
$title = new DBVarchar("Title");
|
$title = new DBVarchar("Title");
|
||||||
$content = new DBHTMLText('Content');
|
$content = new DBHTMLText('Content');
|
||||||
|
|
||||||
// We can't delete index.php as it might be necessary for URL routing without mod_rewrite.
|
// As of SS4, index.php is required and should never be deleted.
|
||||||
// There's no safe way to detect usage of mod_rewrite across webservers,
|
$installfiles = array(
|
||||||
// so we have to assume the file is required.
|
|
||||||
$installfiles = [
|
|
||||||
'install.php',
|
'install.php',
|
||||||
'config-form.css',
|
'install-frameworkmissing.html',
|
||||||
'config-form.html',
|
'index.html'
|
||||||
'index.html',
|
);
|
||||||
];
|
|
||||||
|
|
||||||
$unsuccessful = new ArrayList();
|
$unsuccessful = new ArrayList();
|
||||||
foreach ($installfiles as $installfile) {
|
foreach ($installfiles as $installfile) {
|
||||||
if (file_exists(BASE_PATH . '/' . $installfile)) {
|
$installfilepath = PUBLIC_PATH . '/' . $installfile;
|
||||||
@unlink(BASE_PATH . '/' . $installfile);
|
if (file_exists($installfilepath)) {
|
||||||
|
@unlink($installfilepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(BASE_PATH . '/' . $installfile)) {
|
if (file_exists($installfilepath)) {
|
||||||
$unsuccessful->push(new ArrayData(['File' => $installfile]));
|
$unsuccessful->push(new ArrayData(array('File' => $installfile)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user