diff options
author | doktornotor <notordoktor@gmail.com> | 2015-10-24 20:03:02 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-10-24 20:03:02 +0200 |
commit | 702a4f03f29de31b3ff0c29e021e9a938f360a18 (patch) | |
tree | 4268220fc0f58dd1d24c6fbf485f7b35cf30f9cb /config/nut | |
parent | f5c1c9086ec0d6f1e7d302c0f24637ec6e7c1f78 (diff) | |
download | pfsense-packages-702a4f03f29de31b3ff0c29e021e9a938f360a18.tar.gz pfsense-packages-702a4f03f29de31b3ff0c29e021e9a938f360a18.tar.bz2 pfsense-packages-702a4f03f29de31b3ff0c29e021e9a938f360a18.zip |
Fix file header and whitespace
Diffstat (limited to 'config/nut')
-rw-r--r-- | config/nut/ups_status.widget.php | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/config/nut/ups_status.widget.php b/config/nut/ups_status.widget.php index dade23d6..f2a766e1 100644 --- a/config/nut/ups_status.widget.php +++ b/config/nut/ups_status.widget.php @@ -1,24 +1,20 @@ <?php /* - $Id: ups_status.widget.php - + ups_status.widget.php + part of pfSense (https://www.pfsense.org/) Copyright (C) 2015 SunStroke <andrey.b.nikitin@gmail.com> - - File location: - \usr\local\www\widgets\widgets\ - Depends on: - \usr\local\www\widgets\javascript\ups_status.js - \usr\local\www\widgets\include\ups_status.inc + Copyright (C) 2015 ESF, LLC + All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY @@ -30,16 +26,15 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - +*/ require_once("guiconfig.inc"); // NOTE: maybe not needed (no GUI settings)? Remove if so. require_once("/usr/local/www/widgets/include/ups_status.inc"); //called by showUPSData() (jQuery Ajax call) in ups_status.js if (isset($_GET["getUPSData"])) { - //get UPS data and return it in ajax response - echo getUPSData(); - return; + //get UPS data and return it in ajax response + echo getUPSData(); + return; } function getUPSData() { @@ -142,8 +137,8 @@ function getUPSData() { if ($secs < 0 || $secs == "") { $data .= ":" . gettext("n/a"); } else { - $m = (int)($secs / 60); - $h = (int)($m / 60) % 24; + $m = (int)($secs / 60); + $h = (int)($m / 60) % 24; $m = $m % 60; $s = $secs % 60; $data .= ":" . $h."h " . $m."m " . $s."s"; |