Restructure initalization code to fix setting up new chats

This commit is contained in:
Daniel Winzen
2017-01-01 14:09:33 +01:00
parent 8142c9c799
commit d4a35bc60e
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,6 @@
Version 1.23.2 - Jan. 1, 2017
Restructure initalization code to fix setting up new chats
Version 1.23.1 - Dec. 30, 2016 Version 1.23.1 - Dec. 30, 2016
Replace configurable static size for notes and post textarea with css Replace configurable static size for notes and post textarea with css
Let offline members be ignored Let offline members be ignored

View File

@ -47,9 +47,6 @@ if(!isset($_REQUEST['session']) && isset($_COOKIE[COOKIENAME])){
} }
load_lang(); load_lang();
check_db(); check_db();
if(!check_init()){
send_init();
}
cron(); cron();
route(); route();
@ -149,8 +146,6 @@ function route(){
send_admin(route_admin()); send_admin(route_admin());
}elseif($_REQUEST['action']==='setup'){ }elseif($_REQUEST['action']==='setup'){
route_setup(); route_setup();
}elseif($_REQUEST['action']==='init'){
init_chat();
}else{ }else{
send_login(); send_login();
} }
@ -3640,7 +3635,7 @@ function init_chat(){
'incognito' =>0, 'incognito' =>0,
'nocache' =>0, 'nocache' =>0,
'nocache_old' =>1, 'nocache_old' =>1,
'tz' =>0, 'tz' =>'UTC',
'eninbox' =>0, 'eninbox' =>0,
'sortupdown' =>0, 'sortupdown' =>0,
'hidechatters' =>0, 'hidechatters' =>0,
@ -4095,6 +4090,13 @@ function check_db(){
$memcached=new Memcached(); $memcached=new Memcached();
$memcached->addServer(MEMCACHEDHOST, MEMCACHEDPORT); $memcached->addServer(MEMCACHEDHOST, MEMCACHEDPORT);
} }
if(!isset($_REQUEST['action']) || $_REQUEST['action']==='setup'){
if(!check_init()){
send_init();
}
}elseif($_REQUEST['action']==='init'){
init_chat();
}
} }
function load_fonts(){ function load_fonts(){
@ -4149,7 +4151,7 @@ function load_lang(){
function load_config(){ function load_config(){
mb_internal_encoding('UTF-8'); mb_internal_encoding('UTF-8');
define('VERSION', '1.23.1'); // Script version define('VERSION', '1.23.2'); // Script version
define('DBVERSION', 41); // Database layout version define('DBVERSION', 41); // 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