diff --git a/administrator/components/com_installer/Model/ManageModel.php b/administrator/components/com_installer/Model/ManageModel.php
index f1df367f0cfe3..4bc02f77d0db6 100644
--- a/administrator/components/com_installer/Model/ManageModel.php
+++ b/administrator/components/com_installer/Model/ManageModel.php
@@ -71,6 +71,7 @@ protected function populateState($ordering = 'name', $direction = 'asc')
$this->setState('filter.status', $this->getUserStateFromRequest($this->context . '.filter.status', 'filter_status', '', 'string'));
$this->setState('filter.type', $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type', '', 'string'));
$this->setState('filter.folder', $this->getUserStateFromRequest($this->context . '.filter.folder', 'filter_folder', '', 'string'));
+ $this->setState('filter.core', $this->getUserStateFromRequest($this->context . '.filter.core', 'filter_core', '', 'string'));
$this->setState('message', $app->getUserState('com_installer.message'));
$this->setState('extension_message', $app->getUserState('com_installer.extension_message'));
@@ -301,14 +302,15 @@ protected function getListQuery()
$type = $this->getState('filter.type');
$clientId = $this->getState('filter.client_id');
$folder = $this->getState('filter.folder');
+ $core = $this->getState('filter.core');
- if ($status != '')
+ if ($status !== '')
{
- if ($status == '2')
+ if ($status === '2')
{
$query->where('protected = 1');
}
- elseif ($status == '3')
+ elseif ($status === '3')
{
$query->where('protected = 0');
}
@@ -324,16 +326,39 @@ protected function getListQuery()
$query->where('type = ' . $this->_db->quote($type));
}
- if ($clientId != '')
+ if ($clientId !== '')
{
$query->where('client_id = ' . (int) $clientId);
}
- if ($folder != '')
+ if ($folder !== '')
{
$query->where('folder = ' . $this->_db->quote($folder == '*' ? '' : $folder));
}
+ if ($core !== '')
+ {
+ $coreExtensions = \JExtensionHelper::getCoreExtensions();
+ $elements = array();
+
+ foreach ($coreExtensions as $extension)
+ {
+ $elements[] = $this->getDbo()->quote($extension[1]);
+ }
+
+ if ($elements)
+ {
+ if ($core === '1')
+ {
+ $query->where($this->getDbo()->quoteName('element') . ' IN (' . implode(',', $elements) . ')');
+ }
+ elseif ($core === '0')
+ {
+ $query->where($this->getDbo()->quoteName('element') . ' NOT IN (' . implode(',', $elements) . ')');
+ }
+ }
+ }
+
// Process search filter (extension id).
$search = $this->getState('filter.search');
diff --git a/administrator/components/com_installer/forms/filter_manage.xml b/administrator/components/com_installer/forms/filter_manage.xml
index b86cfa9f1d00d..056d8b9ab483d 100644
--- a/administrator/components/com_installer/forms/filter_manage.xml
+++ b/administrator/components/com_installer/forms/filter_manage.xml
@@ -40,6 +40,16 @@
>
+
+
+
+
+
+
diff --git a/administrator/language/en-GB/en-GB.com_installer.ini b/administrator/language/en-GB/en-GB.com_installer.ini
index 03a7b3d25a929..477e5d5f68bb9 100644
--- a/administrator/language/en-GB/en-GB.com_installer.ini
+++ b/administrator/language/en-GB/en-GB.com_installer.ini
@@ -251,6 +251,9 @@ COM_INSTALLER_UPLOAD_AND_INSTALL="Upload & Install"
COM_INSTALLER_UPLOAD_INSTALL_JOOMLA_EXTENSION="Upload & Install Joomla Extension"
COM_INSTALLER_UPLOAD_PACKAGE_FILE="Upload Package File"
COM_INSTALLER_VALUE_CLIENT_SELECT="- Select Location -"
+COM_INSTALLER_VALUE_CORE_NO="Show non-core extensions"
+COM_INSTALLER_VALUE_CORE_SELECT=" - Select Core - "
+COM_INSTALLER_VALUE_CORE_YES="Show core extensions"
COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE="N/A"
COM_INSTALLER_VALUE_FOLDER_SELECT="- Select Folder -"
COM_INSTALLER_VALUE_STATE_SELECT="- Select Status -"