From 931b08287223dd6764bbb6bdb9c1470e5add16f0 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 16 Feb 2011 19:10:16 +1100 Subject: [PATCH] Delete install.php after installation --- install.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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'] = '

It appears that Tinyboard is already installed! Delete ' . $config['has_installed'] . ' to reinstall.

'; + die(Element('page.html', $page)); + } + if($step == 0) { // Agreeement $page['body'] = ' @@ -319,6 +326,11 @@ $page['title'] = 'Installation complete'; $page['body'] = '

Thank you for using Tinyboard. Please remember to report any bugs you discover.

'; + + if(!@unlink(__FILE__)) { + $page['body'] = '

I couldn\'t remove install.php. You will have to remove it manually.

'; + } + echo Element('page.html', $page); } ?> \ No newline at end of file