Skip to content

Commit

Permalink
Merge branch '4.0-dev' into thu5
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman committed Jul 15, 2019
2 parents 0787cdd + f6bfbde commit 46f2152
Show file tree
Hide file tree
Showing 419 changed files with 2,674 additions and 5,031 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Expand Up @@ -112,4 +112,4 @@ before_test:

test_script:
- cd C:\projects\joomla-cms
- libraries/vendor/bin/phpunit
- libraries/vendor/bin/phpunit --testsuite Unit
77 changes: 70 additions & 7 deletions .drone.yml
Expand Up @@ -26,11 +26,14 @@ steps:
- composer install --no-progress --no-suggest

- name: phpcs
image: php:7.2
image: joomlaprojects/docker-images:php7.2
depends_on: [ composer ]
commands:
- echo $(date)
- ./libraries/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla .
- ./libraries/vendor/bin/phpcs --config-set installed_paths ../../joomla/cms-coding-standards/lib,../../joomla/coding-standards/Joomla/ExampleRulesets,../../joomla/coding-standards
- ./libraries/vendor/bin/phpcs --config-set colors 1
- ./libraries/vendor/bin/phpcs --config-set php_version 70200
- ./libraries/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php --ignore=libraries/vendor/*,tests/*,build/*,node_modules/*,media/*,libraries/autoload_psr4.php,installation/template/error.php -p --standard=libraries/vendor/joomla/cms-coding-standards/lib/Joomla-CMS .
- echo $(date)

- name: npm
Expand Down Expand Up @@ -58,30 +61,90 @@ steps:
image: php:7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php73-unit
depends_on: [ phpcs ]
image: php:7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php74-unit
depends_on: [ phpcs ]
image: phpdaily/php:7.4-dev
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php80-unit
depends_on: [ phpcs ]
image: phpdaily/php:8.0-dev
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php72-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

- name: php73-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

- name: php74-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.4
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

- name: php80-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

- name: php72-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

# - name: php73-integration-pgsql
# depends_on: [ npm ]
# image: joomlaprojects/docker-images:php7.3
# commands:
# - php -v
# - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

# - name: php74-integration-pgsql
# depends_on: [ npm ]
# image: joomlaprojects/docker-images:php7.4
# failure: ignore
# commands:
# - php -v
# - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

# - name: php80-integration-pgsql
# depends_on: [ npm ]
# image: joomlaprojects/docker-images:php8.0
# failure: ignore
# commands:
# - php -v
# - ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

- name: javascript-cs
depends_on: [ npm ]
Expand Down Expand Up @@ -193,6 +256,6 @@ services:

---
kind: signature
hmac: b3723ea069a4139d4b9aef660f8fa5e01cc0c59017a77438a7245e0d552ef72a
hmac: 357290c302111f50af569691d21a182373f8138f7fe8ae1d9b62323b54ae80b9

...
Expand Up @@ -103,7 +103,7 @@
</td>
<th scope="row">
<?php echo ActionlogsHelper::getHumanReadableLogMessage($item); ?>
</td>
</th>
<td>
<?php echo $this->escape(Text::_($extension)); ?>
</td>
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_admin/script.php
Expand Up @@ -6055,7 +6055,8 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)

// Set flag in database if the update is done.
$db->setQuery('UPDATE ' . $db->quoteName('#__utf8_conversion')
. ' SET ' . $db->quoteName('converted') . ' = ' . $converted . ';')->execute();
. ' SET ' . $db->quoteName('converted') . ' = ' . $converted . ';'
)->execute();
}

/**
Expand Down
Expand Up @@ -31,17 +31,15 @@ class AssociationsHelper extends ContentHelper
/**
* Array of Registry objects of extensions
*
* var array $extensionsSupport
*
* @var array
* @since 3.7.0
*/
public static $extensionsSupport = null;

/**
* List of extensions name with support
*
* var array $supportedExtensionsList
*
* @var array
* @since 3.7.0
*/
public static $supportedExtensionsList = array();
Expand Down Expand Up @@ -422,6 +420,7 @@ public static function getSupportedExtension($extensionName)
$languageKey = $typeName;

$typeNameExploded = explode('.', $typeName);

if (array_pop($typeNameExploded) === 'category')
{
$languageKey = strtoupper($extensionName) . '_CATEGORIES';
Expand Down
Expand Up @@ -238,7 +238,7 @@ protected function getListQuery()
->join(
'LEFT',
$db->quoteName('#__associations', 'asso') . ' ON ' . $db->quoteName('asso.id') . ' = ' . $db->quoteName($fields['id'])
. ' AND ' . $db->quoteName('asso.context') . ' = ' . $db->quote($extensionName . '.' . 'item')
. ' AND ' . $db->quoteName('asso.context') . ' = ' . $db->quote($extensionName . '.item')
)
->join('LEFT', $db->quoteName('#__associations', 'asso2') . ' ON ' . $db->quoteName('asso2.key') . ' = ' . $db->quoteName('asso.key'));

Expand Down
Expand Up @@ -123,6 +123,7 @@ public function display($tpl = null)

// Check for special case category
$typeNameExploded = explode('.', $typeName);

if (array_pop($typeNameExploded) === 'category')
{
$this->typeName = 'category';
Expand Down
Expand Up @@ -3,6 +3,7 @@
<field
name="itemtype"
type="itemtype"
label="COM_ASSOCIATIONS_FILTER_SELECT_ITEM_TYPE"
filtermode="selector"
onchange="Joomla.resetFilters(this)"
>
Expand Down
Expand Up @@ -51,6 +51,7 @@
<?php $itemTypeField = $data['view']->filterForm->getField('itemtype'); ?>
<div class="js-stools-container-selector-first">
<div class="js-stools-field-selector js-stools-itemtype">
<div class="sr-only"><?php echo $itemTypeField->label; ?></div>
<?php echo $itemTypeField->input; ?>
</div>
</div>
Expand All @@ -59,6 +60,7 @@
<?php $languageField = $data['view']->filterForm->getField('language'); ?>
<div class="js-stools-container-selector">
<div class="js-stools-field-selector js-stools-language">
<div class="sr-only"><?php echo $languageField->label; ?></div>
<?php echo $languageField->input; ?>
</div>
</div>
Expand Down
24 changes: 12 additions & 12 deletions administrator/components/com_banners/tmpl/clients/default.php
Expand Up @@ -67,24 +67,24 @@
<?php echo HTMLHelper::_('searchtools.sort', 'COM_BANNERS_HEADING_CONTACT', 'a.contact', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:3%" class="text-center d-none d-md-table-cell">
<span class="icon-publish hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS'); ?></span>
</span>
<span class="icon-publish hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS'); ?></span>
</span>
</th>
<th scope="col" style="width:3%" class="text-center d-none d-md-table-cell">
<span class="icon-unpublish hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS'); ?></span>
</span>
<span class="icon-unpublish hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS'); ?></span>
</span>
</th>
<th scope="col" style="width:3%" class="text-center d-none d-md-table-cell">
<span class="icon-archive hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS'); ?></span>
</span>
<span class="icon-archive hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS'); ?></span>
</span>
</th>
<th scope="col" style="width:3%" class="text-center d-none d-md-table-cell">
<span class="icon-trash hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_TRASHED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_TRASHED_ITEMS'); ?></span>
</span>
<span class="icon-trash hasTooltip" aria-hidden="true" title="<?php echo Text::_('COM_BANNERS_COUNT_TRASHED_ITEMS'); ?>">
<span class="sr-only"><?php echo Text::_('COM_BANNERS_COUNT_TRASHED_ITEMS'); ?></span>
</span>
</th>
<th scope="col" style="width:10%" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_BANNERS_HEADING_PURCHASETYPE', 'a.purchase_type', $listDirn, $listOrder); ?>
Expand Down
Expand Up @@ -89,7 +89,6 @@ public function __get($name)
{
case 'allowAdd':
return (bool) $this->$name;

}

return parent::__get($name);
Expand Down
Expand Up @@ -86,8 +86,8 @@ protected function getInput()
Factory::getDocument()->addScriptDeclaration("
function jSelectCategory_" . $this->id . "(id, title, object) {
window.processModalSelect('Category', '" . $this->id . "', id, title, '', object);
}
");
}"
);

Text::script('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED');

Expand Down Expand Up @@ -136,6 +136,7 @@ function jSelectCategory_" . $this->id . "(id, title, object) {

// The current category display field.
$html = '';

if ($allowSelect || $allowNew || $allowEdit || $allowClear)
{
$html .= '<span class="input-group">';
Expand Down
Expand Up @@ -18,6 +18,12 @@
*/
abstract class CategoryAssociationHelper
{
/**
* Flag if associations are present for categories
*
* @var boolean
* @since 3.0
*/
public static $category_association = true;

/**
Expand Down
Expand Up @@ -648,7 +648,8 @@ public function save($data)
if ($associations)
{
$query->where('(' . $db->quoteName('id') . ' IN (' . implode(',', $associations) . ') OR '
. $db->quoteName('key') . ' = ' . $db->quote($oldKey) . ')');
. $db->quoteName('key') . ' = ' . $db->quote($oldKey) . ')'
);
}
else
{
Expand Down
Expand Up @@ -166,8 +166,8 @@ protected function addToolbar()
elseif ($lang->hasKey($component_section_key = $component . ($section ? "_$section" : '')))
{
$title = Text::sprintf('COM_CATEGORIES_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT')
. '_TITLE', $this->escape(Text::_($component_section_key))
);
. '_TITLE', $this->escape(Text::_($component_section_key))
);
}
// Else use the base title
else
Expand Down
Expand Up @@ -25,7 +25,6 @@
}

HTMLHelper::_('behavior.core');
HTMLHelper::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));

$extension = $this->escape($this->state->get('filter.extension'));
$function = $app->input->getCmd('function', 'jSelectCategory');
Expand Down Expand Up @@ -106,7 +105,7 @@
<?php echo LayoutHelper::render('joomla.html.treeprefix', array('level' => $item->level)); ?>
<a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->title)); ?>', null, '<?php echo $this->escape(ContentHelperRoute::getCategoryRoute($item->id, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);">
<?php echo $this->escape($item->title); ?></a>
<span class="small" title="<?php echo $this->escape($item->path); ?>">
<span class="small" title="<?php echo $this->escape($item->path); ?>">
<?php if (empty($item->note)) : ?>
<?php echo Text::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
<?php else : ?>
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_checkin/Model/CheckinModel.php
Expand Up @@ -111,8 +111,9 @@ public function checkin($ids = array())
$query = $db->getQuery(true)
->update($db->quoteName($tn))
->set($db->quoteName('checked_out') . ' = DEFAULT')
->set($db->quoteName('checked_out_time') . ' = ' . $db->quote($nullDate))
->where($db->quoteName('checked_out') . ' > 0');
->set($db->quoteName('checked_out_time') . ' = :checkouttime')
->where($db->quoteName('checked_out') . ' > 0')
->bind(':checkouttime', $nullDate);

$db->setQuery($query);

Expand Down
Expand Up @@ -76,6 +76,7 @@ public function save()
if (!$this->app->getIdentity()->authorise('core.admin'))
{
$this->setRedirect('index.php', Text::_('JERROR_ALERTNOAUTHOR'), 'error');

return false;
}

Expand Down Expand Up @@ -140,6 +141,7 @@ public function save()

// Redirect back to the edit screen.
$this->setRedirect(Route::_('index.php?option=com_config', false));

return false;
}

Expand All @@ -156,6 +158,7 @@ public function save()

// Save failed, go back to the screen and display a notice.
$this->setRedirect(Route::_('index.php?option=com_config', false));

return false;
}

Expand Down Expand Up @@ -189,13 +192,15 @@ public function removeroot()
if (!Session::checkToken('get'))
{
$this->setRedirect('index.php', Text::_('JINVALID_TOKEN'), 'error');

return false;
}

// Check if the user is authorized to do this.
if (!$this->app->getIdentity()->authorise('core.admin'))
{
$this->setRedirect('index.php', Text::_('JERROR_ALERTNOAUTHOR'), 'error');

return false;
}

Expand All @@ -213,6 +218,7 @@ public function removeroot()
{
// Save failed, go back to the screen and display a notice.
$this->setRedirect('index.php', Text::_('JERROR_SAVE_FAILED', $e->getMessage()), 'error');

return false;
}

Expand Down

0 comments on commit 46f2152

Please sign in to comment.