Delete old _config.php files, this allows reinstalling with a different template (merged from 2.0.2 branch, r37948)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@40482 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
aoneil 2007-08-20 00:33:52 +00:00
parent 45de8ebc03
commit 31efa19654
1 changed files with 10 additions and 1 deletions

View File

@ -475,10 +475,19 @@ class Installer extends InstallRequirements {
<?
flush();
// Delete old _config.php files
if(file_exists('tutorial/_config.php')) {
unlink('tutorial/_config.php');
}
if(file_exists('mysite/_config.php')) {
unlink('mysite/_config.php');
}
// Write the config file
$template = $_POST['template'] == 'tutorial' ? 'tutorial' : 'mysite';
echo "<li>Creating '$template/_config.php'...</li>";
flush();