aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2014-09-28 22:53:13 +0200
committerroot2014-09-28 22:53:13 +0200
commitdb3252c646838b5cd5657cd5ba289b88256959e3 (patch)
tree00cf50f220630274bacc85cfcbd5673ff12b351b
parent0141598c6043fe5b42710a7b83909e1d6812646c (diff)
downloadjungegemeinde-db3252c646838b5cd5657cd5ba289b88256959e3.tar.gz
INSTALL.txt
-rw-r--r--.gitignore2
-rw-r--r--INSTALL.txt3
-rwxr-xr-x_setup.php17
3 files changed, 21 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index cc6c0a9..aebd8b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,7 +6,7 @@
*.swp
*.tmp
-_setup.php
+setup.php
piwik.html
favicon.ico
config.php
diff --git a/INSTALL.txt b/INSTALL.txt
new file mode 100644
index 0000000..c0d3fe3
--- /dev/null
+++ b/INSTALL.txt
@@ -0,0 +1,3 @@
+Rename the "config-sample.php" to "config.php" and edit it to your needs.
+Rename the "_setup.php" to "setup.php".
+Call the index.php file from your browser. Remove or rename the "setup.php".
diff --git a/_setup.php b/_setup.php
new file mode 100755
index 0000000..8494d89
--- /dev/null
+++ b/_setup.php
@@ -0,0 +1,17 @@
+<?php
+# init file to set up the database
+# rename this file in "setup.php"
+# TODO: pretty html
+
+$db = new db();
+$db->createTables();
+$db->close();
+
+echo "<p>Successfully created the database.</p>";
+
+# rename this file to avoid setting up the tables twice
+if ( ! rename(ABSPATH . 'setup.php', ABSPATH . '_setup.php') )
+ echo "Please remove setup.php from your webserver root directory.";
+else
+ echo "Renamed this file to '_setup.php'.";
+exit;