From 5fc5c76b72c7a66abe02b0ef5e46cd247e5e4f38 Mon Sep 17 00:00:00 2001 From: uroskn Date: Sat, 2 Jul 2016 22:58:57 +0200 Subject: [PATCH] Installation script refuses to run again after completed install. This is achieved by leaving special file in install/ directory. --- .gitignore | 3 +++ install/index.php | 6 +++++- install/templates/end.tpl | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5677b8da..42b90a25 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ GameEngine/config.php # Ignore generated prevention and notes GameEngine/Prevention/* GameEngine/Notes/* + +# Install instalation_done marker left by install script +install/installation_done diff --git a/install/index.php b/install/index.php index 17572f19..892ad921 100755 --- a/install/index.php +++ b/install/index.php @@ -83,7 +83,11 @@ function proceed() { ERROR!
It's not possible to write the config file. Change the permission to '777'. After that, refresh this page!"; - } else + } + else if (file_exists("installation_done")) { + echo"ERROR!
Installation appears to have been completed.
If this is an error remove installation_done file in install directory."; + } + else switch($_GET['s']){ case 0: include("templates/greet.tpl"); diff --git a/install/templates/end.tpl b/install/templates/end.tpl index dc099760..9c087704 100755 --- a/install/templates/end.tpl +++ b/install/templates/end.tpl @@ -24,6 +24,7 @@ All the files are placed. The database is created, so you can now start playing

> My TravianZ homepage <