diff --git a/administrator/components/com_fields/models/fields.php b/administrator/components/com_fields/models/fields.php index ef89c1e3f2644..b50f799b7fc2c 100644 --- a/administrator/components/com_fields/models/fields.php +++ b/administrator/components/com_fields/models/fields.php @@ -302,17 +302,16 @@ protected function getListQuery() } // Add the list ordering clause - $listOrdering = $this->getState('list.ordering', 'a.ordering'); - $listDirn = $db->escape($this->getState('list.direction', 'ASC')); + $listOrdering = $this->getState('list.fullordering', 'a.ordering'); + $orderDirn = ''; - if ($listOrdering == 'a.access') + if (empty($listOrdering)) { - $query->order('a.access ' . $listDirn); - } - else - { - $query->order($db->escape($listOrdering) . ' ' . $listDirn); + $listOrdering = $this->state->get('list.ordering', 'a.ordering'); + $orderDirn = $this->state->get('list.direction', 'DESC'); } + + $query->order($db->escape($listOrdering) . ' ' . $db->escape($orderDirn)); return $query; } diff --git a/administrator/components/com_fields/models/forms/filter_fields.xml b/administrator/components/com_fields/models/forms/filter_fields.xml index 68f6f50cbb13b..4e6a1a8e32f54 100644 --- a/administrator/components/com_fields/models/forms/filter_fields.xml +++ b/administrator/components/com_fields/models/forms/filter_fields.xml @@ -77,8 +77,8 @@ - - + + diff --git a/administrator/components/com_fields/views/fields/tmpl/default.php b/administrator/components/com_fields/views/fields/tmpl/default.php index 4faf7dc1a12b2..0db78fbd99264 100644 --- a/administrator/components/com_fields/views/fields/tmpl/default.php +++ b/administrator/components/com_fields/views/fields/tmpl/default.php @@ -20,7 +20,7 @@ $userId = $user->get('id'); $context = $this->escape($this->state->get('filter.context')); $component = $this->state->get('filter.component'); -$listOrder = $this->escape($this->state->get('list.ordering')); +$listOrder = str_replace(' ' . $this->state->get('list.direction'), '', $this->state->get('list.fullordering')); $listDirn = $this->escape($this->state->get('list.direction')); $ordering = ($listOrder == 'a.ordering'); $saveOrder = ($listOrder == 'a.ordering' && strtolower($listDirn) == 'asc'); @@ -70,13 +70,13 @@ - + - state->get('list.direction'), $this->state->get('list.ordering')); ?> + state->get('list.direction'), $this->state->get('list.fullordering')); ?> diff --git a/administrator/language/en-GB/en-GB.com_fields.ini b/administrator/language/en-GB/en-GB.com_fields.ini index 8fa259c5a60fa..bcca5c3b4bbad 100644 --- a/administrator/language/en-GB/en-GB.com_fields.ini +++ b/administrator/language/en-GB/en-GB.com_fields.ini @@ -91,6 +91,8 @@ COM_FIELDS_SYSTEM_PLUGIN_NOT_ENABLED="The System - Fields COM_FIELDS_VIEW_FIELDS_BATCH_OPTIONS="Batch process the selected fields." COM_FIELDS_VIEW_FIELDS_SELECT_GROUP="- Select Field Group -" COM_FIELDS_VIEW_FIELDS_SELECT_CATEGORY="- Select Assigned Category -" +COM_FIELDS_VIEW_FIELDS_SORT_GROUP_ASC="Field Group ascending" +COM_FIELDS_VIEW_FIELDS_SORT_GROUP_DESC="Field Group descending" COM_FIELDS_VIEW_FIELDS_SORT_TYPE_ASC="Type ascending" COM_FIELDS_VIEW_FIELDS_SORT_TYPE_DESC="Type descending" COM_FIELDS_VIEW_FIELDS_TITLE="%s: Fields"