mirror of
https://github.com/Art-of-WiFi/UniFi-API-client.git
synced 2024-11-21 17:49:59 +01:00
API client class v1.1.46
- applied patches to update_switch_poe-mode.php as suggested by scrutinizer-ci.com - placed warning that UniFI OS is not (yet) supported
This commit is contained in:
parent
ca25c8ab52
commit
a3fc0732e2
@ -9,7 +9,11 @@ This class can be installed manually or using composer/[packagist](https://packa
|
||||
- a web server with PHP and cURL modules installed (tested on Apache 2.4 with PHP Version 5.6.1 and cURL 7.42.1 and with PHP 7.2.24 and cURL 7.58.0)
|
||||
- network connectivity between this web server and the server and port (normally TCP port 8443) where the UniFi Controller is running
|
||||
|
||||
## Installation ##
|
||||
## UniFi OS Support
|
||||
|
||||
Currently, UniFi OS-based controllers (UniFi Dream Machine Pro) are **not supported** due to several breaking changes to the API.
|
||||
|
||||
## Installation
|
||||
|
||||
You can use [Composer](#composer), [Git](#git) or simply [Download the Release](#download-the-release) to install the API client class.
|
||||
|
||||
|
@ -43,7 +43,8 @@ function update_ports($running_config, $ports, $poe_mode){
|
||||
/**
|
||||
* Update already non-default ports
|
||||
*/
|
||||
for($i = 0; $i < count($running_config); $i++){
|
||||
$running_config_count = count($running_config);
|
||||
for($i = 0; $i < $running_config_count; $i++){
|
||||
if(in_array($running_config[$i]->port_idx, $ports)){
|
||||
$running_config[$i]->poe_mode = $poe_mode;
|
||||
unset($ports[array_search($running_config[$i]->port_idx, $ports)]);
|
||||
@ -71,7 +72,7 @@ $current_conf = $data[0]->port_overrides;
|
||||
/**
|
||||
* This reads in the values provided via URL or in the command line, if nothing is set than it will poe_mode will be set to "auto"
|
||||
*/
|
||||
if (isset($_GET[poe_mode])) {
|
||||
if (isset($_GET[$poe_mode])) {
|
||||
$poe_mode = $_GET[poe_mode];
|
||||
} elseif (isset($argv[1])) {
|
||||
$poe_mode = $argv[1];
|
||||
|
Loading…
Reference in New Issue
Block a user