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 Ibnu Maksum
parent f92e9612b5
commit ef6672d786
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

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