From e9c8678cd60903441db59b9a5783a9edab7ca615 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 10 Apr 2012 13:07:19 +0000 Subject: [PATCH] // Helpers : remove param 'float' --- classes/helper/HelperList.php | 7 ++----- controllers/admin/AdminCartsController.php | 1 - controllers/admin/AdminCurrenciesController.php | 2 +- controllers/admin/AdminRangeWeightController.php | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index 92e5dd630..785f07600 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -39,9 +39,6 @@ class HelperListCore extends Helper /** @var array WHERE clause determined by filter fields */ protected $_filter; - /** @var array Temporary SQL table WHERE clause determinated by filter fields */ - protected $_tmpTableFilter = ''; - /** @var array Number of results in list per page (used in select field) */ protected $_pagination = array(20, 50, 100, 300); @@ -283,11 +280,11 @@ class HelperListCore extends Helper 'alt' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'], ); } - else if (isset($params['float'])) + else if (isset($params['type']) && $params['type'] == 'float') $this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.'); else if (isset($params['type']) && $params['type'] == 'price') { - $currency = isset($params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency; + $currency = (isset($params['currency']) && $params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency; $this->_list[$index][$key] = Tools::displayPrice($tr[$key], $currency, false); } else if (isset($params['type']) && $params['type'] == 'date') diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 828f28c66..c57dd6b49 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -68,7 +68,6 @@ class AdminCartsControllerCore extends AdminController 'align' => 'right', 'prefix' => '', 'suffix' => '', - 'currency' => true ), 'carrier' => array( 'title' => $this->l('Carrier'), diff --git a/controllers/admin/AdminCurrenciesController.php b/controllers/admin/AdminCurrenciesController.php index 894439e05..49962dd42 100644 --- a/controllers/admin/AdminCurrenciesController.php +++ b/controllers/admin/AdminCurrenciesController.php @@ -47,7 +47,7 @@ class AdminCurrenciesControllerCore extends AdminController 'iso_code' => array('title' => $this->l('ISO code'), 'align' => 'center', 'width' => 80), 'iso_code_num' => array('title' => $this->l('ISO code number'), 'align' => 'center', 'width' => 120), 'sign' => array('title' => $this->l('Symbol'), 'width' => 20, 'align' => 'center', 'orderby' => false, 'search' => false), - 'conversion_rate' => array('title' => $this->l('Conversion rate'), 'float' => true, 'align' => 'center', 'width' => 130, 'search' => false), + 'conversion_rate' => array('title' => $this->l('Conversion rate'), 'type' => 'float', 'align' => 'center', 'width' => 130, 'search' => false), 'active' => array('title' => $this->l('Enabled'), 'width' => 25, 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false), ); diff --git a/controllers/admin/AdminRangeWeightController.php b/controllers/admin/AdminRangeWeightController.php index 894bfba8d..6243b8a22 100644 --- a/controllers/admin/AdminRangeWeightController.php +++ b/controllers/admin/AdminRangeWeightController.php @@ -40,8 +40,8 @@ class AdminRangeWeightControllerCore extends AdminController $this->fields_list = array( 'id_range_weight' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'carrier_name' => array('title' => $this->l('Carrier'), 'align' => 'left', 'width' => 'auto', 'filter_key' => 'ca!name'), - 'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'float' => true, 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'), - 'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'float' => true, 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right')); + 'delimiter1' => array('title' => $this->l('From'), 'width' => 86, 'type' => 'float', 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right'), + 'delimiter2' => array('title' => $this->l('To'), 'width' => 86, 'type' => 'float', 'suffix' => Configuration::get('PS_WEIGHT_UNIT'), 'align' => 'right')); $this->_join = 'LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.`id_carrier` = a.`id_carrier`)'; $this->_select = 'ca.`name` AS carrier_name';