From: Stricted Date: Sat, 8 Aug 2015 06:54:05 +0000 (+0200) Subject: fix code style X-Git-Tag: 1.0.5~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=22203a43eb200a4c61b5e88a1b6576880c0729b4;p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git fix code style --- diff --git a/Speedportw724v.class.php b/Speedportw724v.class.php index 6d2d76f..586e8cd 100644 --- a/Speedportw724v.class.php +++ b/Speedportw724v.class.php @@ -7,22 +7,22 @@ require_once('SpeedportHybrid.class.php'); * @copyright 2015 Jan Altensen (Stricted) */ class Speedportw724v extends SpeedportHybrid { - public function login ($password) { + public function login ($password) { /* this is experimental, i dont have a speedport w724v so i cant test this * feel free to test it and report if it dosent work */ - $path = 'data/Login.json'; - $this->hash = md5($password); - $fields = array('password' => $this->hash, 'password_shadowed' => $this->hash, 'showpw' => 0); - $data = $this->sentRequest($path, $fields); - $json = $this->getValues($data['body']); - - if (isset($json['login']) && $json['login'] == 'success') { + $path = 'data/Login.json'; + $this->hash = md5($password); + $fields = array('password' => $this->hash, 'password_shadowed' => $this->hash, 'showpw' => 0); + $data = $this->sentRequest($path, $fields); + $json = $this->getValues($data['body']); + + if (isset($json['login']) && $json['login'] == 'success') { $this->cookie = $data['header']['Set-Cookie']; return true; } return false; - } + } }