From 357492c046e11bb7c6eb90a6f1cb89c75a7992ad Mon Sep 17 00:00:00 2001 From: Patryk Padus Date: Mon, 30 Oct 2023 13:16:52 +0100 Subject: [PATCH 1/2] Add is_shop context to sql query Add id_shop for multishop purpouse --- classes/ReassuranceActivity.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/ReassuranceActivity.php b/classes/ReassuranceActivity.php index 3dbe844e..694271dd 100644 --- a/classes/ReassuranceActivity.php +++ b/classes/ReassuranceActivity.php @@ -150,9 +150,12 @@ public static function getAllBlock() */ public static function getAllBlockByStatus($id_lang = 1) { + $id_shop = (int)Context::getContext()->shop->id; + $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'psreassurance` pr LEFT JOIN ' . _DB_PREFIX_ . 'psreassurance_lang prl ON (pr.id_psreassurance = prl.id_psreassurance) WHERE prl.id_lang = "' . (int) $id_lang . '" + AND prl.id_shop = "' . (int) $id_shop . '" AND pr.status = 1 ORDER BY pr.position'; From dad7fa7841fa2aa483a81bee1802dcf529e32931 Mon Sep 17 00:00:00 2001 From: Triloworld <2671726+Triloworld@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:42:13 +0100 Subject: [PATCH 2/2] PHP CS fixes --- classes/ReassuranceActivity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/ReassuranceActivity.php b/classes/ReassuranceActivity.php index 694271dd..d4139632 100644 --- a/classes/ReassuranceActivity.php +++ b/classes/ReassuranceActivity.php @@ -150,7 +150,7 @@ public static function getAllBlock() */ public static function getAllBlockByStatus($id_lang = 1) { - $id_shop = (int)Context::getContext()->shop->id; + $id_shop = (int) Context::getContext()->shop->id; $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'psreassurance` pr LEFT JOIN ' . _DB_PREFIX_ . 'psreassurance_lang prl ON (pr.id_psreassurance = prl.id_psreassurance)