From a5b2653ed47712b9ce12e6e79b84eb84e223d0b2 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Wed, 15 Jan 2025 18:52:15 +0200 Subject: [PATCH] Removes all old messaging system references --- app/includes/database.php | 2 +- app/pages/components.php | 3 +-- app/pages/conferences.php | 3 +-- app/pages/dashboard.php | 3 +-- app/pages/data.php | 6 ++---- app/pages/participants.php | 3 +-- doc/jilo-web_demo-data.schema | 6 +++--- 7 files changed, 10 insertions(+), 16 deletions(-) diff --git a/app/includes/database.php b/app/includes/database.php index e52be11..1789c32 100644 --- a/app/includes/database.php +++ b/app/includes/database.php @@ -52,7 +52,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') { // unknown database } else { $error = "Error: unknow database type \"{$config['db']['db_type']}\""; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $error); exit(); } diff --git a/app/pages/components.php b/app/pages/components.php index 05aa341..b2f5325 100644 --- a/app/pages/components.php +++ b/app/pages/components.php @@ -19,8 +19,7 @@ $response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $pl // if DB connection has error, display it and stop here if ($response['db'] === null) { - $error = $response['error']; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $response['error']); // otherwise if DB connection is OK, go on } else { diff --git a/app/pages/conferences.php b/app/pages/conferences.php index ebd4307..60fa75d 100644 --- a/app/pages/conferences.php +++ b/app/pages/conferences.php @@ -19,8 +19,7 @@ $response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $pl // if DB connection has error, display it and stop here if ($response['db'] === null) { - $error = $response['error']; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $response['error']); // otherwise if DB connection is OK, go on } else { diff --git a/app/pages/dashboard.php b/app/pages/dashboard.php index f0d7f15..48a6a9f 100644 --- a/app/pages/dashboard.php +++ b/app/pages/dashboard.php @@ -21,8 +21,7 @@ $response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $pl // if DB connection has error, display it and stop here if ($response['db'] === null) { - $error = $response['error']; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $response['error']); // otherwise if DB connection is OK, go on } else { diff --git a/app/pages/data.php b/app/pages/data.php index 6bff841..fcdc99a 100644 --- a/app/pages/data.php +++ b/app/pages/data.php @@ -19,8 +19,7 @@ $response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $pl // if DB connection has error, display it and stop here if ($response['db'] === null) { - $error = $response['error']; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $response['error']); // otherwise if DB connection is OK, go on } else { @@ -34,8 +33,7 @@ if ($response['db'] === null) { // Connect to Jilo database for log data $jilo_response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $platform_id); if ($jilo_response['db'] === null) { - $error = $jilo_response['error']; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $jilo_response['error']); break; } $jilo_db = $jilo_response['db']; diff --git a/app/pages/participants.php b/app/pages/participants.php index 97a13f8..cad0277 100644 --- a/app/pages/participants.php +++ b/app/pages/participants.php @@ -19,8 +19,7 @@ $response = connectDB($config, 'jilo', $platformDetails[0]['jilo_database'], $pl // if DB connection has error, display it and stop here if ($response['db'] === null) { - $error = $response['error']; - include '../app/templates/block-message.php'; + Messages::flash('ERROR', 'DEFAULT', $response['error']); // otherwise if DB connection is OK, go on } else { diff --git a/doc/jilo-web_demo-data.schema b/doc/jilo-web_demo-data.schema index b50f7cc..80eb427 100644 --- a/doc/jilo-web_demo-data.schema +++ b/doc/jilo-web_demo-data.schema @@ -1,8 +1,8 @@ -INSERT INTO users VALUES(1,'demo1','$2y$10$LtV9m.rMCJ.K/g45e6tzDexZ8C/9xxu3qFCkvz92pUYa7Jg06np0i'); -INSERT INTO users VALUES(2,'demo','$2y$10$tLCLvgYu91gf/zBoc58Am.iVls/SOMcIXO3ykGfgFFei9yneZTrb2'); +INSERT INTO users VALUES(1,'demo','$2y$10$tLCLvgYu91gf/zBoc58Am.iVls/SOMcIXO3ykGfgFFei9yneZTrb2'); +INSERT INTO users VALUES(2,'demo1','$2y$10$LtV9m.rMCJ.K/g45e6tzDexZ8C/9xxu3qFCkvz92pUYa7Jg06np0i'); -INSERT INTO users_meta VALUES(1,1,'admin user','admin@example.com',NULL,NULL,'This is a demo user of the demo install of Jilo Web'); +INSERT INTO users_meta VALUES(1,1,'demo admin user','admin@example.com',NULL,NULL,'This is a demo user of the demo install of Jilo Web'); INSERT INTO users_meta VALUES(2,2,'demo user','demo@example.com',NULL,NULL,'This is a demo user of the demo install of Jilo Web'); INSERT INTO platforms VALUES(1,'meet.lindeas.com','https://meet.lindeas.com','../jilo-meet.lindeas.db');