diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 728217ed3e31a..de208a82be753 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -1407,6 +1407,7 @@ public function deleteUnexistingFiles() '/libraries/joomla/document/opensearch/opensearch.php', '/libraries/joomla/document/raw/raw.php', '/libraries/joomla/document/xml/xml.php', + '/administrator/components/com_installer/views/languages/tmpl/default_filter.php', ); // TODO There is an issue while deleting folders using the ftp mode diff --git a/administrator/components/com_installer/models/forms/filter_languages.xml b/administrator/components/com_installer/models/forms/filter_languages.xml new file mode 100644 index 0000000000000..63f91444fc926 --- /dev/null +++ b/administrator/components/com_installer/models/forms/filter_languages.xml @@ -0,0 +1,39 @@ + +
diff --git a/administrator/components/com_installer/models/languages.php b/administrator/components/com_installer/models/languages.php index b0b4294f637bd..d8a63821d01a4 100644 --- a/administrator/components/com_installer/models/languages.php +++ b/administrator/components/com_installer/models/languages.php @@ -41,8 +41,9 @@ public function __construct($config = array()) if (empty($config['filter_fields'])) { $config['filter_fields'] = array( - 'update_id', 'update_id', - 'name', 'name', + 'update_id', + 'name', + 'element', ); } @@ -99,7 +100,7 @@ protected function _getListQuery() $query = $db->getQuery(true); // Select the required fields from the updates table. - $query->select($db->quoteName(array('update_id', 'name', 'version', 'detailsurl', 'type'))) + $query->select($db->quoteName(array('update_id', 'name', 'element', 'version', 'detailsurl', 'type'))) ->from($db->quoteName('#__updates')); /* @@ -122,7 +123,6 @@ protected function _getListQuery() // Filter by search in title $search = $this->getState('filter.search'); - if (!empty($search)) { $search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%')); @@ -130,9 +130,7 @@ protected function _getListQuery() } // Add the list ordering clause. - $listOrder = $this->state->get('list.ordering'); - $orderDirn = $this->state->get('list.direction'); - $query->order($db->escape($listOrder) . ' ' . $db->escape($orderDirn)); + $query->order($db->escape($this->getState('list.ordering', 'name')) . ' ' . $db->escape($this->getState('list.direction', 'ASC'))); return $query; } @@ -168,12 +166,9 @@ protected function getStoreId($id = '') */ protected function populateState($ordering = 'name', $direction = 'asc') { - $app = JFactory::getApplication(); - - $value = $app->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); - $this->setState('filter.search', $value); + $this->setState('filter.search', $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search', '', 'string')); - $this->setState('extension_message', $app->getUserState('com_installer.extension_message')); + $this->setState('extension_message', JFactory::getApplication()->getUserState('com_installer.extension_message')); parent::populateState($ordering, $direction); } diff --git a/administrator/components/com_installer/views/languages/tmpl/default.php b/administrator/components/com_installer/views/languages/tmpl/default.php index b1f445d96faef..6693d9cf16a36 100644 --- a/administrator/components/com_installer/views/languages/tmpl/default.php +++ b/administrator/components/com_installer/views/languages/tmpl/default.php @@ -16,11 +16,9 @@ $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); -$version = new JVersion; - ?>