Skip to content

Commit

Permalink
Merge branch '4.0-dev' into switcher-label
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeutz committed Jan 4, 2020
2 parents a8425ab + f61ea93 commit 3e92b9d
Show file tree
Hide file tree
Showing 70 changed files with 392 additions and 417 deletions.
14 changes: 13 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ steps:
- name: javascript-cs
depends_on: [ npm ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
Expand All @@ -181,6 +183,8 @@ steps:
- name: javascript-tests
depends_on: [ npm ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
Expand All @@ -191,24 +195,32 @@ steps:
- name: system-tests-mysql
depends_on: [ javascript-tests ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql

- name: system-tests-mysql8
depends_on: [ system-tests-mysql ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8

- name: system-tests-postgres
depends_on: [ system-tests-mysql8 ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres

- name: api-tests
depends_on: [ system-tests-postgres ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)"

Expand Down Expand Up @@ -297,6 +309,6 @@ services:

---
kind: signature
hmac: 9269cc571ec30d3d18ba3bb5f7dc132c36608b54ec777ae6d9c6dde224255fc8
hmac: bf9ea2d23f5b94fc80c2cb5fbd9b8c5f7b1423319c01a904b0b499233eb873f6

...
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function getOptions()
$canCreate = AssociationsHelper::allowAdd($extensionName, $typeName);

// Gets existing languages.
$existingLanguages = LanguageHelper::getContentLanguages(array(0, 1));
$existingLanguages = LanguageHelper::getContentLanguages(array(0, 1), false);

$options = array();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
$titleFieldName = self::getTypeFieldName($extensionName, $typeName, 'title');

// Get all content languages.
$languages = LanguageHelper::getContentLanguages(array(0, 1));
$languages = LanguageHelper::getContentLanguages(array(0, 1), false);
$content_languages = array_column($languages, 'lang_code');

// Display warning if Content Language is trashed or deleted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<field
name="itemlanguage"
type="itemlanguage"
label="COM_ASSOCIATIONS_ITEM_FIELD_LANGUAGE_LABEL"
label="COM_ASSOCIATIONS_SELECT_TARGET_LANGUAGE_LABEL"
>
<option value="">COM_ASSOCIATIONS_SELECT_TARGET_LANGUAGE</option>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,15 @@
<div class="clearfix">
<h3 class="target-text"><?php echo Text::_('COM_ASSOCIATIONS_ASSOCIATED_ITEM'); ?></h3>
</div>
<div class="langtarget"><?php echo $this->form->getInput('itemlanguage'); ?></div>
<div class="modaltarget"><?php echo $this->form->getInput('modalassociation'); ?></div>
<div class="langtarget">
<div class="sr-only">
<?php echo $this->form->getLabel('itemlanguage'); ?>
</div>
<?php echo $this->form->getInput('itemlanguage'); ?>
</div>
<div class="modaltarget">
<?php echo $this->form->getInput('modalassociation'); ?>
</div>
</div>
<iframe id="target-association" name="target-association" title="target-association"
src="<?php echo $this->defaultTargetSrc; ?>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function fetchAssociations()
$associations[$lang]->title = $categoryTable->title;
}

$countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1)));
$countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1), false));

if (count($associations) == 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function getInput()
$allowSelect = ((string) $this->element['select'] != 'false');
$allowPropagate = ((string) $this->element['propagate'] == 'true');

$languages = LanguageHelper::getContentLanguages(array(0, 1));
$languages = LanguageHelper::getContentLanguages(array(0, 1), false);

// Load language.
Factory::getLanguage()->load('com_categories', JPATH_ADMINISTRATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
// Association category items
if ($this->getAssoc())
{
$languages = LanguageHelper::getContentLanguages(false, true, null, 'ordering', 'asc');
$languages = LanguageHelper::getContentLanguages(false, false, null, 'ordering', 'asc');

if (count($languages) > 1)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function fetchAssociations()
$associations[$lang]->title = $contactTable->name;
}

$countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1)));
$countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1), false));

if (count($associations) == 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function getInput()
$allowSelect = ((string) $this->element['select'] != 'false');
$allowPropagate = ((string) $this->element['propagate'] == 'true');

$languages = LanguageHelper::getContentLanguages(array(0, 1));
$languages = LanguageHelper::getContentLanguages(array(0, 1), false);

// Load language
Factory::getLanguage()->load('com_contact', JPATH_ADMINISTRATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
// Association contact items
if (Associations::isEnabled())
{
$languages = LanguageHelper::getContentLanguages(false, true, null, 'ordering', 'asc');
$languages = LanguageHelper::getContentLanguages(false, false, null, 'ordering', 'asc');

if (count($languages) > 1)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function fetchAssociations()
$associations[$lang]->title = $contentTable->title;
}

$countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1)));
$countContentLanguages = count(LanguageHelper::getContentLanguages(array(0, 1), false));

if (count($associations) == 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function getInput()
$allowSelect = ((string) $this->element['select'] != 'false');
$allowPropagate = ((string) $this->element['propagate'] == 'true');

$languages = LanguageHelper::getContentLanguages(array(0, 1));
$languages = LanguageHelper::getContentLanguages(array(0, 1), false);

// Load language
Factory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
// Association content items
if (Associations::isEnabled())
{
$languages = LanguageHelper::getContentLanguages(false, true, null, 'ordering', 'asc');
$languages = LanguageHelper::getContentLanguages(false, false, null, 'ordering', 'asc');

if (count($languages) > 1)
{
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_cpanel/tmpl/cpanel/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
'url' => Route::_('index.php?option=com_cpanel&task=addModule&function=jSelectModuleType&position=' . $this->escape($this->position)),
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<button type="button" class="button-cancel btn btn-sm btn-danger" data-dismiss="modal" data-target="#closeBtn" aria-hidden="true"><span class="icon-cancel" aria-hidden="true"></span>'
'footer' => '<button type="button" class="button-cancel btn btn-sm btn-danger" data-dismiss="modal" data-target="#closeBtn"><span class="icon-cancel" aria-hidden="true"></span>'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="button-save btn btn-sm btn-success hidden" data-target="#saveBtn" aria-hidden="true"><span class="icon-save" aria-hidden="true"></span>'
. '<button type="button" class="button-save btn btn-sm btn-success hidden" data-target="#saveBtn"><span class="icon-save" aria-hidden="true"></span>'
. Text::_('JSAVE') . '</button>',
)
);
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_csp/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Joomla\DI\ServiceProviderInterface;

/**
* The cache service provider.
* The com_csp service provider.
*
* @since 4.0.0
*/
Expand Down
51 changes: 0 additions & 51 deletions administrator/components/com_fields/Helper/FieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Joomla\CMS\Factory;
use Joomla\CMS\Fields\FieldsServiceInterface;
use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Language\Multilanguage;
Expand Down Expand Up @@ -678,56 +677,6 @@ public static function getFieldsPluginId()
return $result;
}

/**
* Configure the Linkbar.
*
* @param string $context The context the fields are used for
* @param string $vName The view currently active
*
* @return void
*
* @since 3.7.0
*/
public static function addSubmenu($context, $vName)
{
$parts = self::extract($context);

if (!$parts)
{
return;
}

$component = $parts[0];

// Avoid nonsense situation.
if ($component == 'com_fields')
{
return;
}

// Try to find the component helper.
$eName = str_replace('com_', '', $component);
$file = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');

if (!file_exists($file))
{
return;
}

require_once $file;

$cName = ucfirst($eName) . 'Helper';

if (class_exists($cName) && is_callable(array($cName, 'addSubmenu')))
{
$lang = Factory::getLanguage();
$lang->load($component, JPATH_ADMINISTRATOR)
|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component);

$cName::addSubmenu('fields.' . $vName);
}
}

/**
* Loads the fields plugins and returns an array of field types from the plugins.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@

defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;

/** @var JoomlaupdateViewDefault $this */
?>
<fieldset>
<legend>
<?php echo JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATES'); ?>
<?php echo Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATES'); ?>
</legend>
<p>
<?php echo JText::sprintf($this->langKey, $this->updateSourceKey); ?>
<?php echo Text::sprintf($this->langKey, $this->updateSourceKey); ?>
</p>
<div class="alert alert-success">
<?php echo JText::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATESNOTICE', JVERSION); ?>
<?php echo Text::sprintf('COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATESNOTICE', JVERSION); ?>
</div>
</fieldset>

0 comments on commit 3e92b9d

Please sign in to comment.