From 0376a1f3542a4ead7f4136b4633d166b265a0499 Mon Sep 17 00:00:00 2001 From: homyak Date: Sat, 24 Feb 2024 00:27:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20'h?= =?UTF-8?q?tdocs/includes/models/packetweather.class.php'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../includes/models/packetweather.class.php | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 htdocs/includes/models/packetweather.class.php diff --git a/htdocs/includes/models/packetweather.class.php b/htdocs/includes/models/packetweather.class.php deleted file mode 100644 index 134b1be..0000000 --- a/htdocs/includes/models/packetweather.class.php +++ /dev/null @@ -1,72 +0,0 @@ -getRainSummaryList($showRain1h, $showRain24h, $showRainSinceMidnight); - - if (empty($result)) { - if ($this->rain_1h === null && $this->rain_24h === null && $this->rain_since_midnight === null) { - return 'No rain measurements received'; - } else { - return 'No other rain measurements received'; - } - } else { - return implode(' ', $result); - } - } - - /** - * Returnes a rain summary array - * - * @param boolean $showRain1h - * @param boolean $showRain24h - * @param boolean $showRainSinceMidnight - * @return string - */ - public function getRainSummaryList($showRain1h = true, $showRain24h = true, $showRainSinceMidnight = true) - { - $result = []; - - if ($showRain1h && $this->rain_1h !== null) { - if (isImperialUnitUser()) { - $result[] = "Rain latest hour: " . round(convertMmToInch($this->rain_1h), 2) . " in"; - } else { - $result[] = "Rain latest hour: " . round($this->rain_1h, 2) . " mm"; - } - } - - if ($showRain24h && $this->rain_24h !== null) { - if (isImperialUnitUser()) { - $result[] = "Rain latest 24h hours: " . round(convertMmToInch($this->rain_24h), 2) . " in"; - } else { - $result[] = "Rain latest 24h hours: " . round($this->rain_24h, 2) . " mm"; - } - } - - if ($showRainSinceMidnight && $this->rain_since_midnight !== null) { - if (isImperialUnitUser()) { - $result[] = "Rain since midnight: " . round(convertMmToInch($this->rain_since_midnight), 2) . " in"; - } else { - $result[] = "Rain since midnight: " . round($this->rain_since_midnight, 2) . " mm"; - } - } - - return $result; - } -}