Skip to content

Commit

Permalink
Merge branch '4.2-dev' into 4.2-finder-customfields
Browse files Browse the repository at this point in the history
  • Loading branch information
roland-d committed May 20, 2022
2 parents 92b39ea + 3eba8c7 commit 028c227
Show file tree
Hide file tree
Showing 153 changed files with 2,156 additions and 359 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Expand Up @@ -24,7 +24,7 @@ steps:
- echo $(date)

- name: npm
image: node:14-alpine
image: node:16-alpine
depends_on: [ phpcs ]
commands:
- npm ci --unsafe-perm
Expand Down Expand Up @@ -420,6 +420,6 @@ steps:

---
kind: signature
hmac: adfaa112f82d0487b292e9b22400b04abfbf56eb44516bc764abc1804a6f472b
hmac: 24b9cf86c8dcb5efc6b7c0dfc7bd774410f81907d228eb63931224449953d9fe

...
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@ Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.1-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.1-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V12.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v6.13.4-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.1-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.1-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V16.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v8.6.0-green)](https://nodejs.org/en/) |

Overview
---------------------
Expand Down
6 changes: 2 additions & 4 deletions administrator/components/com_admin/script.php
Expand Up @@ -6387,6 +6387,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/administrator/components/com_users/src/Field/PrimaryauthprovidersField.php',
// From 4.1.2 to 4.1.3
'/libraries/vendor/webmozart/assert/.php_cs',
// From 4.1 to 4.2.0
'/libraries/src/Service/Provider/ApiRouter.php',
);

$folders = array(
Expand Down Expand Up @@ -7720,10 +7722,6 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/vendor/tobscure/json-api/.git/hooks',
'/libraries/vendor/tobscure/json-api/.git/branches',
'/libraries/vendor/tobscure/json-api/.git',
// From 4.1.1 to 4.1.2
'/administrator/components/com_users/src/Field/PrimaryauthprovidersField.php',
// From 4.1.1 to 4.2.0
'/libraries/src/Service/Provider/ApiRouter.php'
);

$status['files_checked'] = $files;
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_config/forms/application.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<config>
<inlinehelp button="show"/>
</config>
<fieldset
name="cache"
label="COM_CONFIG_CACHE_SETTINGS_LABEL">
Expand Down
Expand Up @@ -228,6 +228,9 @@
echo (new TransitionButton($options))
->render(0, $i);
?>
<div class="small">
<?php echo Text::_($item->stage_title); ?>
</div>
</td>
<?php endif; ?>
<td class="text-center d-none d-md-table-cell">
Expand Down
Expand Up @@ -232,6 +232,9 @@
echo (new TransitionButton($options))
->render(0, $i);
?>
<div class="small">
<?php echo Text::_($item->stage_title); ?>
</div>
</td>
<?php endif; ?>
<td class="text-center d-none d-md-table-cell">
Expand Down
9 changes: 9 additions & 0 deletions administrator/components/com_menus/presets/alternate.xml
Expand Up @@ -348,6 +348,7 @@
class="class:component"
permission="core.manage;com_joomlaupdate"
/>

<menuitem
title="COM_POSTINSTALL"
type="component"
Expand All @@ -363,6 +364,14 @@
link="index.php?option=com_redirect&amp;view=links"
permission="core.manage;com_redirect"
/>

<menuitem
title="MOD_MENU_MANAGE_SCHEDULED_TASKS"
type="component"
element="com_scheduler"
link="index.php?option=com_scheduler&amp;view=tasks"
permission="core.manage;com_scheduler"
/>
</menuitem>

<menuitem
Expand Down
25 changes: 18 additions & 7 deletions administrator/components/com_menus/src/Model/ItemModel.php
Expand Up @@ -1433,8 +1433,8 @@ public function rebuild()
*/
public function save($data)
{
$pk = isset($data['id']) ? $data['id'] : (int) $this->getState('item.id');
$isNew = true;
$pk = isset($data['id']) ? $data['id'] : (int) $this->getState('item.id');
$isNew = true;
$db = $this->getDbo();
$query = $db->getQuery(true);
$table = $this->getTable();
Expand Down Expand Up @@ -1512,13 +1512,24 @@ public function save($data)
return false;
}

// Alter the title & alias for save as copy. Also, unset the home record.
if (!$isNew && $data['id'] == 0)
// Alter the title & alias for save2copy when required. Also, unset the home record.
if (Factory::getApplication()->input->get('task') === 'save2copy' && $data['id'] === 0)
{
list($title, $alias) = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
$origTable = $this->getTable();
$origTable->load($this->getState('item.id'));

if ($table->title === $origTable->title)
{
list($title, $alias) = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
$table->title = $title;
$table->alias = $alias;
}

if ($table->alias === $origTable->alias)
{
$table->alias = '';
}

$table->title = $title;
$table->alias = $alias;
$table->published = 0;
$table->home = 0;
}
Expand Down
Expand Up @@ -45,7 +45,7 @@
type="list"
label="JGLOBAL_SORT_BY"
onchange="this.form.submit();"
default="a.title DESC"
default="a.title ASC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
Expand Down
Expand Up @@ -351,7 +351,7 @@ static function (TaskOption $taskOption): string
if (!$multiOrdering || !\is_array($multiOrdering))
{
$orderCol = $this->state->get('list.ordering', 'a.title');
$orderDir = $this->state->get('list.direction', 'desc');
$orderDir = $this->state->get('list.direction', 'asc');

// Type title ordering is handled exceptionally in _getList()
if ($orderCol !== 'j.type_title')
Expand Down Expand Up @@ -390,10 +390,9 @@ static function (TaskOption $taskOption): string
*/
protected function _getList($query, $limitstart = 0, $limit = 0): array
{

// Get stuff from the model state
$listOrder = $this->getState('list.ordering', 'a.title');
$listDirectionN = strtolower($this->getState('list.direction', 'desc')) == 'desc' ? -1 : 1;
$listDirectionN = strtolower($this->getState('list.direction', 'asc')) == 'desc' ? -1 : 1;

// Set limit parameters and get object list
$query->setLimit($limit, $limitstart);
Expand Down Expand Up @@ -465,7 +464,7 @@ private function attachTaskOptions(array $items): void
* @return void
* @since 4.1.0
*/
protected function populateState($ordering = 'a.id', $direction = 'ASC'): void
protected function populateState($ordering = 'a.title', $direction = 'ASC'): void
{
// Call the parent method
parent::populateState($ordering, $direction);
Expand Down
204 changes: 123 additions & 81 deletions administrator/components/com_users/tmpl/debuguser/default.php
Expand Up @@ -16,95 +16,137 @@

$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));

$loginActions = [];
$actions = [];

// Split the actions table
foreach ($this->actions as $action) :
$name = $action[0];
if (in_array($name, ['core.login.site', 'core.login.admin', 'core.login.offline', 'core.login.api', 'core.admin'])) :
$loginActions[] = $action;
else :
$actions[] = $action;
endif;
endforeach;
?>
<form action="<?php echo Route::_('index.php?option=com_users&view=debuguser&user_id=' . (int) $this->state->get('user_id')); ?>" method="post" name="adminForm" id="adminForm">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<div class="table-responsive">
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_USERS_DEBUG_USER_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_ASSET_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_ASSET_NAME', 'a.name', $listDirn, $listOrder); ?>
</th>
<?php foreach ($this->actions as $key => $action) : ?>
<th scope="col" class="w-6 text-center">
<?php echo Text::_($key); ?>
</th>
<?php endforeach; ?>
<th scope="col" class="w-6">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_LFT', 'a.lft', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-3">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row0" scope="row">
<td>
<?php echo $this->escape(Text::_($item->title)); ?>
</td>
<td>
<?php echo LayoutHelper::render('joomla.html.treeprefix', array('level' => $item->level + 1)) . $this->escape($item->name); ?>
</td>
<?php foreach ($this->actions as $action) : ?>
<?php
$name = $action[0];
$check = $item->checks[$name];
if ($check === true) :
$class = 'text-success icon-check';
$button = 'btn-success';
$text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
elseif ($check === false) :
$class = 'text-danger icon-times';
$button = 'btn-danger';
$text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
elseif ($check === null) :
$class = 'text-danger icon-minus-circle';
$button = 'btn-warning';
$text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
else :
$class = '';
$button = '';
$text = '';
endif;
?>
<td class="text-center">
<span class="<?php echo $class; ?>" aria-hidden="true"></span>
<span class="visually-hidden"> <?php echo $text; ?></span>
</td>
<?php endforeach; ?>
<td>
<?php echo (int) $item->lft; ?>
- <?php echo (int) $item->rgt; ?>
</td>
<td>
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="legend">
<span class="text-danger icon-minus-circle" aria-hidden="true"></span>&nbsp;<?php echo Text::_('COM_USERS_DEBUG_IMPLICIT_DENY'); ?>&nbsp;
<span class="text-success icon-check" aria-hidden="true"></span>&nbsp;<?php echo Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW'); ?>&nbsp;
<span class="text-danger icon-times" aria-hidden="true">&nbsp;</span><?php echo Text::_('COM_USERS_DEBUG_EXPLICIT_DENY'); ?>
<div class="d-flex flex-wrap">
<?php foreach ($loginActions as $action) :
$name = $action[0];
$check = $this->items[0]->checks[$name];
if ($check === true) :
$class = 'text-success icon-check';
$button = 'btn-success';
$text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
elseif ($check === false) :
$class = 'text-danger icon-times';
$button = 'btn-danger';
$text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
elseif ($check === null) :
$class = 'text-danger icon-minus-circle';
$button = 'btn-warning';
$text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
else :
$class = '';
$button = '';
$text = '';
endif;
?>
<div class=" d-inline p-2">
<?php echo Text::_($action[1]); ?>
<span class="<?php echo $class; ?>" aria-hidden="true"></span>
<span class="visually-hidden"><?php echo Text::_($text); ?></span>
</div>
<?php endforeach; ?>
</div>

<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<table class="table">
<caption class="visually-hidden">
<?php echo Text::_('COM_USERS_DEBUG_USER_TABLE_CAPTION'); ?>,
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
</caption>
<thead>
<tr>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_ASSET_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_ASSET_NAME', 'a.name', $listDirn, $listOrder); ?>
</th>
<?php foreach ($actions as $key => $action) : ?>
<th scope="col" class="w-6 text-center">
<?php echo Text::_($action[1]); ?>
</th>
<?php endforeach; ?>
<th scope="col" class="w-6">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_USERS_HEADING_LFT', 'a.lft', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-3">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item) :?>
<tr class="row0" scope="row">
<td>
<?php echo $this->escape(Text::_($item->title)); ?>
</td>
<td>
<?php echo LayoutHelper::render('joomla.html.treeprefix', array('level' => $item->level + 1)) . $this->escape($item->name); ?>
</td>
<?php foreach ($actions as $action) : ?>
<?php
$name = $action[0];
$check = $item->checks[$name];
if ($check === true) :
$class = 'text-success icon-check';
$button = 'btn-success';
$text = Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW');
elseif ($check === false) :
$class = 'text-danger icon-times';
$button = 'btn-danger';
$text = Text::_('COM_USERS_DEBUG_EXPLICIT_DENY');
elseif ($check === null) :
$class = 'text-danger icon-minus-circle';
$button = 'btn-warning';
$text = Text::_('COM_USERS_DEBUG_IMPLICIT_DENY');
else :
$class = '';
$button = '';
$text = '';
endif;
?>
<td class="text-center">
<span class="<?php echo $class; ?>" aria-hidden="true"></span>
<span class="visually-hidden"> <?php echo $text; ?></span>
</td>
<?php endforeach; ?>
<td>
<?php echo (int) $item->lft; ?>
- <?php echo (int) $item->rgt; ?>
</td>
<td>
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>

<div class="legend">
<span class="text-danger icon-minus-circle" aria-hidden="true"></span>&nbsp;<?php echo Text::_('COM_USERS_DEBUG_IMPLICIT_DENY'); ?>&nbsp;
<span class="text-success icon-check" aria-hidden="true"></span>&nbsp;<?php echo Text::_('COM_USERS_DEBUG_EXPLICIT_ALLOW'); ?>&nbsp;
<span class="text-danger icon-times" aria-hidden="true">&nbsp;</span><?php echo Text::_('COM_USERS_DEBUG_EXPLICIT_DENY'); ?>
</div>

<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>

<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<?php echo HTMLHelper::_('form.token'); ?>
Expand Down

0 comments on commit 028c227

Please sign in to comment.