Add filtermodkick setting to db if missing
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Version 1.23.7 - Feb. 24, 2019
|
||||||
|
Support V3 hidden services
|
||||||
|
Fixed filtermodkick setting
|
||||||
|
fixed restore_backup not encrypting notes
|
||||||
|
|
||||||
Version 1.23.6 - Apr. 22, 2018
|
Version 1.23.6 - Apr. 22, 2018
|
||||||
Added Czech, Italian and Ukrainian translation
|
Added Czech, Italian and Ukrainian translation
|
||||||
Updated Russian translation
|
Updated Russian translation
|
||||||
|
10
chat.php
10
chat.php
@ -3968,9 +3968,6 @@ function update_db(){
|
|||||||
$db->exec('CREATE INDEX ' . PREFIX . 'notes_type ON ' . PREFIX . 'notes(type);');
|
$db->exec('CREATE INDEX ' . PREFIX . 'notes_type ON ' . PREFIX . 'notes(type);');
|
||||||
$db->exec('CREATE INDEX ' . PREFIX . 'notes_editedby ON ' . PREFIX . 'notes(editedby);');
|
$db->exec('CREATE INDEX ' . PREFIX . 'notes_editedby ON ' . PREFIX . 'notes(editedby);');
|
||||||
}
|
}
|
||||||
if($dbversion<40){
|
|
||||||
$db->exec('INSERT INTO ' . PREFIX . "settings (setting, value) VALUES ('filtermodkick', '1');");
|
|
||||||
}
|
|
||||||
if($dbversion<41){
|
if($dbversion<41){
|
||||||
$db->exec('DROP TABLE ' . PREFIX . 'sessions;');
|
$db->exec('DROP TABLE ' . PREFIX . 'sessions;');
|
||||||
$db->exec('CREATE TABLE ' . PREFIX . "sessions (id $primary, session char(32) NOT NULL UNIQUE, nickname varchar(50) NOT NULL UNIQUE, status smallint NOT NULL, refresh smallint NOT NULL, style varchar(255) NOT NULL, lastpost integer NOT NULL, passhash varchar(255) NOT NULL, postid char(6) NOT NULL DEFAULT '000000', useragent varchar(255) NOT NULL, kickmessage varchar(255) DEFAULT '', bgcolour char(6) NOT NULL, entry integer NOT NULL, timestamps smallint NOT NULL, embed smallint NOT NULL, incognito smallint NOT NULL, ip varchar(45) NOT NULL, nocache smallint NOT NULL, tz varchar(255) NOT NULL, eninbox smallint NOT NULL, sortupdown smallint NOT NULL, hidechatters smallint NOT NULL, nocache_old smallint NOT NULL)$memengine$charset;");
|
$db->exec('CREATE TABLE ' . PREFIX . "sessions (id $primary, session char(32) NOT NULL UNIQUE, nickname varchar(50) NOT NULL UNIQUE, status smallint NOT NULL, refresh smallint NOT NULL, style varchar(255) NOT NULL, lastpost integer NOT NULL, passhash varchar(255) NOT NULL, postid char(6) NOT NULL DEFAULT '000000', useragent varchar(255) NOT NULL, kickmessage varchar(255) DEFAULT '', bgcolour char(6) NOT NULL, entry integer NOT NULL, timestamps smallint NOT NULL, embed smallint NOT NULL, incognito smallint NOT NULL, ip varchar(45) NOT NULL, nocache smallint NOT NULL, tz varchar(255) NOT NULL, eninbox smallint NOT NULL, sortupdown smallint NOT NULL, hidechatters smallint NOT NULL, nocache_old smallint NOT NULL)$memengine$charset;");
|
||||||
@ -3997,6 +3994,9 @@ function update_db(){
|
|||||||
$db->exec('CREATE INDEX ' . PREFIX . 'inbox_recipient ON ' . PREFIX . 'inbox(recipient);');
|
$db->exec('CREATE INDEX ' . PREFIX . 'inbox_recipient ON ' . PREFIX . 'inbox(recipient);');
|
||||||
$db->exec('ALTER TABLE ' . PREFIX . 'inbox ADD FOREIGN KEY (recipient) REFERENCES ' . PREFIX . 'members(nickname) ON DELETE CASCADE ON UPDATE CASCADE;');
|
$db->exec('ALTER TABLE ' . PREFIX . 'inbox ADD FOREIGN KEY (recipient) REFERENCES ' . PREFIX . 'members(nickname) ON DELETE CASCADE ON UPDATE CASCADE;');
|
||||||
}
|
}
|
||||||
|
if($dbversion<42){
|
||||||
|
$db->exec('INSERT IGNORE INTO ' . PREFIX . "settings (setting, value) VALUES ('filtermodkick', '1');");
|
||||||
|
}
|
||||||
update_setting('dbversion', DBVERSION);
|
update_setting('dbversion', DBVERSION);
|
||||||
if($msgencrypted!==MSGENCRYPTED){
|
if($msgencrypted!==MSGENCRYPTED){
|
||||||
if(!extension_loaded('openssl')){
|
if(!extension_loaded('openssl')){
|
||||||
@ -4177,8 +4177,8 @@ function load_lang(){
|
|||||||
|
|
||||||
function load_config(){
|
function load_config(){
|
||||||
mb_internal_encoding('UTF-8');
|
mb_internal_encoding('UTF-8');
|
||||||
define('VERSION', '1.23.6'); // Script version
|
define('VERSION', '1.23.7'); // Script version
|
||||||
define('DBVERSION', 41); // Database layout version
|
define('DBVERSION', 42); // Database layout version
|
||||||
define('MSGENCRYPTED', false); // Store messages encrypted in the database to prevent other database users from reading them - true/false - visit the setup page after editing!
|
define('MSGENCRYPTED', false); // Store messages encrypted in the database to prevent other database users from reading them - true/false - visit the setup page after editing!
|
||||||
define('ENCRYPTKEY', 'MY_KEY'); // Encryption key for messages
|
define('ENCRYPTKEY', 'MY_KEY'); // Encryption key for messages
|
||||||
define('DBHOST', 'localhost'); // Database host
|
define('DBHOST', 'localhost'); // Database host
|
||||||
|
Reference in New Issue
Block a user