Skip to content

Commit

Permalink
Merge branch '4.4-dev' into 4.4-composerdeps-dec23
Browse files Browse the repository at this point in the history
  • Loading branch information
MacJoom committed Feb 19, 2024
2 parents a518908 + 0aba9c8 commit 1a2c12e
Show file tree
Hide file tree
Showing 62 changed files with 444 additions and 166 deletions.
33 changes: 27 additions & 6 deletions .drone.yml
Expand Up @@ -6,15 +6,15 @@ clone:

steps:
- name: setup
image: joomlaprojects/docker-images:php8.2
image: joomlaprojects/docker-images:php8.3
volumes:
- name: certificates
path: /certificates
commands:
- cp -v tests/certs/* /certificates/

- name: composer
image: joomlaprojects/docker-images:php8.2
image: joomlaprojects/docker-images:php8.3
volumes:
- name: composer-cache
path: /tmp/composer-cache
Expand Down Expand Up @@ -91,6 +91,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php83-unit
depends_on: [ phpcs ]
image: joomlaprojects/docker-images:php8.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit

- name: php72-integration
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
Expand Down Expand Up @@ -133,6 +140,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration

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

- name: php72-integration-pgsql
depends_on: [ npm ]
image: joomlaprojects/docker-images:php7.2
Expand Down Expand Up @@ -175,6 +189,13 @@ steps:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist

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

- name: scss-cs
depends_on: [ npm ]
image: node:current-alpine
Expand Down Expand Up @@ -230,7 +251,7 @@ steps:
depends_on:
- phpmin-system-mysql
- phpmin-system-postgres
image: joomlaprojects/docker-images:cypress8.1
image: joomlaprojects/docker-images:cypress8.3
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
Expand All @@ -243,7 +264,7 @@ steps:
depends_on:
- phpmin-system-mysql
- phpmin-system-postgres
image: joomlaprojects/docker-images:cypress8.1
image: joomlaprojects/docker-images:cypress8.3
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
Expand All @@ -269,7 +290,7 @@ steps:
depends_on:
- phpmax-system-mysql
- phpmax-system-postgres
image: joomlaprojects/docker-images:cypress8.1
image: joomlaprojects/docker-images:cypress8.3
volumes:
- name: cypress-cache
path: /root/.cache/Cypress
Expand Down Expand Up @@ -471,6 +492,6 @@ trigger:

---
kind: signature
hmac: 668e2a3bfab925caf4bc0062eaf622d2527f3b8d805e21b663ff1dd89897a431
hmac: 2b23d4286790b54215c985c85304ddd24818802bab49b3afec2144d28dce1f5f

...
49 changes: 0 additions & 49 deletions .github/workflows/cacert-update.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/create-translation-pull-request-v4.yml
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Fetch latest cms changes
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.3-dev
git merge upstream/4.4-dev
- name: Fetch and extract translations
run: |
Expand Down Expand Up @@ -73,5 +73,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.3-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[4.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.4-dev
Expand Up @@ -324,6 +324,12 @@ public static function loadActionLogPluginsLanguage()
// Load plg_system_actionlogs too
$lang->load('plg_system_actionlogs', JPATH_ADMINISTRATOR);

// Load plg_system_privacyconsent too
$lang->load('plg_system_privacyconsent', JPATH_ADMINISTRATOR);

// Load plg_user_terms too
$lang->load('plg_user_terms', JPATH_ADMINISTRATOR);

// Load com_privacy too.
$lang->load('com_privacy', JPATH_ADMINISTRATOR);
}
Expand Down
Expand Up @@ -100,7 +100,7 @@
<?php endif; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo htmlspecialchars($item->editor); ?>
<?php echo empty($item->editor) ? $item->editor_user_id : htmlspecialchars($item->editor); ?>
</td>
<td class="text-end">
<?php echo number_format((int) $item->character_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?>
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_fields/src/Helper/FieldsHelper.php
Expand Up @@ -92,11 +92,11 @@ public static function extract($contextString, $item = null)
* The values of the fields can be overridden by an associative array where the keys
* have to be a name and its corresponding value.
*
* @param string $context The context of the content passed to the helper
* @param null $item The item being edited in the form
* @param int|bool $prepareValue (if int is display event): 1 - AfterTitle, 2 - BeforeDisplay, 3 - AfterDisplay, 0 - OFF
* @param array|null $valuesToOverride The values to override
* @param bool $includeSubformFields Should I include fields marked as Only Use In Subform?
* @param string $context The context of the content passed to the helper
* @param object|array|null $item The item being edited in the form
* @param int|bool $prepareValue (if int is display event): 1 - AfterTitle, 2 - BeforeDisplay, 3 - AfterDisplay, 0 - OFF
* @param array|null $valuesToOverride The values to override
* @param bool $includeSubformFields Should I include fields marked as Only Use In Subform?
*
* @return array
*
Expand Down
Expand Up @@ -58,8 +58,9 @@ public static function branchSingular($branchName)
{
$return = preg_replace('/[^a-zA-Z0-9]+/', '_', strtoupper($branchName));
$language = Factory::getApplication()->getLanguage();
$debug = Factory::getApplication()->get('debug_lang');

if ($language->hasKey('PLG_FINDER_QUERY_FILTER_BRANCH_S_' . $return) || JDEBUG) {
if ($language->hasKey('PLG_FINDER_QUERY_FILTER_BRANCH_S_' . $return) || $debug) {
return 'PLG_FINDER_QUERY_FILTER_BRANCH_S_' . $return;
}

Expand Down
Expand Up @@ -19,7 +19,8 @@
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns')
->useScript('multiselect');
->useScript('multiselect')
->useScript('webcomponent.core-loader');

$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
Expand Down Expand Up @@ -72,7 +73,7 @@
<td>
<?php $buttonText = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'REINSTALL' : 'INSTALL'; ?>
<?php $buttonClass = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'btn btn-success btn-sm' : 'btn btn-primary btn-sm'; ?>
<?php $onclick = 'document.getElementById(\'install_url\').value = \'' . $language->detailsurl . '\'; Joomla.submitbutton(\'install.install\');'; ?>
<?php $onclick = 'document.getElementById(\'install_url\').value = \'' . $language->detailsurl . '\'; Joomla.submitbutton(\'install.install\'); document.body.appendChild(document.createElement(\'joomla-core-loader\'));'; ?>
<input type="button"
class="<?php echo $buttonClass; ?>"
value="<?php echo Text::_('COM_INSTALLER_' . $buttonText . '_BUTTON'); ?>"
Expand Down
Expand Up @@ -893,7 +893,10 @@ public function cleanUp()
$tempdir = $app->get('tmp_path');

$file = $app->getUserState('com_joomlaupdate.file', null);
File::delete($tempdir . '/' . $file);

if (is_file($tempdir . '/' . $file)) {
File::delete($tempdir . '/' . $file);
}

// Remove the update.php file used in Joomla 4.0.3 and later.
if (is_file(JPATH_COMPONENT_ADMINISTRATOR . '/update.php')) {
Expand Down
Expand Up @@ -119,6 +119,15 @@ class HtmlView extends BaseHtmlView
*/
protected $reasonNoDownload = '';

/**
* Details on failed PHP or DB version requirements to be shown in the emptystate layout when there is no download
*
* @var \stdClass PHP and database requirements from the update manifest
*
* @since 4.4.2
*/
protected $detailsNoDownload;

/**
* List of non core critical plugins
*
Expand Down Expand Up @@ -199,8 +208,9 @@ public function display($tpl = null)
} else {
// No download available
if ($hasUpdate) {
$this->messagePrefix = '_NODOWNLOAD';
$this->reasonNoDownload = 'COM_JOOMLAUPDATE_NODOWNLOAD_EMPTYSTATE_REASON';
$this->messagePrefix = '_NODOWNLOAD';
$this->reasonNoDownload = 'COM_JOOMLAUPDATE_NODOWNLOAD_EMPTYSTATE_REASON';
$this->detailsNoDownload = $this->updateInfo['object']->get('otherUpdateInfo');
}

$this->setLayout('noupdate');
Expand Down
Expand Up @@ -16,11 +16,35 @@
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Session\Session;

$uploadLink = 'index.php?option=com_joomlaupdate&view=upload';
$uploadLink = 'index.php?option=com_joomlaupdate&view=upload';
$reasonNoDownload = '';

if (!empty($this->reasonNoDownload)) {
$reasonNoDownload = Text::_($this->reasonNoDownload) . '<br>';

if (isset($this->detailsNoDownload->php)) {
$reasonNoDownload .= Text::sprintf(
'COM_JOOMLAUPDATE_NODOWNLOAD_EMPTYSTATE_REASON_PHP',
$this->detailsNoDownload->php->used,
$this->detailsNoDownload->php->required
) . '<br>';
}

if (isset($this->detailsNoDownload->db)) {
$reasonNoDownload .= Text::sprintf(
'COM_JOOMLAUPDATE_NODOWNLOAD_EMPTYSTATE_REASON_DATABASE',
Text::_('JLIB_DB_SERVER_TYPE_' . $this->detailsNoDownload->db->type),
$this->detailsNoDownload->db->used,
$this->detailsNoDownload->db->required
) . '<br>';
}

$reasonNoDownload .= Text::_('COM_JOOMLAUPDATE_NODOWNLOAD_EMPTYSTATE_REASON_ACTION') . '<br>';
}

$displayData = [
'textPrefix' => 'COM_JOOMLAUPDATE' . $this->messagePrefix,
'content' => Text::_($this->reasonNoDownload) . Text::sprintf($this->langKey, $this->updateSourceKey),
'content' => $reasonNoDownload . Text::sprintf($this->langKey, $this->updateSourceKey),
'formURL' => 'index.php?option=com_joomlaupdate&view=joomlaupdate',
'helpURL' => 'https://docs.joomla.org/Special:MyLanguage/Updating_from_an_existing_version',
'icon' => 'icon-loop joomlaupdate',
Expand Down
Expand Up @@ -47,7 +47,7 @@ class DisplayController extends BaseController
public function display($cachable = false, $urlparams = false)
{
// Verify menu
$menuType = $this->input->post->getCmd('menutype', '');
$menuType = $this->input->post->getString('menutype', '');

if ($menuType !== '') {
$uri = Uri::getInstance();
Expand Down
Expand Up @@ -879,8 +879,8 @@ public function &getSource()
$fileName = str_replace('//', '/', $fileName);
$isMedia = $input->getInt('isMedia', 0);

$fileName = $isMedia ? Path::clean(JPATH_ROOT . '/media/templates/' . ($this->template->client_id === 0 ? 'site' : 'administrator') . '/' . $this->template->element . $fileName)
: Path::clean(JPATH_ROOT . ($this->template->client_id === 0 ? '' : '/administrator') . '/templates/' . $this->template->element . $fileName);
$fileName = $isMedia ? Path::clean(JPATH_ROOT . '/media/templates/' . ((int) $this->template->client_id === 0 ? 'site' : 'administrator') . '/' . $this->template->element . $fileName)
: Path::clean(JPATH_ROOT . ((int) $this->template->client_id === 0 ? '' : '/administrator') . '/templates/' . $this->template->element . $fileName);

try {
$filePath = Path::check($fileName);
Expand Down
Expand Up @@ -60,7 +60,7 @@
<div class="row mt-2">
<div class="col-md-8" id="conditional-section">
<?php if ($this->type == 'file') : ?>
<p class="lead"><?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', '&#x200E;' . ($input->get('isMedia', 0) ? '/media/templates/' . ($this->template->client_id === 0 ? 'site' : 'administrator') . '/' . $this->template->element . str_replace('//', '/', base64_decode($this->file)) : '/' . ($this->template->client_id === 0 ? '' : 'administrator/') . 'templates/' . $this->template->element . str_replace('//', '/', base64_decode($this->file))), $this->template->element); ?></p>
<p class="lead"><?php echo Text::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', '&#x200E;' . ($input->get('isMedia', 0) ? '/media/templates/' . ((int) $this->template->client_id === 0 ? 'site' : 'administrator') . '/' . $this->template->element . str_replace('//', '/', base64_decode($this->file)) : '/' . ((int) $this->template->client_id === 0 ? '' : 'administrator/') . 'templates/' . $this->template->element . str_replace('//', '/', base64_decode($this->file))), $this->template->element); ?></p>
<p class="lead path hidden"><?php echo $this->source->filename; ?></p>
<?php endif; ?>
<?php if ($this->type == 'image') : ?>
Expand Down Expand Up @@ -88,7 +88,7 @@
<li class="folder-select">
<a class="folder-url" data-id="" href="">
<span class="icon-folder icon-fw" aria-hidden="true"></span>
<?php echo ($this->template->client_id === 0 ? '/' : '/administrator/') . 'templates/' . $this->template->element; ?>
<?php echo ((int) $this->template->client_id === 0 ? '/' : '/administrator/') . 'templates/' . $this->template->element; ?>
</a>
<?php echo $this->loadTemplate('tree'); ?>
</li>
Expand All @@ -98,7 +98,7 @@
<li class="folder-select">
<a class="folder-url" data-id="" href="">
<span class="icon-folder icon-fw" aria-hidden="true"></span>
<?php echo '/media/templates/' . ($this->template->client_id === 0 ? 'site/' : 'administrator/') . $this->template->element; ?>
<?php echo '/media/templates/' . ((int) $this->template->client_id === 0 ? 'site/' : 'administrator/') . $this->template->element; ?>
</a>
<?php echo $this->loadTemplate('tree_media'); ?>
</li>
Expand Down
14 changes: 8 additions & 6 deletions administrator/components/com_users/tmpl/users/default.php
Expand Up @@ -147,14 +147,17 @@
<?php endif; ?>
</td>
<td class="text-center d-md-table-cell">
<?php
$activated = empty($item->activation) ? 0 : 1;
echo HTMLHelper::_('jgrid.state', HTMLHelper::_('users.activateStates'), $activated, $i, 'users.', (bool) $activated);
?>
<?php if (empty($item->activation)) : ?>
<span class="icon-check" aria-hidden="true" aria-describedby="tip-activated<?php echo $i; ?>"></span>
<div role="tooltip" id="tip-activated<?php echo $i; ?>">
<?php echo Text::_('COM_USERS_ACTIVATED'); ?>
</div>
<?php else : ?>
<?php echo HTMLHelper::_('jgrid.state', HTMLHelper::_('users.activateStates'), 1, $i, 'users.', true); ?>
<?php endif; ?>
</td>
<?php if ($mfa) : ?>
<td class="text-center d-none d-md-table-cell">
<span class="tbody-icon">
<?php if ($item->mfaRecords > 0 || !empty($item->otpKey)) : ?>
<span class="icon-check" aria-hidden="true" aria-describedby="tip-mfa<?php echo $i; ?>"></span>
<div role="tooltip" id="tip-mfa<?php echo $i; ?>">
Expand All @@ -166,7 +169,6 @@
<?php echo Text::_('COM_USERS_MFA_NOTACTIVE'); ?>
</div>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<td class="d-none d-md-table-cell">
Expand Down

0 comments on commit 1a2c12e

Please sign in to comment.