@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function __construct($username, $password) { |
| 76 | 76 | $this->cache = array(); |
| 77 | - $this->soapClient = null; |
|
| 77 | + $this->soapClient = NULL; |
|
| 78 | 78 | $this->api_username = $username; |
| 79 | 79 | $this->api_password = $password; |
| 80 | 80 | } |
@@ -157,10 +157,10 @@ discard block |
||
| 157 | 157 | return $this->cache['getIpList_'.$type]; |
| 158 | 158 | } |
| 159 | 159 | if (!$this->isType($type)) { |
| 160 | - return false; |
|
| 160 | + return FALSE; |
|
| 161 | 161 | } |
| 162 | 162 | $this->connect(); |
| 163 | - $this->cache['getIpList_'.$type] = json_decode($this->soapClient->getIpList($this->getHash(), $type), true); |
|
| 163 | + $this->cache['getIpList_'.$type] = json_decode($this->soapClient->getIpList($this->getHash(), $type), TRUE); |
|
| 164 | 164 | myadmin_log('fantastico', 'debug', json_encode($this->cache['getIpList_'.$type]), __LINE__, __FILE__); |
| 165 | 165 | return $this->cache['getIpList_'.$type]; |
| 166 | 166 | } |
@@ -208,14 +208,14 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | public function getIpListDetailed($type = self::ALL_TYPES) { |
| 210 | 210 | if (!$this->isType($type)) { |
| 211 | - return false; |
|
| 211 | + return FALSE; |
|
| 212 | 212 | } |
| 213 | 213 | if (isset($this->cache['getIpListDetailed_'.$type])) { |
| 214 | 214 | return $this->cache['getIpListDetailed_'.$type]; |
| 215 | 215 | } |
| 216 | 216 | $this->connect(); |
| 217 | 217 | //try { |
| 218 | - $response = json_decode($this->soapClient->__soapCall('getIpListDetailed', array($this->getHash(), $type)), true); |
|
| 218 | + $response = json_decode($this->soapClient->__soapCall('getIpListDetailed', array($this->getHash(), $type)), TRUE); |
|
| 219 | 219 | myadmin_log('fantastico', 'debug', json_encode($response), __LINE__, __FILE__); |
| 220 | 220 | //echo '<pre>';echo print_r($response, true);echo '</pre>'; |
| 221 | 221 | //$this->cache['getIpListDetailed_' . $type] = $this->cache['getIpListDetailed_' . $type]->Licenses; |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | * @return bool whether or not the ip was validated |
| 255 | 255 | */ |
| 256 | 256 | public function valid_ip($ip) { |
| 257 | - return ip2long($ip) !== false; |
|
| 257 | + return ip2long($ip) !== FALSE; |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | /** |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | return $this->cache['getIpDetails_'.$ip]; |
| 291 | 291 | } |
| 292 | 292 | $this->connect(); |
| 293 | - $this->cache['getIpDetails_'.$ip] = json_decode($this->soapClient->getIpDetails($this->getHash(), $ip), true); |
|
| 293 | + $this->cache['getIpDetails_'.$ip] = json_decode($this->soapClient->getIpDetails($this->getHash(), $ip), TRUE); |
|
| 294 | 294 | myadmin_log('fantastico', 'debug', json_encode($this->cache['getIpDetails_'.$ip]), __LINE__, __FILE__); |
| 295 | 295 | return $this->cache['getIpDetails_'.$ip]; |
| 296 | 296 | } |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | $response = ['faultcode' => 2, 'fault' => 'Invalid IP Address '.$newip]; |
| 369 | 369 | } else { |
| 370 | 370 | $this->connect(); |
| 371 | - $response = json_decode($this->soapClient->editIp($this->getHash(), $ip, $newip), true); |
|
| 371 | + $response = json_decode($this->soapClient->editIp($this->getHash(), $ip, $newip), TRUE); |
|
| 372 | 372 | myadmin_log('fantastico', 'debug', json_encode($response), __LINE__, __FILE__); |
| 373 | 373 | if (isset($response['fault '])) { |
| 374 | 374 | $response['fault'] = $response['fault ']; |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | $response = ['faultcode' => 1, 'fault' => 'Invalid IP Address '.$ip]; |
| 447 | 447 | } else { |
| 448 | 448 | $this->connect(); |
| 449 | - $response = json_decode($this->soapClient->addIp($this->getHash(), $ip, $type), true); |
|
| 449 | + $response = json_decode($this->soapClient->addIp($this->getHash(), $ip, $type), TRUE); |
|
| 450 | 450 | myadmin_log('fantastico', 'debug', json_encode($response), __LINE__, __FILE__); |
| 451 | 451 | if (isset($response['fault '])) { |
| 452 | 452 | $response['fault'] = $response['fault ']; |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | return array('faultcode' => 1, 'fault ' => 'Invalid IP Address '.$ip); |
| 463 | 463 | } |
| 464 | 464 | $this->connect(); |
| 465 | - $response = json_decode($this->soapClient->$function($this->getHash(), $ip), true); |
|
| 465 | + $response = json_decode($this->soapClient->$function($this->getHash(), $ip), TRUE); |
|
| 466 | 466 | myadmin_log('fantastico', 'debug', json_encode($response), __LINE__, __FILE__); |
| 467 | 467 | $this->cache = array(); |
| 468 | 468 | return $response; |