diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-20 17:19:27 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-20 17:19:27 +1000 |
| commit | d8301964b192c97e04fab81c80d90b2a19c49dc0 (patch) | |
| tree | a253024c422c121c64401e909244de8200a97579 /install.php | |
| parent | e9a6b3fa58d1ec33bb20f83147643652074c3254 (diff) | |
better writing, file locking
Diffstat (limited to 'install.php')
| -rw-r--r-- | install.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/install.php b/install.php index c6a89da3..74482a08 100644 --- a/install.php +++ b/install.php @@ -66,7 +66,7 @@ } // Update version number - file_put_contents($config['has_installed'], VERSION); + file_write($config['has_installed'], VERSION); $page['title'] = 'Upgraded'; $page['body'] = '<p style="text-align:center">Successfully upgraded from ' . $version . ' to <strong>' . VERSION . '</strong>.</p>'; @@ -401,7 +401,7 @@ if(!empty($sql_errors)) { $page['body'] .= '<div class="ban"><h2>SQL errors</h2><p>SQL errors were encountered when trying to install the database. This may be the result of using a database which is already occupied with a Tinyboard installation; if so, you can probably ignore this.</p><p>The errors encountered were:</p><ul>' . $sql_errors . '</ul><p><a href="?step=5">Ignore errors and complete installation.</a></p></div>'; } else { - file_put_contents($config['has_installed'], VERSION); + file_write($config['has_installed'], VERSION); if(!@unlink(__FILE__)) { $page['body'] .= '<div class="ban"><h2>Delete install.php!</h2><p>I couldn\'t remove <strong>install.php</strong>. You will have to remove it manually.</p></div>'; } @@ -412,7 +412,7 @@ $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>'; - file_put_contents($config['has_installed'], VERSION); + file_write($config['has_installed'], VERSION); if(!@unlink(__FILE__)) { $page['body'] .= '<div class="ban"><h2>Delete install.php!</h2><p>I couldn\'t remove <strong>install.php</strong>. You will have to remove it manually.</p></div>'; } |
