diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-08-14 13:06:02 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-08-14 13:06:38 -0400 |
commit | 60d2ae474bc2b74965627ed146783dfd5f896ce1 (patch) | |
tree | 67504ebbc7992fba9ace1772a8a3292e5b46a0c1 | |
parent | 6e22caab7651e238d552c05ed14d38250b6369f0 (diff) | |
download | pfsense-60d2ae474bc2b74965627ed146783dfd5f896ce1.zip pfsense-60d2ae474bc2b74965627ed146783dfd5f896ce1.tar.gz |
Add Netgate Services and Support widget
(cherry picked from commit 179991b76e7a330a98ea520531551dfd6befb0b3)
-rw-r--r-- | src/conf.default/config.xml | 2 | ||||
-rw-r--r-- | src/etc/inc/globals.inc | 12 | ||||
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 36 |
3 files changed, 42 insertions, 8 deletions
diff --git a/src/conf.default/config.xml b/src/conf.default/config.xml index 0937a2b..a53ee04 100644 --- a/src/conf.default/config.xml +++ b/src/conf.default/config.xml @@ -262,7 +262,7 @@ </monitor_type> </load_balancer> <widgets> - <sequence>system_information:col1:show,interfaces:col2:show</sequence> + <sequence>system_information:col1:show,netgate_services_and_support:col2:show,interfaces:col2:show</sequence> <period>10</period> </widgets> <openvpn/> diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index f876896..e3ab9c9 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -104,7 +104,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "15.8", + "latest_config" => "15.9", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", @@ -146,11 +146,11 @@ if (file_exists("/etc/platform")) { } else { $g['default_config_backup_count'] = 30; } -} else { - // shouldn't happen but "just in case" no platform were detected - $g['platform'] = 'undetected'; - $g['default_config_backup_count'] = 30; -} +} else { + // shouldn't happen but "just in case" no platform were detected + $g['platform'] = 'undetected'; + $g['default_config_backup_count'] = 30; +} if (file_exists("{$g['etc_path']}/default-config-flavor")) { diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index f0cb6f3..d24e546 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4777,7 +4777,7 @@ function upgrade_147_to_148() { } // if there was a space in a group name, there may be multiple - // groups with the same name in the group file. To prevent pw + // groups with the same name in the group file. To prevent pw // from getting into a neverending loop, delete all user-defined // groups here. local_sync_accounts will run shortly after this // and add them back. redmine #6012 @@ -5057,4 +5057,38 @@ function upgrade_157_to_158() { } } +/* Force the Netgate Services and Support widget to be active on upgrade. + New widget is added at the top of column 2 */ +function upgrade_158_to_159() { + global $config; + + if (strpos($config['widgets']['sequence'], 'netgate_services_and_support') === false) { + + $widgets = explode(",", $config['widgets']['sequence']); + $cnt = count($widgets); + $col2 = $cnt; + $newsequence = array(); + + // Locate the firt column 2 widget + for ($idx=0;$idx<$cnt;$idx++) { + if (strpos($widgets[$idx], 'col2') !== false) { + $col2 = $idx; + break; + } + } + + // Loop through the widgets inserting the new widget before the first col2 widget + for ($old=0,$new=0;$old<$cnt;$old++,$new++) { + $newsequence[$new] = $widgets[$old]; + + if ($old == ($col2 - 1)) { + $new++; + $newsequence[$new] = "netgate_services_and_support:col2:open:0"; + } + } + + $config['widgets']['sequence'] = implode(",", $newsequence); + } +} + ?> |