Checks jilo server only when logged in
parent
36f287e169
commit
fee54aa827
|
@ -146,18 +146,18 @@ if ($page == 'logout') {
|
||||||
$userDetails = $userObject->getUserDetails($user_id);
|
$userDetails = $userObject->getUserDetails($user_id);
|
||||||
$userRights = $userObject->getUserRights($user_id);
|
$userRights = $userObject->getUserRights($user_id);
|
||||||
$userTimezone = isset($userDetails[0]['timezone']) ? $userDetails[0]['timezone'] : 'UTC'; // Default to UTC if no timezone is set
|
$userTimezone = isset($userDetails[0]['timezone']) ? $userDetails[0]['timezone'] : 'UTC'; // Default to UTC if no timezone is set
|
||||||
}
|
|
||||||
|
|
||||||
// check if the Jilo Server is running
|
// check if the Jilo Server is running
|
||||||
require '../app/classes/server.php';
|
require '../app/classes/server.php';
|
||||||
$serverObject = new Server($dbWeb);
|
$serverObject = new Server($dbWeb);
|
||||||
|
|
||||||
$server_host = '127.0.0.1';
|
$server_host = '127.0.0.1';
|
||||||
$server_port = '8080';
|
$server_port = '8080';
|
||||||
$server_endpoint = '/health';
|
$server_endpoint = '/health';
|
||||||
$server_status = $serverObject->getServerStatus($server_host, $server_port, $server_endpoint);
|
$server_status = $serverObject->getServerStatus($server_host, $server_port, $server_endpoint);
|
||||||
if (!$server_status) {
|
if (!$server_status) {
|
||||||
$error = 'The Jilo Server is not running. Some data may be old and incorrect.';
|
$error = 'The Jilo Server is not running. Some data may be old and incorrect.';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// page building
|
// page building
|
||||||
|
|
Loading…
Reference in New Issue