Fixed SQL query
This commit is contained in:
@ -5,7 +5,7 @@ const DBUSER='hosting'; // Database user
|
|||||||
const DBPASS='MY_PASSWORD'; // Database password
|
const DBPASS='MY_PASSWORD'; // Database password
|
||||||
const DBNAME='hosting'; // Database
|
const DBNAME='hosting'; // Database
|
||||||
const PERSISTENT=true; // Use persistent database conection true/false
|
const PERSISTENT=true; // Use persistent database conection true/false
|
||||||
const DBVERSION=19; //database layout version
|
const DBVERSION=20; //database layout version
|
||||||
const CAPTCHA=1; // Captcha difficulty (0=off, 1=simple, 2=moderate, 3=extreme)
|
const CAPTCHA=1; // Captcha difficulty (0=off, 1=simple, 2=moderate, 3=extreme)
|
||||||
const ADDRESS='dhosting4xxoydyaivckq7tsmtgi4wfs3flpeyitekkmqwu4v4r46syd.onion'; // our own address
|
const ADDRESS='dhosting4xxoydyaivckq7tsmtgi4wfs3flpeyitekkmqwu4v4r46syd.onion'; // our own address
|
||||||
const CANONICAL_URL='https://hosting.danwin1210.me'; // our preferred domain for search engines
|
const CANONICAL_URL='https://hosting.danwin1210.me'; // our preferred domain for search engines
|
||||||
|
@ -164,8 +164,8 @@ if(!@$version=$db->query("SELECT value FROM settings WHERE setting='version';"))
|
|||||||
$db->exec('UPDATE disk_quota set updated=1;');
|
$db->exec('UPDATE disk_quota set updated=1;');
|
||||||
$db->exec("ALTER TABLE users ADD pgp_key text COLLATE 'latin1_bin' NULL, ADD pgp_verified tinyint(1) NOT NULL DEFAULT '0', ADD tfa tinyint(1) NOT NULL DEFAULT '0';");
|
$db->exec("ALTER TABLE users ADD pgp_key text COLLATE 'latin1_bin' NULL, ADD pgp_verified tinyint(1) NOT NULL DEFAULT '0', ADD tfa tinyint(1) NOT NULL DEFAULT '0';");
|
||||||
}
|
}
|
||||||
if($version<19){
|
if($version<20){
|
||||||
$db->exec("ALTER TABLE onions max_streams tinyint(3) unsigned NOT NULL DEFAULT '6';");
|
$db->exec("ALTER TABLE onions CHANGE max_streams max_streams tinyint(3) unsigned NOT NULL DEFAULT '6';");
|
||||||
}
|
}
|
||||||
$stmt=$db->prepare("UPDATE settings SET value=? WHERE setting='version';");
|
$stmt=$db->prepare("UPDATE settings SET value=? WHERE setting='version';");
|
||||||
$stmt->execute([DBVERSION]);
|
$stmt->execute([DBVERSION]);
|
||||||
|
Reference in New Issue
Block a user