Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion component/admin/models/fields/language.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class JFormFieldLanguage extends JFormFieldList
*/
protected function getOptions()
{
$app = JFactory::getApplication();
$state = $app->getUserState('com_localise.select');
$attributes = '';

if ($v = (string) $this->element['onchange'])
Expand All @@ -58,7 +60,24 @@ protected function getOptions()
$install = array();
}

$languages = array_merge($admin, $site, $install);
// Listing languages in the language filter depending on the client filter
if ($state['client'] == 'installation')
{
$languages = $install;
}
elseif ($state['client'] == 'administrator')
{
$languages = $admin;
}
elseif ($state['client'] == 'site')
{
$languages = $site;
}
else
{
$languages = array_merge($admin, $site, $install);
}

$attributes .= ' class="' . (string) $this->element['class'] . ($this->value == $reference ? ' iconlist-16-reference"' : '"');

foreach ($languages as $i => $language)
Expand Down
2 changes: 1 addition & 1 deletion localise.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<copyright>(C) 2015 Open Source Matters. All rights reserved.</copyright>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>https://github.com/joomla-projects/com_localise</authorUrl>
<version>4.0.10-dev</version>
<version>4.0.11-dev</version>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<description>COM_LOCALISE_XML_DESCRIPTION</description>
<scriptfile>install.php</scriptfile>
Expand Down
4 changes: 2 additions & 2 deletions update-server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<description>Localise - nice and easy management of languages and translation files.</description>
<element>com_localise</element>
<type>component</type>
<version>4.0.10-dev</version>
<version>4.0.11-dev</version>
<infourl title="com_localise">https://github.com/joomla-projects/com_localise/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/joomla-projects/com_localise/releases/download/4.0.10-dev/com_localise-4.0.10-dev.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/joomla-projects/com_localise/releases/download/4.0.11-dev/com_localise-4.0.11-dev.zip</downloadurl>
</downloads>
<targetplatform name="joomla" version=".*" />
</update>
Expand Down