Update init.php

- replace ismysqlRadius with isTableExist , to use it any many diffrent position.
This commit is contained in:
ABDALRAHMAN MOLOOD 2024-08-15 18:46:44 +03:00 committed by GitHub
parent 6740b0212d
commit 73aa663b25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -358,12 +358,13 @@ function displayMaintenanceMessage(): void
die();
}
function isMysqlRadius()
function isTableExist($table)
{
try {
$record = ORM::forTable('radacct', 'radius')->find_one();
$record = ORM::forTable($table)->find_one();
return $record !== false;
} catch (Exception $e) {
return false;
}
}