diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-11-12 11:37:18 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-11-12 11:39:33 -0500 |
commit | 1fd9322bed133abb12eeb3696bf7ab8e170319cc (patch) | |
tree | c8ff26603328d68958a785bbd56693420f9346aa /src/etc | |
parent | 06fdb1e50f089efacab0d1eeb6cb1806aada102b (diff) | |
download | pfsense-1fd9322bed133abb12eeb3696bf7ab8e170319cc.zip pfsense-1fd9322bed133abb12eeb3696bf7ab8e170319cc.tar.gz |
Fixed #5432
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 39 |
2 files changed, 40 insertions, 1 deletions
diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index e1aab12..c63d499 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -72,7 +72,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "12.6", + "latest_config" => "12.7", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index c533149..ea38fbf 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4048,5 +4048,44 @@ function upgrade_125_to_126() { } } +// prior to v2.3 <widgets><sequence> contains a list of widgets with display types: +// none, close, hide, & show +// v2.3 & later uses: +// close & open +// widgets not in use are simply not in the list +function upgrade_126_to_127() { + global $config; + + if (!isset($config['widgets']['sequence'])) { + return; + } + + $cur_widgets = explode(',', trim($config['widgets']['sequence'])); + $new_widgets = array(); + + foreach ($cur_widgets as $widget) { + list($file, $col, $display) = explode(':', $widget); + + switch ($display) { + case 'hide': + $display = 'close'; + break; + case 'show': + $display = 'open'; + break; + default: + /* close, none or something is wrong here, ignore it */ + continue; + } + + /* Remove '-container' from widget name */ + $file = preg_replace('/-container$/', '', $file); + + $new_widgets[] = "{$file}:{$col}:{$display}"; + } + + $config['widgets']['sequence'] = implode(',', $new_widgets); + +} ?> |