diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-16 19:10:16 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-16 19:10:16 +1100 |
| commit | 931b08287223dd6764bbb6bdb9c1470e5add16f0 (patch) | |
| tree | 84417cfbb0e3406ba9f2e4bdd3067c46c73d5507 | |
| parent | a704daf5dcb6caa38634893d028873d58c298933 (diff) | |
Delete install.php after installation
| -rw-r--r-- | install.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/install.php b/install.php index b6b66c47..8ec4e6f3 100644 --- a/install.php +++ b/install.php @@ -11,6 +11,13 @@ 'body' => '' ); + if(file_exists($config['has_installed'])) { + $page['title'] = 'Pre-installation test'; + + $page['body'] = '<p style="text-align:center">It appears that Tinyboard is already installed! Delete <strong>' . $config['has_installed'] . '</strong> to reinstall.</p>'; + die(Element('page.html', $page)); + } + if($step == 0) { // Agreeement $page['body'] = ' @@ -319,6 +326,11 @@ $page['title'] = 'Installation complete'; $page['body'] = '<p style="text-align:center">Thank you for using Tinyboard. Please remember to report any bugs you discover.</p>'; + + if(!@unlink(__FILE__)) { + $page['body'] = '<p style="text-align:center">I couldn\'t remove <strong>install.php</strong>. You will have to remove it manually.</p>'; + } + echo Element('page.html', $page); } ?>
\ No newline at end of file |
