From 3e3f9bee5b06227bc528f3ead2f70890a11bf945 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Fri, 3 Feb 2012 14:25:23 +0000 Subject: [PATCH] // BO : Fix bug with bad order by --- .../admin/AdminManufacturersController.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php index 4e9398e19..891964685 100644 --- a/controllers/admin/AdminManufacturersController.php +++ b/controllers/admin/AdminManufacturersController.php @@ -113,7 +113,7 @@ class AdminManufacturersControllerCore extends AdminController $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product` p ON (a.`id_manufacturer` = p.`id_manufacturer`)'; $this->_group = 'GROUP BY a.`id_manufacturer`'; - $this->context->smarty->assign('title_list', $this->l('List of manufacturers:')); + $this->context->smarty->assign('title_list', $this->l('List of manufacturers:')); $this->content .= parent::renderList(); } @@ -126,13 +126,14 @@ class AdminManufacturersControllerCore extends AdminController unset($this->fieldsDisplay, $this->_select, $this->_join, $this->_group, $this->_filterHaving, $this->_filter); $this->table = 'address'; - $this->identifier = 'id_address'; + $this->identifier = 'id_address'; $this->deleted = true; + $this->_orderBy = null; $this->addRowAction('editaddresses'); $this->addRowAction('delete'); - // test if a filter is applied for this list + // test if a filter is applied for this list if (Tools::isSubmit('submitFilter'.$this->table) || $this->context->cookie->{'submitFilter'.$this->table} !== false) $this->filter = true; @@ -187,12 +188,12 @@ class AdminManufacturersControllerCore extends AdminController $this->_join = ' LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.') '; - $this->_join .= ' - LEFT JOIN `'._DB_PREFIX_.'manufacturer` m - ON (a.`id_manufacturer` = m.`id_manufacturer`)'; - $this->_where = 'AND a.`id_customer` = 0 AND a.`id_supplier` = 0 AND a.`id_warehouse` = 0'; + $this->_join .= ' + LEFT JOIN `'._DB_PREFIX_.'manufacturer` m + ON (a.`id_manufacturer` = m.`id_manufacturer`)'; + $this->_where = 'AND a.`id_customer` = 0 AND a.`id_supplier` = 0 AND a.`id_warehouse` = 0'; - $this->context->smarty->assign('title_list', $this->l('Manufacturers addresses:')); + $this->context->smarty->assign('title_list', $this->l('Manufacturers addresses:')); // call postProcess() for take care about actions and filters $this->postProcess(); @@ -208,7 +209,7 @@ class AdminManufacturersControllerCore extends AdminController $this->initListManufacturerAddresses(); } - /** + /** * Display editaddresses action link * @param string $token the token to add to the link * @param int $id the identifier to add to the link