From 9c6af2d331b729f951d94ee97e2539d4f9d1c6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 3 Jul 2018 15:15:33 +0300 Subject: [PATCH 1/2] The cat_id parameter is not defined --- inc/bot.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/bot.class.php b/inc/bot.class.php index 8410aeb..6b1596d 100644 --- a/inc/bot.class.php +++ b/inc/bot.class.php @@ -65,16 +65,17 @@ static public function getChatID($user_id) { $chat_id = null; $result = $DB->request([ - 'FROM' => 'glpi_plugin_telegrambot_users', + 'SELECT' => 'users.username`,`user.id', + 'FROM' => 'glpi_plugin_telegrambot_users as users', 'INNER JOIN' => [ - 'glpi_plugin_telegrambot_user' => [ + 'glpi_plugin_telegrambot_chat as user' => [ 'FKEY' => [ - 'glpi_plugin_telegrambot_users' => 'username', - 'glpi_plugin_telegrambot_user' => 'username' + 'users' => 'username', + 'user' => 'username' ] ] ], - 'WHERE' => ['glpi_plugin_telegrambot_users.id' => $user_id] + 'WHERE' => ['users.id' => $user_id] ]); if ($row = $result->next()) { From 2e73c86b15c049893f5d3f8233d806305a7617b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 3 Jul 2018 15:17:29 +0300 Subject: [PATCH 2/2] The chat_id parameter is not defined --- inc/bot.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/bot.class.php b/inc/bot.class.php index 6b1596d..383e4d4 100644 --- a/inc/bot.class.php +++ b/inc/bot.class.php @@ -68,7 +68,7 @@ static public function getChatID($user_id) { 'SELECT' => 'users.username`,`user.id', 'FROM' => 'glpi_plugin_telegrambot_users as users', 'INNER JOIN' => [ - 'glpi_plugin_telegrambot_chat as user' => [ + 'glpi_plugin_telegrambot_user as user' => [ 'FKEY' => [ 'users' => 'username', 'user' => 'username'