fix dummy setup
authorChristian Weiske <cweiske@cweiske.de>
Thu, 16 Dec 2010 17:58:46 +0000 (18:58 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 16 Dec 2010 17:58:46 +0000 (18:58 +0100)
scripts/linksys-wrt3g.php

index 824c287..628dfe9 100755 (executable)
@@ -123,16 +123,16 @@ try {
 
 try {
     $router = new Wrt3g();
 
 try {
     $router = new Wrt3g();
+    $router->verbosity = $result->options['verbosity'];
+    $router->host      = $result->options['host'];
+    $router->user      = $result->options['user'];
+    $router->password  = $result->options['password'];
+
     if ($result->options['dummy']) {
         require_once 'Wrt3g/DummyRequest.php';
         $router->requestClass = 'Wrt3g_DummyRequest';
         $router->log('Using dummy data', 1);
     if ($result->options['dummy']) {
         require_once 'Wrt3g/DummyRequest.php';
         $router->requestClass = 'Wrt3g_DummyRequest';
         $router->log('Using dummy data', 1);
-    } else {
     }
     }
-    $router->verbosity = $result->options['verbosity'];
-    $router->host      = $result->options['host'];
-    $router->user      = $result->options['user'];
-    $router->password  = $result->options['password'];
 
     $router->log('Command: ' . $result->command_name, 2);
 
 
     $router->log('Command: ' . $result->command_name, 2);