diff options
author | Renato Botelho <renato@netgate.com> | 2017-08-16 09:13:16 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-08-16 11:03:20 -0300 |
commit | 38c763aa8080f31f75ca1e7649860e5f8035824a (patch) | |
tree | 90d3200cb4ed44b4d2c1edf4dc0f2544e59030c7 /src/etc/inc | |
parent | acaafa7f5095ad27afde85cd0622912c8221a1e5 (diff) | |
download | pfsense-38c763aa8080f31f75ca1e7649860e5f8035824a.zip pfsense-38c763aa8080f31f75ca1e7649860e5f8035824a.tar.gz |
Fix indent/space
Diffstat (limited to 'src/etc/inc')
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index ff5020c..7a38554 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -5328,8 +5328,8 @@ function upgrade_165_to_166() { function upgrade_166_to_167() { global $config; - if (strpos($config['widgets']['sequence'], 'netgate_services_and_support') === false) { - + if (strpos($config['widgets']['sequence'], + 'netgate_services_and_support') === false) { $widgets = explode(",", $config['widgets']['sequence']); $cnt = count($widgets); $col2 = $cnt; @@ -5337,20 +5337,25 @@ function upgrade_166_to_167() { // Locate the firt column 2 widget for ($idx=0;$idx<$cnt;$idx++) { - if (strpos($widgets[$idx], 'col2') !== false) { - $col2 = $idx; - break; + if (strpos($widgets[$idx], 'col2') !== false) { + $col2 = $idx; + break; } } - // Loop through the widgets inserting the new widget before the first col2 widget + /* + * 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"; + if ($old != ($col2 - 1)) { + continue; } + $new++; + $newsequence[$new] = + "netgate_services_and_support:col2:open:0"; } $config['widgets']['sequence'] = implode(",", $newsequence); |