From 655c9abd0f1732299feec91cda01ec83032278cf Mon Sep 17 00:00:00 2001 From: Stricted Date: Sun, 26 Jul 2015 18:33:35 +0200 Subject: [PATCH] add unstable function changeLTEStatus --- SpeedportHybrid.class.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index c9b2dd2..758385e 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -194,7 +194,7 @@ class SpeedportHybrid { * @param string $status * @return boolean */ - public function changeConnectionStatus ($status) { + public function changeDSLStatus ($status) { $this->checkLogin(); $path = 'data/Connect.json'; @@ -216,6 +216,31 @@ class SpeedportHybrid { } } + /** + * change lte connection status + * + * @param string $status + * @return boolean + */ + public function changeLTEStatus ($status) { + throw new Exception('unstable funtion'); + $path = 'data/Modules.json'; + + if ($status == '0' || $status == '1' || $status == 'yes' || $status == 'no') { + if ($status == 'yes') $status = '1'; + else if ($status == 'no') $status = '0'; + + $fields = array('csrf_token' => $this->token, 'use_lte' => $status); + $data = $this->sentEncryptedRequest($path, $fields, true); + + // debug only + return $data; + } + else { + throw new RouterException('unknown status'); + } + } + /** * get uptime based on online (connection) time * -- 2.20.1