diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 5a21e8dad..3dd64ad0d 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -94,7 +94,7 @@ class AdminControllerCore extends Controller protected $list_simple_header; /** @var array list to be generated */ - protected $fieldsDisplay; + protected $fields_list; /** @var array edit form to be generated */ protected $fields_form; @@ -803,7 +803,7 @@ class AdminControllerCore extends Controller $tmp_tab = explode('!', $key); $key = (count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]); - if (array_key_exists($key, $this->fieldsDisplay)) + if (array_key_exists($key, $this->fields_list)) unset($this->context->cookie->$cookie_key); } @@ -1045,11 +1045,11 @@ class AdminControllerCore extends Controller protected function filterToField($key, $filter) { - foreach ($this->fieldsDisplay as $field) + foreach ($this->fields_list as $field) if (array_key_exists('filter_key', $field) && $field['filter_key'] == $key) return $field; - if (array_key_exists($filter, $this->fieldsDisplay)) - return $this->fieldsDisplay[$filter]; + if (array_key_exists($filter, $this->fields_list)) + return $this->fields_list[$filter]; return false; } @@ -1379,7 +1379,7 @@ class AdminControllerCore extends Controller */ public function renderList() { - if (!($this->fieldsDisplay && is_array($this->fieldsDisplay))) + if (!($this->fields_list && is_array($this->fields_list))) return false; $this->getList($this->context->language->id); @@ -1400,7 +1400,7 @@ class AdminControllerCore extends Controller $this->actions[] = $action; } - $list = $helper->generateList($this->_list, $this->fieldsDisplay); + $list = $helper->generateList($this->_list, $this->fields_list); return $list; } @@ -1849,7 +1849,7 @@ class AdminControllerCore extends Controller break; } } - elseif (!empty($this->fields_options) && empty($this->fieldsDisplay)) + elseif (!empty($this->fields_options) && empty($this->fields_list)) $this->display = 'options'; } diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index bccabee04..f7588c616 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -78,7 +78,7 @@ class HelperListCore extends Helper * icon : icon determined by values * active : allow to toggle status */ - protected $fieldsDisplay; + protected $fields_list; /** @var boolean Content line is clickable if true */ public $no_link = false; @@ -138,7 +138,7 @@ class HelperListCore extends Helper $this->footer_tpl = $this->createTemplate($this->footer_tpl); $this->_list = $list; - $this->fieldsDisplay = $fields_display; + $this->fields_list = $fields_display; // Display list header (filtering, pagination and column names) $tpl_vars['header'] = $this->displayListHeader(); @@ -182,7 +182,7 @@ class HelperListCore extends Helper else $id_category = Category::getRootCategory()->id; - if (isset($this->fieldsDisplay['position'])) + if (isset($this->fields_list['position'])) { $positions = array_map(create_function('$elem', 'return (int)($elem[\'position\']);'), $this->_list); sort($positions); @@ -217,7 +217,7 @@ class HelperListCore extends Helper // @todo skip action for bulk actions // $this->_list[$index]['has_bulk_actions'] = true; - foreach ($this->fieldsDisplay as $key => $params) + foreach ($this->fields_list as $key => $params) { $tmp = explode('!', $key); $key = isset($tmp[1]) ? $tmp[1] : $tmp[0]; @@ -321,7 +321,7 @@ class HelperListCore extends Helper 'order_by' => $this->orderBy, 'order_way' => $this->orderWay, 'is_cms' => $this->is_cms, - 'fields_display' => $this->fieldsDisplay, + 'fields_display' => $this->fields_list, 'list' => $this->_list, 'actions' => $this->actions, 'no_link' => $this->no_link, @@ -371,14 +371,14 @@ class HelperListCore extends Helper * [ * {field_name: 'value'} * ], - * fields_display: // attribute $fieldsDisplay of the admin controller + * fields_display: // attribute $fields_list of the admin controller * } * or somethins like this: * { * use_parent_structure: false // If false, data need to be an html * data: * '

My html content

', - * fields_display: // attribute $fieldsDisplay of the admin controller + * fields_display: // attribute $fields_list of the admin controller * } */ protected function displayDetailsLink($token = null, $id, $name = null) @@ -537,7 +537,7 @@ class HelperListCore extends Helper if ($this->position_identifier && ($this->orderBy == 'position' && $this->orderWay != 'DESC')) $table_dnd = true; - foreach ($this->fieldsDisplay as $key => $params) + foreach ($this->fields_list as $key => $params) { if (!isset($params['type'])) $params['type'] = 'text'; @@ -570,7 +570,7 @@ class HelperListCore extends Helper if (isset($_POST[$this->table.'Filter_'.$params['filter_key']]) && Tools::getValue($this->table.'Filter_'.$params['filter_key']) == $option_value && Tools::getValue($this->table.'Filter_'.$params['filter_key']) != '') - $this->fieldsDisplay[$key]['select'][$option_value]['selected'] = 'selected'; + $this->fields_list[$key]['select'][$option_value]['selected'] = 'selected'; } break; @@ -579,7 +579,7 @@ class HelperListCore extends Helper $value = ''; } $params['value'] = $value; - $this->fieldsDisplay[$key] = $params; + $this->fields_list[$key] = $params; } $this->header_tpl->assign(array_merge($this->tpl_vars, array( @@ -600,7 +600,7 @@ class HelperListCore extends Helper 'order_way' => $this->orderWay, 'order_by' => $this->orderBy, 'token' => $this->token, - 'fields_display' => $this->fieldsDisplay, + 'fields_display' => $this->fields_list, 'delete' => in_array('delete', $this->actions), 'identifier' => $this->identifier, 'id_cat' => $id_cat, diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 6dcc3b9ef..c8ff9a033 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -52,7 +52,7 @@ class AdminAddressesControllerCore extends AdminController foreach ($countries as $country) $this->countries_array[$country['id_country']] = $country['name']; - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'firstname' => array('title' => $this->l('First name'), 'width' => 120, 'filter_key' => 'a!firstname'), 'lastname' => array('title' => $this->l('Last name'), 'width' => 140, 'filter_key' => 'a!lastname'), diff --git a/controllers/admin/AdminAttachmentsController.php b/controllers/admin/AdminAttachmentsController.php index 51bf8ac55..36a0c0445 100644 --- a/controllers/admin/AdminAttachmentsController.php +++ b/controllers/admin/AdminAttachmentsController.php @@ -39,7 +39,7 @@ class AdminAttachmentsControllerCore extends AdminController $this->addRowAction('edit'); $this->addRowAction('delete'); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_attachment' => array( 'title' => $this->l('ID'), 'align' => 'center', diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index be31820a3..6a6692e63 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -39,7 +39,7 @@ class AdminAttributesGroupsControllerCore extends AdminController $this->lang = true; $this->_defaultOrderBy = 'position'; - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_attribute_group' => array( 'title' => $this->l('ID'), 'width' => 25, @@ -101,7 +101,7 @@ class AdminAttributesGroupsControllerCore extends AdminController if (!Validate::isLoadedObject($obj = new AttributeGroup((int)$id))) $this->errors[] = Tools::displayError('An error occurred while updating status for object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_attribute' => array( 'title' => $this->l('ID'), 'width' => 40, @@ -115,13 +115,13 @@ class AdminAttributesGroupsControllerCore extends AdminController ); if ($obj->group_type == 'color') - $this->fieldsDisplay['color'] = array( + $this->fields_list['color'] = array( 'title' => $this->l('Color'), 'width' => 40, 'filter_key' => 'b!color' ); - $this->fieldsDisplay['position'] = array( + $this->fields_list['position'] = array( 'title' => $this->l('Position'), 'width' => 40, 'filter_key' => 'cp!position', @@ -159,7 +159,7 @@ class AdminAttributesGroupsControllerCore extends AdminController $helper->show_toolbar = false; $helper->bulk_actions = $this->bulk_actions; $helper->position_identifier = 'id_attribute'; - $content = $helper->generateList($this->_list, $this->fieldsDisplay); + $content = $helper->generateList($this->_list, $this->fields_list); die (Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content))); } diff --git a/controllers/admin/AdminBackupController.php b/controllers/admin/AdminBackupController.php index b7d9e9cdd..0917fffc2 100644 --- a/controllers/admin/AdminBackupController.php +++ b/controllers/admin/AdminBackupController.php @@ -37,7 +37,7 @@ class AdminBackupControllerCore extends AdminController $this->identifier = 'filename'; parent::__construct(); - $this->fieldsDisplay = array ( + $this->fields_list = array ( 'date' => array('title' => $this->l('Date'), 'type' => 'datetime', 'width' => 120, 'align' => 'right'), 'age' => array('title' => $this->l('Age')), 'filename' => array('title' => $this->l('File name'), 'width' => 200), diff --git a/controllers/admin/AdminCarriersController.php b/controllers/admin/AdminCarriersController.php index 750f2ec7c..9919060f2 100644 --- a/controllers/admin/AdminCarriersController.php +++ b/controllers/admin/AdminCarriersController.php @@ -51,7 +51,7 @@ class AdminCarriersControllerCore extends AdminController 'dir' => 's' ); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_carrier' => array( 'title' => $this->l('ID'), 'align' => 'center', diff --git a/controllers/admin/AdminCartRulesController.php b/controllers/admin/AdminCartRulesController.php index 9264426e0..9133cc001 100644 --- a/controllers/admin/AdminCartRulesController.php +++ b/controllers/admin/AdminCartRulesController.php @@ -36,7 +36,7 @@ class AdminCartRulesControllerCore extends AdminController $this->addRowAction('edit'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_cart_rule' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Code')), 'priority' => array('title' => $this->l('Priority')), diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 952ac87bd..828f28c66 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -44,7 +44,7 @@ class AdminCartsControllerCore extends AdminController LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart) LEFT JOIN `'._DB_PREFIX_.'connections` co ON (a.id_guest = co.id_guest AND TIME_TO_SEC(TIMEDIFF(NOW(), co.`date_add`)) < 1800)'; - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_cart' => array( 'title' => $this->l('ID'), 'align' => 'center', diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 0cbe3566b..c02a34797 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -47,7 +47,7 @@ class AdminCategoriesControllerCore extends AdminController 'dir' => 'c' ); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_category' => array( 'title' => $this->l('ID'), 'align' => 'center', @@ -104,7 +104,7 @@ class AdminCategoriesControllerCore extends AdminController // if we are not in a shop context, we remove the position column if (Shop::getContext() != Shop::CONTEXT_SHOP) - unset($this->fieldsDisplay['position']); + unset($this->fields_list['position']); // shop restriction : if category is not available for current shop, we redirect to the list from default category if (!Shop::isCategoryAvailable($this->_category->id)) { diff --git a/controllers/admin/AdminCmsCategoriesController.php b/controllers/admin/AdminCmsCategoriesController.php index 7365ef75a..db4f4235b 100644 --- a/controllers/admin/AdminCmsCategoriesController.php +++ b/controllers/admin/AdminCmsCategoriesController.php @@ -42,7 +42,7 @@ class AdminCmsCategoriesControllerCore extends AdminController $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_cms_category' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 30), 'name' => array('title' => $this->l('Name'), 'width' => 'auto', 'callback' => 'hideCMSCategoryPosition', 'callback_object' => 'CMSCategory'), 'description' => array('title' => $this->l('Description'), 'width' => 500, 'maxlength' => 90, 'orderby' => false), diff --git a/controllers/admin/AdminCmsController.php b/controllers/admin/AdminCmsController.php index e748d5407..66c5651b1 100644 --- a/controllers/admin/AdminCmsController.php +++ b/controllers/admin/AdminCmsController.php @@ -43,7 +43,7 @@ class AdminCmsControllerCore extends AdminController $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_cms' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'link_rewrite' => array('title' => $this->l('URL'), 'width' => 'auto'), 'meta_title' => array('title' => $this->l('Title'), 'width' => '300', 'filter_key' => 'b!meta_title'), @@ -194,7 +194,7 @@ class AdminCmsControllerCore extends AdminController /* Display list header (filtering, pagination and column names) */ $this->displayListHeader($token); if (!count($this->_list)) - echo ''.$this->l('No items found').''; + echo ''.$this->l('No items found').''; /* Show the content of the table */ $this->displayListContent($token); diff --git a/controllers/admin/AdminContactsController.php b/controllers/admin/AdminContactsController.php index 3c6ddeb4b..61afec9a6 100644 --- a/controllers/admin/AdminContactsController.php +++ b/controllers/admin/AdminContactsController.php @@ -36,7 +36,7 @@ class AdminContactsControllerCore extends AdminController $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); - $this->fieldsDisplay = array( + $this->fields_list = array( 'id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Title'), 'width' => 130), 'email' => array('title' => $this->l('E-mail address'), 'width' => 130),