From 3fc505c312800cb6e4f8eca3cdb9855d340b4000 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Thu, 18 Sep 2014 16:53:44 +0200 Subject: fixed invalid html --- public_html/class/mysql.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'public_html/class') diff --git a/public_html/class/mysql.php b/public_html/class/mysql.php index 0031eec..d0c6949 100644 --- a/public_html/class/mysql.php +++ b/public_html/class/mysql.php @@ -12,7 +12,7 @@ class vfsdb { try { $this->db = new mysqli(DBHOST, DBUSER, DBPASSWORD, DBNAME); } catch (Exception $e){ - failure($e->getMessage(), '

500 Server Failure

', false, '

Failed to open database.

'); + failure("

".$e->getMessage()."

", '500 Server Failure', false, '

Failed to open database connection.

'); } if ( $this->db->connect_errno() ){ @@ -24,7 +24,7 @@ class vfsdb { } if ( ! $this->db->set_charset(DBCHARSET) ){ - failure("

Can't set UTF-8 as a charset on your MySQL server.

" , '500 Server Failure', false, "

Setting Charset failed!

"); + failure("

Can't set " . DBCHARSET . " as the charset on your MySQL server.

" , '500 Server Failure', false, "

Setting Charset failed!

"); } } @@ -73,6 +73,7 @@ class vfsdb { color_folder VARCHAR(70), color_file VARCHAR(70)) ENGINE=InnoDB;'; + $files_table = 'CREATE TABLE IF NOT EXISTS ' . DBPREFIX . 'files ( files_id INTEGER AUTO_INCREMENT NOT NULL, PRIMARY KEY(files_id), @@ -90,6 +91,7 @@ class vfsdb { FOREIGN KEY(files_id) REFERENCES user(id) ON DELETE CASCADE ) ENGINE=InnoDB;'; + $banned_user_table = 'CREATE TABLE IF NOT EXISTS ' . DBPREFIX . 'banned_user ( banned_id INTEGER AUTO_INCREMENT NOT NULL, PRIMARY KEY(banned_id), @@ -102,7 +104,7 @@ class vfsdb { ENGINE=InnoDB;'; if ( ! $this->db->query($user_table . ' ' . $files_table . ' ' . $banned_user_table) ) - failure("

Setting up the database failed.

", '500 Server Failure', false, "

CREATE TABLE FAILED"); + failure("

There was a problem during bootstrapping the database schema. " . $this->db->error . "

", '500 Server Failure', false, "

CREATE TABLE FAILED

"); } public function __destruct(){ -- cgit v1.2.3