From 9488f42b8190c92b6328697cbe84faad71647675 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 16 Aug 2016 14:15:56 +0930 Subject: Code style and comments No functional change - just making style consistent (cherry picked from commit 9d3e8723171c727cf43338bd8e95ab2bb7e6a66c) --- src/etc/inc/filter_log.inc | 4 +- src/etc/inc/pfsense-utils.inc | 2 +- src/etc/inc/upgrade_config.inc | 2 +- src/etc/inc/util.inc | 4 +- src/usr/local/www/classes/Form/Button.class.php | 4 +- src/usr/local/www/classes/Form/Group.class.php | 2 +- src/usr/local/www/classes/Form/Input.class.php | 4 +- src/usr/local/www/classes/Form/Section.class.php | 4 +- src/usr/local/www/classes/Form/Select.class.php | 8 ++-- src/usr/local/www/diag_dns.php | 4 +- src/usr/local/www/diag_edit.php | 6 +-- src/usr/local/www/firewall_virtual_ip_edit.php | 2 +- src/usr/local/www/js/pfSense.js | 6 +-- src/usr/local/www/js/pfSenseHelpers.js | 2 +- src/usr/local/www/pkg_mgr_install.php | 2 +- src/usr/local/www/services_dhcpv6_edit.php | 2 +- .../local/www/services_router_advertisements.php | 6 +-- src/usr/local/www/status_logs_filter_dynamic.php | 4 +- src/usr/local/www/system_advanced_misc.php | 2 +- src/usr/local/www/system_authservers.php | 16 ++++---- src/usr/local/www/system_crlmanager.php | 2 +- src/usr/local/www/system_gateway_groups_edit.php | 2 +- src/usr/local/www/system_groupmanager.php | 4 +- src/usr/local/www/system_groupmanager_addprivs.php | 2 +- src/usr/local/www/system_update_settings.php | 3 +- src/usr/local/www/system_usermanager.php | 4 +- src/usr/local/www/system_usermanager_addprivs.php | 2 +- src/usr/local/www/vpn_openvpn_server.php | 2 +- .../www/widgets/javascript/thermal_sensors.js | 8 ++-- .../www/widgets/widgets/gmirror_status.widget.php | 2 +- src/usr/local/www/widgets/widgets/log.widget.php | 2 +- .../www/widgets/widgets/ntp_status.widget.php | 4 +- .../widgets/widgets/system_information.widget.php | 6 +-- src/usr/local/www/wizard.php | 4 +- src/usr/local/www/wizards/openvpn_wizard.inc | 4 +- src/usr/local/www/wizards/setup_wizard.xml | 44 +++++++++++----------- .../wizards/traffic_shaper_wizard_dedicated.inc | 42 ++++++++++----------- .../wizards/traffic_shaper_wizard_multi_all.inc | 42 ++++++++++----------- 38 files changed, 133 insertions(+), 132 deletions(-) diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc index 1208711..693488f 100644 --- a/src/etc/inc/filter_log.inc +++ b/src/etc/inc/filter_log.inc @@ -255,7 +255,7 @@ function parse_vpn_login_log_line($line) { if (!( (trim($flent['time']) == "") && (trim($flent['action']) == "") && (trim($flent['user']) == "") && (trim($flent['ip_address']) == "") )) { return $flent; } else { - if($g['debug']) { + if ($g['debug']) { log_error(sprintf(gettext("There was a error parsing log entry: %s. Please report to mailing list or forum."), $line)); } return ""; @@ -277,7 +277,7 @@ function parse_vpn_service_log_line($line) { if (!( (trim($flent['time']) == "") && (trim($flent['type']) == "") && (trim($flent['message']) == "") )) { return $flent; } else { - if($g['debug']) { + if ($g['debug']) { log_error(sprintf(gettext("There was a error parsing log entry: %s. Please report to mailing list or forum."), $line)); } return ""; diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index a061dc3..fbdd290 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -739,7 +739,7 @@ function get_filename_from_url($url) { function get_dir($dir) { $dir_array = array(); $d = dir($dir); - if(!is_object($d)) { + if (!is_object($d)) { return array(); } while (false !== ($entry = $d->read())) { diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 314796a..633cacc 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4469,7 +4469,7 @@ function upgrade_142_to_143() { if (is_array($config['filter']['separator'])) { foreach ($config['filter']['separator'] as $interface => $separators) { - if(is_array($separators)) { + if (is_array($separators)) { foreach ($separators as $sepn => $separator) { $seprow = substr($separator['row']['0'], 2); diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index e063d5d..6647e0a 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -904,7 +904,7 @@ function check_subnetsv4_overlap($subnet1, $bits1, $subnet2, $bits2) { $subnetv4_start1 = gen_subnetv4($subnet1, $largest_sn); $subnetv4_start2 = gen_subnetv4($subnet2, $largest_sn); - if($subnetv4_start1 == '' || $subnetv4_start2 == '') { + if ($subnetv4_start1 == '' || $subnetv4_start2 == '') { // One or both args is not a valid IPv4 subnet //FIXME: needs to return "bad data" not true/false if bad. For now return false, best we can do until fixed return false; @@ -919,7 +919,7 @@ function check_subnetsv6_overlap($subnet1, $bits1, $subnet2, $bits2) { $subnetv6_start1 = gen_subnetv6($subnet1, $largest_sn); $subnetv6_start2 = gen_subnetv6($subnet2, $largest_sn); - if($subnetv6_start1 == '' || $subnetv6_start2 == '') { + if ($subnetv6_start1 == '' || $subnetv6_start2 == '') { // One or both args is not a valid IPv6 subnet //FIXME: needs to return "bad data" not true/false if bad. For now return false, best we can do until fixed return false; diff --git a/src/usr/local/www/classes/Form/Button.class.php b/src/usr/local/www/classes/Form/Button.class.php index bc13e7a..3460588 100644 --- a/src/usr/local/www/classes/Form/Button.class.php +++ b/src/usr/local/www/classes/Form/Button.class.php @@ -71,11 +71,11 @@ class Form_Button extends Form_Input $this->_tagName = 'a'; $this->addClass('btn-default'); unset($this->_attributes['type']); - if(isset($icon)) { + if (isset($icon)) { $this->_attributes['icon'] = $icon; } } - else if(isset($icon)) + else if (isset($icon)) { $this->_tagSelfClosing = false; $this->_tagName = 'button'; diff --git a/src/usr/local/www/classes/Form/Group.class.php b/src/usr/local/www/classes/Form/Group.class.php index 1b3aa40..361ceac 100644 --- a/src/usr/local/www/classes/Form/Group.class.php +++ b/src/usr/local/www/classes/Form/Group.class.php @@ -96,7 +96,7 @@ class Form_Group extends Form_Element public function enableDuplication($max = null, $horiz = false) { - if($horiz) + if ($horiz) $this->addClass('user-duplication-horiz'); // added buttons are 2 cols wide with no offset else $this->addClass('user-duplication'); // added buttons 10 cols wide with 2 col offset diff --git a/src/usr/local/www/classes/Form/Input.class.php b/src/usr/local/www/classes/Form/Input.class.php index 48188b3..5b2385a 100644 --- a/src/usr/local/www/classes/Form/Input.class.php +++ b/src/usr/local/www/classes/Form/Input.class.php @@ -241,7 +241,7 @@ class Form_Input extends Form_Element // These methods required by pkg_edit and the wizards that map xml element definitions to Form elements public function setOnclick($text) { - if($text) + if ($text) $this->_attributes['onclick'] = $text; return $this; @@ -249,7 +249,7 @@ class Form_Input extends Form_Element public function setOnchange($text) { - if($text) + if ($text) $this->_attributes['onchange'] = $text; return $this; diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php index 133c7ba..2ccfe41 100644 --- a/src/usr/local/www/classes/Form/Section.class.php +++ b/src/usr/local/www/classes/Form/Section.class.php @@ -94,12 +94,12 @@ class Form_Section extends Form_Element } // Shortcut, adds a group with a password and a confirm password field. - // The confirm password element is created by apprnding "_confirm" to the name supplied + // The confirm password element is created by appending "_confirm" to the name supplied // The value is overwritten with a default pattern (So the user cannot see it) public function addPassword(Form_Input $input) { $group = new Form_Group($input->getTitle()); - if($input->getValue() != "") { + if ($input->getValue() != "") { $input->setValue(DMYPWD); } diff --git a/src/usr/local/www/classes/Form/Select.class.php b/src/usr/local/www/classes/Form/Select.class.php index e64203c..b156793 100644 --- a/src/usr/local/www/classes/Form/Select.class.php +++ b/src/usr/local/www/classes/Form/Select.class.php @@ -79,15 +79,15 @@ class Form_Select extends Form_Input $options = ''; foreach ($this->_values as $value => $name) { - // Things can get wierd if we have mixed types + // Things can get weird if we have mixed types $sval = $this->_value; - if( (gettype($value) == "integer") && (gettype($sval) == "string") ) + if ((gettype($value) == "integer") && (gettype($sval) == "string")) $value = strval($value); - if (isset($this->_attributes['multiple'])) + if (isset($this->_attributes['multiple'])) { $selected = in_array($value, (array)$sval); - else { + } else { $selected = ($sval == $value); } diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php index 23a0525..17064d7 100644 --- a/src/usr/local/www/diag_dns.php +++ b/src/usr/local/www/diag_dns.php @@ -87,7 +87,7 @@ function resolve_host_addresses($host) { $resolved = array(); $errreporting = error_reporting(); error_reporting($errreporting & ~E_WARNING);// dns_get_record throws a warning if nothing is resolved.. - foreach($recordtypes as $recordtype) { + foreach ($recordtypes as $recordtype) { $tmp = dns_get_record($host, $recordtype); if (is_array($tmp)) { $dnsresult = array_merge($dnsresult, $tmp); @@ -95,7 +95,7 @@ function resolve_host_addresses($host) { } error_reporting($errreporting);// restore original php warning/error settings. - foreach($dnsresult as $item) { + foreach ($dnsresult as $item) { $newitem = array(); $newitem['type'] = $item['type']; switch ($item['type']) { diff --git a/src/usr/local/www/diag_edit.php b/src/usr/local/www/diag_edit.php index 98dfb94..2cdb458 100644 --- a/src/usr/local/www/diag_edit.php +++ b/src/usr/local/www/diag_edit.php @@ -188,8 +188,8 @@ print_callout(gettext("The capabilities offered here can be dangerous. No suppor // calculate start/end var startPos = 0, endPos = tarea.value.length; - for(var x = 0; x < lines.length; x++) { - if(x == lineNum) { + for (var x = 0; x < lines.length; x++) { + if (x == lineNum) { break; } startPos += (lines[x].length+1); @@ -201,7 +201,7 @@ print_callout(gettext("The capabilities offered here can be dangerous. No suppor // do selection // Chrome / Firefox - if(typeof(tarea.selectionStart) != "undefined") { + if (typeof(tarea.selectionStart) != "undefined") { tarea.focus(); tarea.selectionStart = startPos; tarea.selectionEnd = endPos; diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php index b506eb7..1a0eb19 100644 --- a/src/usr/local/www/firewall_virtual_ip_edit.php +++ b/src/usr/local/www/firewall_virtual_ip_edit.php @@ -465,7 +465,7 @@ $section->addInput(new Form_Input( $pconfig['descr'] ))->setHelp('A description may be entered here for administrative reference (not parsed).'); -if (isset($id) && $a_vip[$id]){ +if (isset($id) && $a_vip[$id]) { $section->addInput(new Form_Input( 'id', null, diff --git a/src/usr/local/www/js/pfSense.js b/src/usr/local/www/js/pfSense.js index 2f6aad0..2f9811e 100644 --- a/src/usr/local/www/js/pfSense.js +++ b/src/usr/local/www/js/pfSense.js @@ -175,10 +175,10 @@ $(function() { // Use element title in the confirmation message, or if not available // the element value $('.btn-danger, .fa-trash').on('click', function(e){ - if(!($(this).hasClass('no-confirm'))) { + if (!($(this).hasClass('no-confirm'))) { var msg = $.trim(this.textContent); - if(!msg) + if (!msg) var msg = $.trim(this.value).toLowerCase(); var q = 'Are you sure you wish to '+ msg +'?'; @@ -233,7 +233,7 @@ $(function() { originalLeave.call(this, obj); - if(self.$tip && self.$tip.length) { + if (self.$tip && self.$tip.length) { container = self.$tip; timeout = self.timeout; container.one('mouseenter', function(){ diff --git a/src/usr/local/www/js/pfSenseHelpers.js b/src/usr/local/www/js/pfSenseHelpers.js index 9ddabcf..56d659e 100644 --- a/src/usr/local/www/js/pfSenseHelpers.js +++ b/src/usr/local/www/js/pfSenseHelpers.js @@ -141,7 +141,7 @@ function hideLabel(text, hide) { // Hides the '/' and the subnet mask of an Ip_Address/subnet_mask group function hideMask(name, hide) { - if(hide) { + if (hide) { $('[id^=' + name + ']').hide(); $('[id^=' + name + ']').prev('span').hide(); $('[id^=' + name + ']').parent('div').removeClass('input-group'); diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 0126028..e5c1335 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -600,7 +600,7 @@ function get_firmware_versions() json = jQuery.parseJSON(response); - if(json) { + if (json) { $('#installed_version').text(json.installed_version); $('#version').text(json.version); diff --git a/src/usr/local/www/services_dhcpv6_edit.php b/src/usr/local/www/services_dhcpv6_edit.php index 2e15225..f17b420 100644 --- a/src/usr/local/www/services_dhcpv6_edit.php +++ b/src/usr/local/www/services_dhcpv6_edit.php @@ -275,7 +275,7 @@ $section->addInput(new Form_Input( $pconfig['descr'] ))->setHelp('A description may be entered here for administrative reference (not parsed).'); -if($netboot_enabled) { +if ($netboot_enabled) { $section->addInput(new Form_Input( 'filename', 'Netboot filename', diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php index eea6d89..5cd5c7c 100644 --- a/src/usr/local/www/services_router_advertisements.php +++ b/src/usr/local/www/services_router_advertisements.php @@ -348,8 +348,8 @@ $carplist = get_configured_vip_list("inet6", VIP_CARP); $carplistif = array(); -if(count($carplist) > 0) { - foreach($carplist as $ifname => $vip) { +if (count($carplist) > 0) { + foreach ($carplist as $ifname => $vip) { if (get_configured_vip_interface($ifname) == $if) { $carplistif[$ifname] = $vip; } @@ -360,7 +360,7 @@ if (count($carplistif) > 0) { $iflist = array(); $iflist['interface'] = strtoupper($if); - foreach($carplistif as $ifname => $vip) { + foreach ($carplistif as $ifname => $vip) { $iflist[$ifname] = get_vip_descr($vip) . " - " . $vip; } diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php index c5b4992..bab7097 100644 --- a/src/usr/local/www/status_logs_filter_dynamic.php +++ b/src/usr/local/www/status_logs_filter_dynamic.php @@ -326,7 +326,7 @@ function update_table_rows(data) { move = 0; } - if (($("#count").text() == 0) && (data.length < nentries)){ + if (($("#count").text() == 0) && (data.length < nentries)) { move += rows.length; } @@ -477,7 +477,7 @@ function toggleListDescriptions() { '; diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php index 8aeaed8..018c452 100644 --- a/src/usr/local/www/system_advanced_misc.php +++ b/src/usr/local/www/system_advanced_misc.php @@ -147,7 +147,7 @@ if ($_POST) { $input_errors[] = gettext("The proxy username contains invalid characters."); } - if($_POST['proxypass'] != $_POST['proxypass_confirm']) { + if ($_POST['proxypass'] != $_POST['proxypass_confirm']) { $input_errors[] = gettext("Proxy password and confirmation must match."); } diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php index 6a30785..891a4a9 100644 --- a/src/usr/local/www/system_authservers.php +++ b/src/usr/local/www/system_authservers.php @@ -426,7 +426,7 @@ if ($_POST) { } // On error, restore the form contents so the user doesn't have to re-enter too much -if($_POST && $input_errors) { +if ($_POST && $input_errors) { $pconfig = $_POST; $pconfig['ldap_authcn'] = $_POST['ldapauthcontainers']; $pconfig['ldap_template'] = $_POST['ldap_tmpltype']; @@ -471,7 +471,7 @@ if (!($act == "new" || $act == "edit" || $input_errors)) { - $server): ?> + $server): ?> @@ -683,7 +683,7 @@ $section->add($group); if (!isset($id)) { $template_list = array(); - foreach($ldap_templates as $option => $template) { + foreach ($ldap_templates as $option => $template) { $template_list[$option] = $template['desc']; } @@ -912,7 +912,7 @@ events.push(function() { } function set_ldap_port() { - if($('#ldap_urltype').find(":selected").index() == 0) + if ($('#ldap_urltype').find(":selected").index() == 0) $('#ldap_port').val('389'); else $('#ldap_port').val('636'); @@ -920,7 +920,7 @@ events.push(function() { // Hides all elements of the specified class. This will usually be a section function hideClass(s_class, hide) { - if(hide) + if (hide) $('.' + s_class).hide(); else $('.' + s_class).show(); @@ -953,18 +953,18 @@ events.push(function() { hideClass('ldapanon', $('#ldap_anon').prop('checked')); hideClass('extended', !$('#ldap_extended_enabled').prop('checked')); - if($('#ldap_port').val() == "") + if ($('#ldap_port').val() == "") set_ldap_port(); $('#type option:not(:selected)').each(function(){ $(this).attr('disabled', 'disabled'); }); $('#name').prop("readonly", true); addInput(new Form_Input( $pconfig['descr'] ))->setHelp('A description may be entered here for administrative reference (not parsed).'); -if (isset($id) && $a_gateway_groups[$id]){ +if (isset($id) && $a_gateway_groups[$id]) { $section->addInput(new Form_Input( 'id', null, diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php index 09a5201..9e8248e 100644 --- a/src/usr/local/www/system_groupmanager.php +++ b/src/usr/local/www/system_groupmanager.php @@ -192,7 +192,7 @@ if (isset($_POST['save'])) { } /* Check the POSTed members to ensure they are valid and exist */ - if(is_array($_POST['members'])) { + if (is_array($_POST['members'])) { foreach ($_POST['members'] as $newmember) { if (!is_numeric($newmember) || empty(getUserEntryByUID($newmember))) { $input_errors[] = gettext("One or more invalid group members was submitted."); @@ -385,7 +385,7 @@ $form->addGlobal(new Form_Input( $id )); -if (isset($id) && $a_group[$id]){ +if (isset($id) && $a_group[$id]) { $form->addGlobal(new Form_Input( 'id', null, diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php index d7da0e6..309b72f 100644 --- a/src/usr/local/www/system_groupmanager_addprivs.php +++ b/src/usr/local/www/system_groupmanager_addprivs.php @@ -300,7 +300,7 @@ events.push(function() { }); $('#filtertxt').keypress(function(e) { - if(e.which == 13) { + if (e.which == 13) { e.preventDefault(); $('#btnfilter').trigger('click'); } diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php index e335ff9..9496ecf 100644 --- a/src/usr/local/www/system_update_settings.php +++ b/src/usr/local/www/system_update_settings.php @@ -186,6 +186,7 @@ if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) { 'synconupgrade', 'Auto sync on update', 'Enable repository/branch sync before reboot', + 'Enable repository/branch sync before reboot', isset($gitcfg['synconupgrade']) ))->setHelp('After updating, sync with the following repository/branch before reboot.'); @@ -227,7 +228,7 @@ if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) { '
Note: Sync will not be performed if a branch is not specified.', [$lastbranch]); $form->add($section); -} // e-o-if(file_exista() +} // e-o-if (file_exists()) print($form); diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php index 4b46efc..a1f7e0a 100644 --- a/src/usr/local/www/system_usermanager.php +++ b/src/usr/local/www/system_usermanager.php @@ -247,7 +247,7 @@ if ($_POST['save']) { } /* Check the POSTed groups to ensure they are valid and exist */ - if(is_array($_POST['groups'])) { + if (is_array($_POST['groups'])) { foreach ($_POST['groups'] as $newgroup) { if (empty(getGroupEntry($newgroup))) { $input_errors[] = gettext("One or more invalid groups was submitted."); @@ -884,7 +884,7 @@ if ($act == "new" || $act == "edit" || $input_errors): $section->addClass('cert-options'); $nonPrvCas = array(); - foreach($config['ca'] as $ca) { + foreach ($config['ca'] as $ca) { if (!$ca['prv']) { continue; } diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php index 3dfc341..3bf910d 100644 --- a/src/usr/local/www/system_usermanager_addprivs.php +++ b/src/usr/local/www/system_usermanager_addprivs.php @@ -304,7 +304,7 @@ events.push(function() { }); $('#filtertxt').keypress(function(e) { - if(e.which == 13) { + if (e.which == 13) { e.preventDefault(); $('#btnfilter').trigger('click'); } diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php index 57b1040..e7b2af3 100644 --- a/src/usr/local/www/vpn_openvpn_server.php +++ b/src/usr/local/www/vpn_openvpn_server.php @@ -1259,7 +1259,7 @@ endif; events.push(function() { function advanced_change(hide, mode) { - if(!hide) { + if (!hide) { hideClass('advanced', false); hideClass("clientadv", false); } else if (mode == "p2p_tls") { diff --git a/src/usr/local/www/widgets/javascript/thermal_sensors.js b/src/usr/local/www/widgets/javascript/thermal_sensors.js index 70de0e9..448c05e 100644 --- a/src/usr/local/www/widgets/javascript/thermal_sensors.js +++ b/src/usr/local/www/widgets/javascript/thermal_sensors.js @@ -56,7 +56,7 @@ ajaxBusy = false; //should be called from "thermal_sensors.widget.php" function showThermalSensorsData() { - if(!ajaxBusy) { + if (!ajaxBusy) { ajaxBusy = true; //get data from thermal_sensors.widget.php url = "/widgets/widgets/thermal_sensors.widget.php?getThermalSensorsData=1" @@ -86,7 +86,7 @@ function buildThermalSensorsData(thermalSensorsData) { if (thermal_sensors_widget_showRawOutput) { buildThermalSensorsDataRaw(thermalSensorsData); } else { - if(warningTemp == 9999) { + if (warningTemp == 9999) { buildThermalSensorsDataGraph(thermalSensorsData); } @@ -224,11 +224,11 @@ function getThermalSensorValue(stringValue) { function setTempProgress(bar, percent) { var barTempL, barTempM, barTempH; - if(percent <= warningTemp) { + if (percent <= warningTemp) { barTempL = percent; barTempM = 0; barTempH = 0; - } else if(percent <= criticalTemp) { + } else if (percent <= criticalTemp) { barTempL = warningTemp; barTempM = percent - warningTemp; barTempH = 0; diff --git a/src/usr/local/www/widgets/widgets/gmirror_status.widget.php b/src/usr/local/www/widgets/widgets/gmirror_status.widget.php index 532f731..cf89cda 100644 --- a/src/usr/local/www/widgets/widgets/gmirror_status.widget.php +++ b/src/usr/local/www/widgets/widgets/gmirror_status.widget.php @@ -67,7 +67,7 @@ require_once("gmirror.inc");