summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorus32014-09-18 14:30:01 +0200
committerHorus32014-09-18 14:30:01 +0200
commit549f9ae5de4943e347c4d2810d795d00d53e76c8 (patch)
tree630ded5ca47335743534f0c75ba565975875585b
parente2e66e5ebb845f96703fbdacabfd0b75b29b705c (diff)
downloadvfs-549f9ae5de4943e347c4d2810d795d00d53e76c8.tar.gz
bootstrap file
-rw-r--r--public_html/class/mysql.php3
-rw-r--r--public_html/index.php2
-rw-r--r--public_html/vfs_bootstrap.php6
-rw-r--r--public_html/vfs_config.php3
4 files changed, 11 insertions, 3 deletions
diff --git a/public_html/class/mysql.php b/public_html/class/mysql.php
index d38fc2c..167c8a9 100644
--- a/public_html/class/mysql.php
+++ b/public_html/class/mysql.php
@@ -98,7 +98,8 @@ class vfsdb {
time INTEGER,
user INTEGER
)
- ENGINE=InnoDB; '
+ ENGINE=InnoDB;'
+
if ( ! $this->db->query($user_table . ' ' . $files_table . ' ' . $banned_user_table) )
failure("<p>Setting up the database failed.</p>", '500 Server Failure', false, "<h1>CREATE TABLE FAILED");
}
diff --git a/public_html/index.php b/public_html/index.php
index 5d705b8..54dfcdc 100644
--- a/public_html/index.php
+++ b/public_html/index.php
@@ -1,3 +1,3 @@
<?php
-require('./vfs_config.php');
+require_once( dirname(__FILE__) . '/vfs_bootstrap.php');
diff --git a/public_html/vfs_bootstrap.php b/public_html/vfs_bootstrap.php
new file mode 100644
index 0000000..d3624aa
--- /dev/null
+++ b/public_html/vfs_bootstrap.php
@@ -0,0 +1,6 @@
+<?php
+# loads the vfs environment
+
+require_once( dirname(__FILE__) . '/vfs_config.php');
+require(ABSPATH . 'functions.php');
+require(ABSPATH . 'class/mysql.php');
diff --git a/public_html/vfs_config.php b/public_html/vfs_config.php
index da0085a..230a3b3 100644
--- a/public_html/vfs_config.php
+++ b/public_html/vfs_config.php
@@ -9,7 +9,8 @@ define('DBCHARSET', 'utf8');
define('DBPREFIX', 'vfs_');
# absolute path
-define('ABSPATH', dirname(__FILE__));
+if( ! defined(ABSPATH) )
+ define('ABSPATH', dirname(__FILE__) . '/');
# file directory
define('FILEPATH', ABSPATH . '/../files');