From 3d2db173d63b2650ae573d1b9a6dc3bc0092b252 Mon Sep 17 00:00:00 2001 From: rsgrinko Date: Tue, 23 Aug 2022 16:43:17 +0300 Subject: [PATCH] =?UTF-8?q?[*]=20=D1=84=D0=B8=D0=BA=D1=81=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B0=20=D1=82=D0=B5=D0=BB=D0=B5=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/Core/Helpers/SystemFunctions.class.php | 9 ++++----- core/lib/Core/Models/User.class.php | 2 +- telegramHandler.php | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/lib/Core/Helpers/SystemFunctions.class.php b/core/lib/Core/Helpers/SystemFunctions.class.php index 59c5556..afd1529 100644 --- a/core/lib/Core/Helpers/SystemFunctions.class.php +++ b/core/lib/Core/Helpers/SystemFunctions.class.php @@ -376,7 +376,7 @@ { $num = $value % 100; if ($num > 19) { - $num = $num % 10; + $num %= 10; } switch ($num) { @@ -409,19 +409,19 @@ $res = ''; $days = floor($secs / 86400); - $secs = $secs % 86400; + $secs %= 86400; if ($days > 0) { $res .= $days . ' ' . self::numWord($days, ['день', 'дня', 'дней']) . ', '; } $hours = floor($secs / 3600); - $secs = $secs % 3600; + $secs %= 3600; if ($hours > 0) { $res .= $hours . ' ' . self::numWord($hours, ['час', 'часа', 'часов']) . ', '; } $minutes = floor($secs / 60); - $secs = $secs % 60; + $secs %= 60; if ($minutes > 0) { $res .= $minutes . ' ' . self::numWord($minutes, ['минута', 'минуты', 'минут']) . ', '; } @@ -491,7 +491,6 @@ 'э' => 'e', 'ю' => 'yu', 'я' => 'ya', - 'А' => 'A', 'Б' => 'B', 'В' => 'V', diff --git a/core/lib/Core/Models/User.class.php b/core/lib/Core/Models/User.class.php index 74bdc2e..6288749 100644 --- a/core/lib/Core/Models/User.class.php +++ b/core/lib/Core/Models/User.class.php @@ -181,7 +181,7 @@ /** * Получение времени последней активности * - * @return string|null + * @return int|null * @throws CoreException */ public function getLastActive(): ?int diff --git a/telegramHandler.php b/telegramHandler.php index 3c4c8b4..6b90d5d 100644 --- a/telegramHandler.php +++ b/telegramHandler.php @@ -15,7 +15,7 @@ $tg = new Telegram2(TELEGRAM_BOT_TOKEN); $tg->setRemoteRequest($data); - $res = $tg->setChat(TELEGRAM_ADMIN_CHAT_ID)->updateMessage(121, ''); + //$res = $tg->setChat(TELEGRAM_ADMIN_CHAT_ID)->updateMessage(121, ''); - sendTelegram(print_r($res, true)); \ No newline at end of file + sendTelegram(print_r($data, true)); \ No newline at end of file