diff --git a/classes/Search.php b/classes/Search.php index 1ab992005..54e600011 100644 --- a/classes/Search.php +++ b/classes/Search.php @@ -102,11 +102,11 @@ class SearchCore $string = preg_replace('/['.PREG_CLASS_SEARCH_EXCLUDE.']+/u', ' ', $string); if ($indexation) - $string = preg_replace('/[._-]+/', '', $string); + $string = preg_replace('/[._-]+/', ' ', $string); else { $string = preg_replace('/[._]+/', '', $string); - $string = ltrim(preg_replace('/([^ ])-/', '$1', ' '.$string)); + $string = ltrim(preg_replace('/([^ ])-/', '$1 ', ' '.$string)); $string = preg_replace('/[._]+/', '', $string); $string = preg_replace('/[^\s]-+/', '', $string); } diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index 57eff11a0..3714a0a17 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -401,7 +401,7 @@ class AdminCustomerThreadsControllerCore extends AdminController ), ); //#ct == id_customer_thread #tc == token of thread <== used in the synchronization imap - $contact = new Contact((int)$ct->id_contact); + $contact = new Contact((int)$ct->id_contact, (int)$ct->id_lang); if (Validate::isLoadedObject($contact)) { $from_name = $contact->name[(int)$ct->id_lang]; diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index f12892ccc..969d55d63 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -175,12 +175,12 @@ class AdminProductsControllerCore extends AdminController LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')'; $this->_select .= 'shop.name as shopname, '; - $this->_select .= 'MAX('.$alias_image.'.id_image) id_image, cl.name `name_category`, '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`, '; + $this->_select .= 'MAX('.$alias_image.'.id_image) id_image, cl.name `name_category`, '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`'; if ($join_category) { $this->_join .= ' INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.') '; - $this->_select .= ' cp.`position`, '; + $this->_select .= ' , cp.`position`, '; } $this->_group = 'GROUP BY '.$alias.'.id_product';