Skip to content

Commit a2358c0

Browse files
committed
UniFi API browser 2.0.5
- fixed error when using the PHP reset function
1 parent 476f72a commit a2358c0

File tree

461 files changed

+71
-15714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

461 files changed

+71
-15714
lines changed

ajax/fetch_collection.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
$params = [];
7373

7474
/**
75-
* POSTed object:
75+
* POSTed object properties:
7676
* selected_collection_method
7777
* selected_collection_label
7878
* selected_collection_key
@@ -97,15 +97,19 @@
9797
$output_method = $_POST['selected_output_method'];
9898
}
9999

100-
switch ($method) {
101-
case 'stat_5minutes_gateway':
102-
$params = [null, null, $gateway_stats_attribs];
103-
break;
104-
case 'stat_hourly_gateway':
105-
$params = [null, null, $gateway_stats_attribs];
106-
break;
107-
case 'stat_daily_gateway':
108-
$params = [null, null, $gateway_stats_attribs];
100+
if (empty($params)) {
101+
switch ($method) {
102+
case 'stat_5minutes_gateway':
103+
$params = [null, null, $gateway_stats_attribs];
104+
105+
break;
106+
case 'stat_hourly_gateway':
107+
$params = [null, null, $gateway_stats_attribs];
108+
109+
break;
110+
case 'stat_daily_gateway':
111+
$params = [null, null, $gateway_stats_attribs];
112+
}
109113
}
110114

111115
if (!empty($method) && !empty($site_id)) {
@@ -162,17 +166,14 @@
162166
/**
163167
* Plain render mode
164168
*/
169+
Kint_Renderer_Text::$decorations = false;
165170
Kint::$display_called_from = false;
166171
$results['data'] = @s($data_array);
167172
} else {
168173
$results['data'] = $data_array;
169174
}
170-
171-
/**
172-
* for other future output methods
173-
*/
174-
//$results['data'] = print_r($data_array, true);
175175
}
176+
176177
/**
177178
* execute timing of data collection from UniFi controller
178179
*/

common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* with this package in the file LICENSE.md
88
*
99
*/
10-
define('TOOL_VERSION', '2.0.4');
10+
define('TOOL_VERSION', '2.0.5');
1111

1212
/**
1313
* gather some basic information for the About modal

composer.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@
1414
session_start();
1515

1616
/**
17-
* check whether user has requested to clear (force expiry) the PHP session
17+
* check whether user has requested to clear (force expiry) the PHP session, if so we
18+
* clear the session and reload the page without the query string
1819
* - this feature can be useful when login errors occur, mostly after upgrades or credential changes
1920
*/
2021
if (isset($_GET['reset_session']) && $_GET['reset_session'] == true) {
2122
$_SESSION = [];
2223
session_unset();
2324
session_destroy();
2425
session_start();
26+
$current_url = $_SERVER['REQUEST_URI'];
27+
$current_url = strtok($current_url, '?');
28+
header("refresh: 0; url = $current_url");
2529
}
2630

2731
/**

js/custom.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ $('#about_modal').on('shown.bs.modal', function (e) {
547547
$('#span_api_browser_update').removeClass('badge-success').addClass('badge-warning');
548548
} else if (api_browser_version == json.tag_name.substring(1)) {
549549
$('#span_api_browser_update').html('up to date');
550+
$('#span_api_browser_update').removeClass('badge-danger').addClass('badge-success');
550551
} else {
551552
$('#span_api_browser_update').html('bleeding edge!');
552553
$('#span_api_browser_update').removeClass('badge-success').addClass('badge-danger');

vendor/composer/installed.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@
110110
},
111111
{
112112
"name": "symfony/polyfill-ctype",
113-
"version": "v1.12.0",
114-
"version_normalized": "1.12.0.0",
113+
"version": "v1.13.0",
114+
"version_normalized": "1.13.0.0",
115115
"source": {
116116
"type": "git",
117117
"url": "https://github.com/symfony/polyfill-ctype.git",
118-
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
118+
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
119119
},
120120
"dist": {
121121
"type": "zip",
122-
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
123-
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
122+
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
123+
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
124124
"shasum": ""
125125
},
126126
"require": {
@@ -129,11 +129,11 @@
129129
"suggest": {
130130
"ext-ctype": "For best performance"
131131
},
132-
"time": "2019-08-06T08:03:45+00:00",
132+
"time": "2019-11-27T13:56:44+00:00",
133133
"type": "library",
134134
"extra": {
135135
"branch-alias": {
136-
"dev-master": "1.12-dev"
136+
"dev-master": "1.13-dev"
137137
}
138138
},
139139
"installation-source": "dist",
@@ -170,17 +170,17 @@
170170
},
171171
{
172172
"name": "twig/twig",
173-
"version": "v1.42.3",
174-
"version_normalized": "1.42.3.0",
173+
"version": "v1.42.4",
174+
"version_normalized": "1.42.4.0",
175175
"source": {
176176
"type": "git",
177177
"url": "https://github.com/twigphp/Twig.git",
178-
"reference": "201baee843e0ffe8b0b956f336dd42b2a92fae4e"
178+
"reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152"
179179
},
180180
"dist": {
181181
"type": "zip",
182-
"url": "https://api.github.com/repos/twigphp/Twig/zipball/201baee843e0ffe8b0b956f336dd42b2a92fae4e",
183-
"reference": "201baee843e0ffe8b0b956f336dd42b2a92fae4e",
182+
"url": "https://api.github.com/repos/twigphp/Twig/zipball/e587180584c3d2d6cb864a0454e777bb6dcb6152",
183+
"reference": "e587180584c3d2d6cb864a0454e777bb6dcb6152",
184184
"shasum": ""
185185
},
186186
"require": {
@@ -192,7 +192,7 @@
192192
"symfony/debug": "^3.4|^4.2",
193193
"symfony/phpunit-bridge": "^4.4@dev|^5.0"
194194
},
195-
"time": "2019-08-24T12:51:03+00:00",
195+
"time": "2019-11-11T16:49:32+00:00",
196196
"type": "library",
197197
"extra": {
198198
"branch-alias": {

vendor/symfony/polyfill-ctype/Ctype.php

100755100644
File mode changed.

vendor/symfony/polyfill-ctype/LICENSE

100755100644
File mode changed.

vendor/symfony/polyfill-ctype/README.md

100755100644
File mode changed.

vendor/symfony/polyfill-ctype/bootstrap.php

100755100644
File mode changed.

0 commit comments

Comments
 (0)