Skip to content

Commit

Permalink
fix typo causing the tool to throw an error
Browse files Browse the repository at this point in the history
  • Loading branch information
malle-pietje committed Oct 12, 2017
1 parent a1f6534 commit 535bd7b
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 329 deletions.
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions config.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
];
$controllers[2] = [
'user' => '', // the user name for access to the UniFi Controller
'password' => '', // the password for access to the UniFi Controller
'url' => '', // full url to the UniFi Controller, eg. 'https://22.22.11.11:8443'
'name' => '' // name for this controller which will be used in the dropdown menu
'user' => 'demo', // the user name for access to the Unifi Controller
'password' => 'demo', // the password for access to the Unifi Controller
'url' => 'https://demo.ubnt.com:443', // full url to the Unifi Controller, eg. 'https://22.22.11.11:8443'
'name' => 'demo.ubnt.com'
];
*/

Expand Down
9 changes: 5 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* the currently supported data collections/API endpoints in the README.md file
* - this tool currently supports versions 4.x and 5.x of the UniFi Controller software
*
* VERSION: 1.0.24
* VERSION: 1.0.25
*
* ------------------------------------------------------------------------------------
*
Expand All @@ -20,7 +20,7 @@
* with this package in the file LICENSE.md
*
*/
define('API_BROWSER_VERSION', '1.0.24');
define('API_BROWSER_VERSION', '1.0.25');
define('API_CLASS_VERSION', get_client_version());

/**
Expand Down Expand Up @@ -68,6 +68,7 @@
$objects_count = '';
$alert_message = '';
$output_format = 'json';
$debug = false;

/**
* load the configuration file
Expand All @@ -86,7 +87,6 @@
* load the UniFi API client and Kint classes using composer autoloader
*/
require('vendor/autoload.php');
require('../UniFi-API-client/src/Client.php');

/**
* set relevant Kint options
Expand Down Expand Up @@ -239,7 +239,7 @@
* - if an error occurs during the login process, an alert is displayed on the page
*/
$unifidata = new UniFi_API\Client($controller['user'], $controller['password'], $controller['url'], $site_id);
$set_debug_mode = $unifidata->set_debug(trim($debug));
$set_debug_mode = $unifidata->set_debug($debug);
$loginresults = $unifidata->login();

if ($loginresults === 400) {
Expand Down Expand Up @@ -850,6 +850,7 @@ function get_client_version()
<li id="list_alarms"><a href="?action=list_alarms">list alarms</a></li>
<li id="count_alarms"><a href="?action=count_alarms">count all alarms</a></li>
<li id="count_active_alarms"><a href="?action=count_active_alarms">count active alarms</a></li>
<li role="separator" class="divider"></li>
<li id="list_events"><a href="?action=list_events">list events</a></li>
</ul>
</li>
Expand Down
Loading

0 comments on commit 535bd7b

Please sign in to comment.