Skip to content

Commit 14232b7

Browse files
fix: do not check for updates inline for non-update UI pages
Fixes an issue that could result in a crash if release updates could not be determined when loading the Settings UI page.
1 parent 67ff085 commit 14232b7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pfSense-pkg-API/files/usr/local/www/api/index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
include('head.inc');
2424
echo "<link rel='stylesheet' href='/css/api/api.css'/>";
2525
echo "<script type='application/javascript' src='/js/api.js'></script>";
26-
$update_tab = (APISystemAPIVersionRead::is_update_available()) ? "Update (New Release Available)" : "Update";
27-
$tab_array = [[gettext("Settings"), true, "/api/"], [gettext("Documentation"), false, "/api/documentation/"], [gettext($update_tab), false, "/api/update/"]];
26+
$tab_array = [[gettext("Settings"), true, "/api/"], [gettext("Documentation"), false, "/api/documentation/"], [gettext("Update"), false, "/api/update/"]];
2827
display_top_tabs($tab_array, true); # Ensure the tabs are written to the top of page
2928

3029
# Variables

pfSense-pkg-API/files/usr/local/www/api/update/index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
echo "<script type='application/javascript' src='/js/api.js'></script>";
2626
$pkg_index = APITools\get_api_config()[0];
2727
$pkg_config = APITools\get_api_config()[1];
28-
$update_tab = (APISystemAPIVersionRead::is_update_available()) ? "Update (New Release Available)" : "Update";
29-
$tab_array = [[gettext("Settings"), false, "/api/"], [gettext("Documentation"), false, "/api/documentation/"], [gettext($update_tab), true, "/api/update/"]];
28+
$tab_array = [[gettext("Settings"), false, "/api/"], [gettext("Documentation"), false, "/api/documentation/"], [gettext("Update"), true, "/api/update/"]];
3029
display_top_tabs($tab_array, true); # Ensure the tabs are written to the top of page
3130

3231
# Save changes before loading version information, so the changes will be loaded correctly afterward.

0 commit comments

Comments
 (0)