From: Stricted Date: Thu, 3 Sep 2015 22:02:28 +0000 (+0200) Subject: fix typo in method name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e94573ddd2cadc53da96a74d38ab667807f89806;p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git fix typo in method name --- diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index 95f1f0c..14a07bd 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -114,7 +114,7 @@ class SpeedportHybrid { * @param integer $count * @return array */ - private function sentRequest ($path, $fields, $cookie = false, $count = 0) { + private function sendRequest ($path, $fields, $cookie = false, $count = 0) { $url = $this->url.$path.'?lang=en'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); diff --git a/lib/trait/Connection.class.php b/lib/trait/Connection.class.php index 64b1ecb..4361d5d 100644 --- a/lib/trait/Connection.class.php +++ b/lib/trait/Connection.class.php @@ -18,7 +18,7 @@ trait Connection { if ($status == 'online' || $status == 'offline') { $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash, 'req_connect' => $status); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $data = $this->getValues($data['body']); if ($data['status'] == 'ok') { @@ -48,7 +48,7 @@ trait Connection { else if ($status == 'no') $status = '0'; $fields = array('csrf_token' => $this->token, 'use_lte' => $status); - $data = $this->sentEncryptedRequest($path, $fields, true); + $data = $this->sendEncryptedRequest($path, $fields, true); // debug only return $data; @@ -68,7 +68,7 @@ trait Connection { $path = 'data/modules.json'; $fields = array('csrf_token' => $this->token, 'lte_reconn' => '1'); - $data = $this->sentEncryptedRequest($path, $fields, true); + $data = $this->sendEncryptedRequest($path, $fields, true); return $data['body']; } diff --git a/lib/trait/CryptLib.class.php b/lib/trait/CryptLib.class.php index ce32bb7..1ff9499 100644 --- a/lib/trait/CryptLib.class.php +++ b/lib/trait/CryptLib.class.php @@ -13,10 +13,10 @@ trait CryptLib { * @param string $cookie * @return array */ - private function sentEncryptedRequest ($path, $fields, $cookie = false) { + private function sendEncryptedRequest ($path, $fields, $cookie = false) { $count = count($fields); $fields = $this->encrypt(http_build_query($fields)); - return $this->sentRequest($path, $fields, $cookie, $count); + return $this->sendRequest($path, $fields, $cookie, $count); } /** diff --git a/lib/trait/Firewall.class.php b/lib/trait/Firewall.class.php index 3fbe070..e4c9dba 100644 --- a/lib/trait/Firewall.class.php +++ b/lib/trait/Firewall.class.php @@ -38,7 +38,7 @@ trait Firewall { 'deleteEntry' => 'delete' ); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $data = $this->getValues($data['body']); if ($data['status'] == 'ok') { diff --git a/lib/trait/Login.class.php b/lib/trait/Login.class.php index 545a83f..09acc27 100644 --- a/lib/trait/Login.class.php +++ b/lib/trait/Login.class.php @@ -47,7 +47,7 @@ trait Login { $path = 'data/Login.json'; $this->hash = hash('sha256', $this->challenge.':'.$password); $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash); - $data = $this->sentRequest($path, $fields); + $data = $this->sendRequest($path, $fields); $json = $this->getValues($data['body']); if (isset($json['login']) && $json['login'] == 'success') { @@ -72,7 +72,7 @@ trait Login { private function getChallenge () { $path = 'data/Login.json'; $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'challengev' => 'null'); - $data = $this->sentRequest($path, $fields); + $data = $this->sendRequest($path, $fields); $data = $this->getValues($data['body']); if (isset($data['challengev']) && !empty($data['challengev'])) { @@ -101,7 +101,7 @@ trait Login { $path = 'data/SecureStatus.json'; $fields = array(); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $data = $this->getValues($data['body']); if ($data['loginstate'] != 1) { @@ -125,7 +125,7 @@ trait Login { $path = 'data/Login.json'; $fields = array('csrf_token' => $this->token, 'logout' => 'byby'); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $data = $this->getValues($data['body']); if ((isset($data['status']) && $data['status'] == 'ok') && $this->checkLogin(false) === false) { // reset challenge and session @@ -150,7 +150,7 @@ trait Login { $path = 'html/content/overview/index.html'; $fields = array(); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $a = explode('csrf_token = "', $data['body']); $a = explode('";', $a[1]); diff --git a/lib/trait/Phone.class.php b/lib/trait/Phone.class.php index 618b88c..d55bd43 100644 --- a/lib/trait/Phone.class.php +++ b/lib/trait/Phone.class.php @@ -48,7 +48,7 @@ trait Phone { 'phonebook_number_m' => $mobile ); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $data = $this->getValues($data['body']); if ($data['status'] == 'ok') { @@ -91,7 +91,7 @@ trait Phone { 'deleteEntry' => 'delete' ); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); $data = $this->getValues($data['body']); if ($data['status'] == 'ok') { diff --git a/lib/trait/System.class.php b/lib/trait/System.class.php index cf58493..4cd4c6e 100644 --- a/lib/trait/System.class.php +++ b/lib/trait/System.class.php @@ -28,7 +28,7 @@ trait System { $path = 'data/'.$file.'.json'; $fields = array(); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); return $data['body']; } @@ -61,7 +61,7 @@ trait System { $path = 'data/resetAllSetting.json'; $fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash, 'reset_all' => 'true'); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); return $data['body']; } @@ -77,7 +77,7 @@ trait System { $path = 'data/checkfirmware.json'; $fields = array('checkfirmware' => 'true'); - $data = $this->sentRequest($path, $fields, true); + $data = $this->sendRequest($path, $fields, true); return $data['body']; } @@ -92,7 +92,7 @@ trait System { $path = 'data/Reboot.json'; $fields = array('csrf_token' => $this->token, 'reboot_device' => 'true'); - $data = $this->sentEncryptedRequest($path, $fields, true); + $data = $this->sendEncryptedRequest($path, $fields, true); $data = $this->getValues($data['body']); if ($data['status'] == 'ok') {