add unstable function changeLTEStatus
authorStricted <info@stricted.de>
Sun, 26 Jul 2015 16:33:35 +0000 (18:33 +0200)
committerStricted <info@stricted.de>
Sun, 26 Jul 2015 16:33:35 +0000 (18:33 +0200)
SpeedportHybrid.class.php

index c9b2dd271ac60cc1e0cee0867ba57864b13982d1..758385ee53c5be8e757129b58891fc74153c2364 100644 (file)
@@ -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
         *