From 350367047811945355d1abd8eeb09c7e09b50f92 Mon Sep 17 00:00:00 2001 From: ChristopheBoucaut Date: Tue, 23 Jul 2013 09:36:08 +0200 Subject: [PATCH 1/3] Update Search.php $string = preg_replace('/[._-]+/', '', $string); Ex : Product's name : Saint-leon Search : leon => 0 result ------------------------------------------------------ $string = preg_replace('/[._-]+/', ' ', $string); Ex : Product's name : Saint-leon Search : leon => 1 result ------------------------------------------------------- I think that thus the search is more relevant --- classes/Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } From 63b2f630584eca87ac13a456bdaad2be168d78f9 Mon Sep 17 00:00:00 2001 From: joseantgv Date: Tue, 23 Jul 2013 09:58:53 +0200 Subject: [PATCH 2/3] Update AdminCustomerThreadsController.php If language is not defined returns an array instead of a string which makes function Mail::Send to throw a warning. --- controllers/admin/AdminCustomerThreadsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; From 4aab4f88cd94e41135570882803696b73498eca3 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 23 Jul 2013 18:25:32 +0200 Subject: [PATCH 3/3] [-] BO : Fix SQL query when $join_category == false, pull request https://github.com/Captain-FLAM/PrestaShop/commit/d5f75c63b6e21dd87c77a027bf8dd293afb1a94f thanks @Captain-FLAM --- controllers/admin/AdminProductsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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';