mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixed #5714
This commit is contained in:
parent
62d61a2f9a
commit
29c0d920f4
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<pfsense>
|
||||
<version>13.2</version>
|
||||
<version>13.4</version>
|
||||
<lastchange/>
|
||||
<system>
|
||||
<optimization>normal</optimization>
|
||||
|
||||
@ -99,7 +99,7 @@ $g = array(
|
||||
"disablecrashreporter" => false,
|
||||
"crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php",
|
||||
"debug" => false,
|
||||
"latest_config" => "13.3",
|
||||
"latest_config" => "13.4",
|
||||
"nopkg_platforms" => array("cdrom"),
|
||||
"minimum_ram_warning" => "101",
|
||||
"minimum_ram_warning_text" => "128 MB",
|
||||
|
||||
@ -4235,4 +4235,29 @@ function upgrade_132_to_133() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Determine the highest column number in use and set dashboardcolumns accordingly
|
||||
function upgrade_133_to_134() {
|
||||
global $config;
|
||||
|
||||
if (!isset($config['widgets']['sequence']) || isset($config['system']['webgui']['dashboardcolumns'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cur_widgets = explode(',', trim($config['widgets']['sequence']));
|
||||
$maxcols = 2;
|
||||
|
||||
foreach ($cur_widgets as $widget) {
|
||||
list($file, $col, $display) = explode(':', $widget);
|
||||
|
||||
if (($display != 'none') && ($display != 'hide')) {
|
||||
preg_match('#[0-9]+$#', $col, $column);
|
||||
if ($column[0] > $maxcols) {
|
||||
$maxcols = $column[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$config['system']['webgui']['dashboardcolumns'] = $maxcols % 10;
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user