mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-02 17:24:41 +02:00
Allow delete Pool and plan when Router already deleted
This commit is contained in:
parent
1583068f57
commit
c69b43dbf6
3 changed files with 27 additions and 15 deletions
|
@ -63,8 +63,12 @@ switch ($action) {
|
|||
$mikrotik = Mikrotik::info($d['routers']);
|
||||
if ($d) {
|
||||
if ($d['routers'] != 'radius') {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removePool($client, $d['pool_name']);
|
||||
try{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removePool($client, $d['pool_name']);
|
||||
}catch(Exception $e){
|
||||
//ignore exception, it means router has already deleted
|
||||
}
|
||||
}
|
||||
$d->delete();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue