From 7dfa4d7cbe761d7adfb0ff7fea1d662b31042769 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 7 Nov 2017 12:17:20 +0100 Subject: [PATCH] Remove replacement --- modules/invite/ajax_sponsor.php | 4 ++-- modules/invite/invite.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/invite/ajax_sponsor.php b/modules/invite/ajax_sponsor.php index b095b6b4..ececeee8 100644 --- a/modules/invite/ajax_sponsor.php +++ b/modules/invite/ajax_sponsor.php @@ -27,8 +27,8 @@ if ($id_customer !== 0 && Tools::getValue('adtoken') === Tools::encrypt('InviteA // Search customer by email elseif (Tools::getvalue('action') == 'search') { $q = Tools::getValue('term'); - $sql = 'SELECT `id_customer` AS id, CONCAT_WS(" ", `lastname`, `firstname`, `email`) AS value - FROM `'._DB_PREFIX_.'customer` WHERE `email` LIKE "'.$q.'%"'; + $sql = 'SELECT `id_customer` AS id, CONCAT_WS(" ", `lastname`, `firstname`, CONCAT("(", `email`, ")")) AS value + FROM `'._DB_PREFIX_.'customer` WHERE `email` LIKE "'.pSQL($q).'%"'; $result = Db::getInstance()->executeS($sql); echo Tools::jsonEncode($result); exit; diff --git a/modules/invite/invite.php b/modules/invite/invite.php index e141e325..ffa4e80b 100644 --- a/modules/invite/invite.php +++ b/modules/invite/invite.php @@ -1303,11 +1303,11 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor= 0 )'); } - // Replace - else { + // Replace - Do nothing + /*else { $result = Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'invite` SET `id_sponsor`='.$id_sponsor. ' WHERE `id_customer`='.$customer->id); - } + }*/ if (count($orders) == 1 && $result) { $sponsorCustomer = new Customer($id_sponsor);