From 1e241094e614b855a2f9526f69069148b4a31f1f Mon Sep 17 00:00:00 2001 From: Alexandre Fayadas Date: Fri, 25 Nov 2022 10:15:06 +0100 Subject: [PATCH] refs #37728 : fix sql request in install and upgrade methods --- stripe_official.php | 4 ++-- upgrade/Upgrade-2.5.0.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stripe_official.php b/stripe_official.php index ff01ae0..b31003a 100755 --- a/stripe_official.php +++ b/stripe_official.php @@ -522,7 +522,7 @@ public function install() $name = 'actionStripeOfficialMetadataDefinition'; $title = 'Define metadata of Stripe payment intent'; $description = 'Metadata is passing during creation and update of Stripe payment intent'; - $sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; Db::getInstance()->execute($sql); } @@ -530,7 +530,7 @@ public function install() $name = 'actionStripeDefineOrderPageNames'; $title = 'Define order page names of Stripe payment module'; $description = 'Order page names is passing during Stripe JS call to process payment'; - $sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; Db::getInstance()->execute($sql); } diff --git a/upgrade/Upgrade-2.5.0.php b/upgrade/Upgrade-2.5.0.php index 07d52f3..7787037 100644 --- a/upgrade/Upgrade-2.5.0.php +++ b/upgrade/Upgrade-2.5.0.php @@ -63,7 +63,7 @@ function upgrade_module_2_5_0($module) $name = 'actionStripeOfficialMetadataDefinition'; $title = 'Define metadata of Stripe payment intent'; $description = 'Metadata is passing during creation and update of Stripe payment intent'; - $sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; $result = Db::getInstance()->execute($sql); $is_valid = $is_valid && $result; @@ -73,7 +73,7 @@ function upgrade_module_2_5_0($module) $name = 'actionStripeDefineOrderPageNames'; $title = 'Define order page names of Stripe payment module'; $description = 'Order page names is passing during Stripe JS call to process payment'; - $sql = 'INSERT INTO `' . pSQL(_DB_PREFIX_) . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`) VALUES ("' . pSQL($name) . '", "' . pSQL($title) . '", "' . pSQL($description) . '");'; $result = Db::getInstance()->execute($sql); $is_valid = $is_valid && $result;