mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixed #6669
Read widget config before adding a new one. (Was starting a new array)
(cherry picked from commit 236e6a54e9)
This commit is contained in:
parent
5240e07145
commit
c8faf384eb
@ -154,7 +154,9 @@ if (!is_array($config['widgets'])) {
|
||||
|
||||
if ($_POST && $_POST['sequence']) {
|
||||
|
||||
$widget_settings = array();
|
||||
// Read in the existing widget settings
|
||||
$widget_settings = $config['widgets'];
|
||||
|
||||
$widget_settings['sequence'] = rtrim($_POST['sequence'], ',');
|
||||
|
||||
foreach ($widgets as $widgetname => $widgetconfig) {
|
||||
|
||||
@ -66,20 +66,24 @@ require_once("ipsec.inc");
|
||||
require_once("functions.inc");
|
||||
|
||||
$first_time = false;
|
||||
|
||||
if (!is_array($config["widgets"]["trafficgraphs"])) {
|
||||
$first_time = true;
|
||||
$config["widgets"]["trafficgraphs"] = array();
|
||||
}
|
||||
|
||||
$a_config = &$config["widgets"]["trafficgraphs"];
|
||||
|
||||
if (!is_array($a_config["shown"])) {
|
||||
$a_config["shown"] = array();
|
||||
}
|
||||
|
||||
if (!is_array($a_config["shown"]["item"])) {
|
||||
$a_config["shown"]["item"] = array();
|
||||
}
|
||||
|
||||
$ifdescrs = get_configured_interface_with_descr();
|
||||
|
||||
if (ipsec_enabled()) {
|
||||
$ifdescrs['enc0'] = "IPsec";
|
||||
}
|
||||
@ -107,6 +111,7 @@ if ($_POST) {
|
||||
}
|
||||
|
||||
$shown = array();
|
||||
|
||||
foreach ($a_config["shown"]["item"] as $if) {
|
||||
$shown[$if] = true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user