Radius name reserved

This commit is contained in:
Ibnu Maksum
2023-10-04 16:25:21 +07:00
parent b2a99def98
commit 0bb20d4a16
3 changed files with 30 additions and 42 deletions

View File

@ -88,10 +88,12 @@ switch ($action) {
if ($d) {
$msg .= $_L['Router_already_exist'] . '<br>';
}
Mikrotik::getClient($ip_address, $username, $password);
if (strtolower($name) == 'radius') {
$msg .= '<b>Radius</b> name is reserved<br>';
}
if ($msg == '') {
Mikrotik::getClient($ip_address, $username, $password);
run_hook('add_router'); #HOOK
$d = ORM::for_table('tbl_routers')->create();
$d->name = $name;
@ -146,11 +148,13 @@ switch ($action) {
}
}
Mikrotik::getClient($ip_address, $username, $password);
if (strtolower($name) == 'radius') {
$msg .= '<b>Radius</b> name is reserved<br>';
}
if ($msg == '') {
Mikrotik::getClient($ip_address, $username, $password);
run_hook('router_edit'); #HOOK
$d->name = $name;
$d->ip_address = $ip_address;