|
@@ 369-377 (lines=9) @@
|
| 366 |
|
$response = ['faultcode' => 1, 'fault' => 'Invalid IP Address '.$ip]; |
| 367 |
|
} elseif (!$this->valid_ip($newip)) { |
| 368 |
|
$response = ['faultcode' => 2, 'fault' => 'Invalid IP Address '.$newip]; |
| 369 |
|
} else { |
| 370 |
|
$this->connect(); |
| 371 |
|
$response = json_decode($this->soapClient->editIp($this->getHash(), $ip, $newip), true); |
| 372 |
|
myadmin_log('fantastico', 'debug', json_encode($response), __LINE__, __FILE__); |
| 373 |
|
if (isset($response['fault '])) { |
| 374 |
|
$response['fault'] = $response['fault ']; |
| 375 |
|
unset($response['fault ']); |
| 376 |
|
} |
| 377 |
|
} |
| 378 |
|
$this->cache = []; |
| 379 |
|
return $response; |
| 380 |
|
} |
|
@@ 447-455 (lines=9) @@
|
| 444 |
|
public function addIp($ip, $type) { |
| 445 |
|
if (!$this->valid_ip($ip)) { |
| 446 |
|
$response = ['faultcode' => 1, 'fault' => 'Invalid IP Address '.$ip]; |
| 447 |
|
} else { |
| 448 |
|
$this->connect(); |
| 449 |
|
$response = json_decode($this->soapClient->addIp($this->getHash(), $ip, $type), true); |
| 450 |
|
myadmin_log('fantastico', 'debug', json_encode($response), __LINE__, __FILE__); |
| 451 |
|
if (isset($response['fault '])) { |
| 452 |
|
$response['fault'] = $response['fault ']; |
| 453 |
|
unset($response['fault ']); |
| 454 |
|
} |
| 455 |
|
} |
| 456 |
|
$this->cache = []; |
| 457 |
|
return $response; |
| 458 |
|
} |