From 0f12c0d21e99bf087ea73b52ba41662aa31842cd Mon Sep 17 00:00:00 2001 From: Phyks Date: Fri, 13 Sep 2013 19:51:09 +0200 Subject: [PATCH] Updated forgotten fields in install.php --- install.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.php b/install.php index 805ebb4..20f711c 100644 --- a/install.php +++ b/install.php @@ -25,10 +25,10 @@ $db = new PDO('mysql:host='.$mysql_host.';dbname='.$mysql_db, $mysql_login, $mysql_password); //Create table "Users" - $db->query('CREATE TABLE IF NOT EXISTS '.$mysql_prefix.'Users (id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, login VARCHAR(255), display_name VARCHAR(255), password VARCHAR(130), admin TINYINT(1)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'); + $db->query('CREATE TABLE IF NOT EXISTS '.$mysql_prefix.'Users (id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, login VARCHAR(255), display_name VARCHAR(255), password VARCHAR(130), admin TINYINT(1), json_token VARCHAR(32)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'); //Create table "Invoices" - $db->query('CREATE TABLE IF NOT EXISTS '.$mysql_prefix.'Invoices (id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, date DATETIME, users_in VARCHAR(255), buyer INT(11), amount FLOAT, what TEXT) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'); + $db->query('CREATE TABLE IF NOT EXISTS '.$mysql_prefix.'Invoices (id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, date DATETIME, buyer INT(11), amount FLOAT, what TEXT) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'); //Create table "Users_in_invoices" $db->query('CREATE TABLE IF NOT EXISTS '.$mysql_prefix.'Users_in_invoices (invoice_id INT(11) NOT NULL, KEY invoice_id (invoice_id), user_id INT(11), KEY user_id (user_id), guests INT(11)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci'); @@ -79,6 +79,7 @@ $admin->setDisplayName($_POST['admin_display_name']); $admin->setPassword($admin->encrypt($_POST['admin_password'])); $admin->setAdmin(true); + $admin->newJsonToken(); $admin->save(); header('location: index.php');