Skip to content

Commit

Permalink
Merge branch '4.2-dev' of https://github.com/joomla/joomla-cms into 4…
Browse files Browse the repository at this point in the history
….2-phpcs-phpversion

# Conflicts:
#	composer.lock
  • Loading branch information
Hackwar committed Aug 18, 2022
2 parents 6a12f1d + 1f99d81 commit ac3f767
Show file tree
Hide file tree
Showing 43 changed files with 373 additions and 404 deletions.
2 changes: 2 additions & 0 deletions administrator/components/com_admin/script.php
Expand Up @@ -7802,6 +7802,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
// From 4.2.0-beta2 to 4.2.0-beta3
'/plugins/system/webauthn/src/Helper',
'/plugins/system/webauthn/src/Exception',
// From 4.2.0 to 4.2.1
'/libraries/vendor/symfony/string/Resources/bin',
);

$status['files_checked'] = $files;
Expand Down
Expand Up @@ -12,9 +12,7 @@

use Exception;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Event\GenericEvent;
use Joomla\CMS\Event\MultiFactor\NotifyActionLog;
use Joomla\CMS\Event\MultiFactor\Validate;
use Joomla\CMS\Factory;
Expand All @@ -27,7 +25,6 @@
use Joomla\Component\Users\Administrator\Model\BackupcodesModel;
use Joomla\Component\Users\Administrator\Model\CaptiveModel;
use Joomla\Input\Input;
use ReflectionObject;
use RuntimeException;

/**
Expand Down
Expand Up @@ -12,7 +12,6 @@

use Exception;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Event\GenericEvent;
use Joomla\CMS\Event\MultiFactor\NotifyActionLog;
use Joomla\CMS\Event\MultiFactor\SaveSetup;
use Joomla\CMS\Factory;
Expand Down
Expand Up @@ -12,8 +12,6 @@

use Exception;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\GenericEvent;
use Joomla\CMS\Event\MultiFactor\NotifyActionLog;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
Expand All @@ -25,7 +23,6 @@
use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper;
use Joomla\Component\Users\Administrator\Model\MethodsModel;
use Joomla\Input\Input;
use ReflectionObject;
use RuntimeException;

/**
Expand Down
Expand Up @@ -11,7 +11,6 @@
namespace Joomla\Component\Users\Administrator\DataShape;

use InvalidArgumentException;
use Joomla\Database\ParameterType;

/**
* Data shape for Method Setup Render Options
Expand Down
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;

/**
* Users component helper.
Expand Down
9 changes: 4 additions & 5 deletions administrator/components/com_users/src/Model/MethodModel.php
Expand Up @@ -11,16 +11,15 @@
namespace Joomla\Component\Users\Administrator\Model;

use Exception;
use Joomla\CMS\Event\GenericEvent;
use Joomla\CMS\Event\MultiFactor\GetSetup;
use Joomla\CMS\Language\Text;
use Joomla\Component\Users\Administrator\DataShape\SetupRenderOptions;
use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper;
use Joomla\Component\Users\Administrator\Table\MfaTable;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\User\User;
use Joomla\CMS\User\UserFactoryInterface;
use Joomla\Component\Users\Administrator\DataShape\SetupRenderOptions;
use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper;
use Joomla\Component\Users\Administrator\Table\MfaTable;

/**
* Multi-factor Authentication management model
Expand Down
2 changes: 0 additions & 2 deletions administrator/components/com_users/src/Model/UserModel.php
Expand Up @@ -12,8 +12,6 @@

use Joomla\CMS\Access\Access;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Crypt\Crypt;
use Joomla\CMS\Encrypt\Aes;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Multilanguage;
Expand Down
2 changes: 0 additions & 2 deletions administrator/components/com_users/src/Model/UsersModel.php
Expand Up @@ -17,8 +17,6 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Users\Administrator\DataShape\MethodDescriptor;
use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Utilities\ArrayHelper;
Expand Down
Expand Up @@ -19,7 +19,6 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\BasicButton;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarFactoryInterface;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\User\UserFactoryInterface;
use Joomla\Component\Users\Administrator\Helper\Mfa as MfaHelper;
Expand Down
Expand Up @@ -11,7 +11,6 @@
namespace Joomla\Component\Users\Administrator\View\Debuggroup;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
Expand Down
Expand Up @@ -11,7 +11,6 @@
namespace Joomla\Component\Users\Administrator\View\Debuguser;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_users/tmpl/captive/select.php
Expand Up @@ -11,10 +11,10 @@
// Prevent direct access
defined('_JEXEC') or die;

use Joomla\Component\Users\Administrator\View\Captive\HtmlView;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Users\Administrator\View\Captive\HtmlView;

/** @var HtmlView $this */

Expand Down
Expand Up @@ -11,11 +11,11 @@
// Prevent direct access
defined('_JEXEC') or die;

use Joomla\Component\Users\Administrator\View\Method\HtmlView;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Users\Administrator\View\Method\HtmlView;

/** @var HtmlView $this */

Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_users/tmpl/user/edit.php
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Users\Administrator\Helper\UsersHelper;

/** @var Joomla\Component\Users\Administrator\View\User\HtmlView $this */

Expand Down
3 changes: 1 addition & 2 deletions administrator/components/com_users/tmpl/user/edit_groups.php
Expand Up @@ -12,5 +12,4 @@

use Joomla\CMS\HTML\HTMLHelper;

?>
<?php echo HTMLHelper::_('access.usergroups', 'jform[groups]', $this->groups, true);
echo HTMLHelper::_('access.usergroups', 'jform[groups]', $this->groups, true);
4 changes: 2 additions & 2 deletions administrator/language/en-GB/install.xml
Expand Up @@ -2,8 +2,8 @@
<extension client="administrator" type="language" method="upgrade">
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>4.2.0</version>
<creationDate>2022-07</creationDate>
<version>4.2.1</version>
<creationDate>2022-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/langmetadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<metafile client="administrator">
<name>English (en-GB)</name>
<version>4.2.0</version>
<creationDate>2022-07</creationDate>
<version>4.2.1</version>
<creationDate>2022-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/plg_multifactorauth_totp.ini
Expand Up @@ -7,7 +7,7 @@ PLG_MULTIFACTORAUTH_TOTP="Multi-factor Authentication - Verification Code"
PLG_MULTIFACTORAUTH_TOTP_CAPTIVE_PROMPT="Please open your authenticator application or password manager and copy the six digit code for this site in the text box below, then click on the Validate button. If this code has been automatically filled in for you just click on the Validate button."
PLG_MULTIFACTORAUTH_TOTP_ERR_VALIDATIONFAILED="You did not enter a valid verification code. Please check your authenticator app setup, and make sure that the time and time zone on your device is set correctly."
PLG_MULTIFACTORAUTH_TOTP_LBL_LABEL="Enter the six digit verification code"
PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_INSTRUCTIONS="Set up your verification code (also known as an “authenticator code”) using the information below. You can use an authenticator app (such Google Authenticator, Authy, LastPass Authenticator, etc), your favorite password manager (1Password, BitWarden, Keeper, KeePassXC, Strongbox, etc) or, in some cases, your browser."
PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_INSTRUCTIONS="Set up your verification code (also known as an “authenticator code”) using the information below. You can use an authenticator app (such Google Authenticator, Authy, LastPass Authenticator, etc), your favourite password manager (1Password, BitWarden, Keeper, KeePassXC, Strongbox, etc) or, in some cases, your browser."
PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_PLACEHOLDER="Six Digit Code"
PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_HEADING="Authenticator app setup"
PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_KEY="Enter this key"
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/files/joomla.xml
Expand Up @@ -6,8 +6,8 @@
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>4.2.0-rc2-dev</version>
<creationDate>2022-07</creationDate>
<version>4.2.1-dev</version>
<creationDate>2022-08</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

<scriptfile>administrator/components/com_admin/script.php</scriptfile>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/packages/pkg_en-GB.xml
Expand Up @@ -2,8 +2,8 @@
<extension type="package" method="upgrade">
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>4.2.0.1</version>
<creationDate>2022-07</creationDate>
<version>4.2.1.1</version>
<creationDate>2022-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions api/language/en-GB/install.xml
Expand Up @@ -2,8 +2,8 @@
<extension client="api" type="language" method="upgrade">
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>4.2.0</version>
<creationDate>2022-07</creationDate>
<version>4.2.1</version>
<creationDate>2022-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions api/language/en-GB/langmetadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<metafile client="api">
<name>English (en-GB)</name>
<version>4.2.0</version>
<creationDate>2022-07</creationDate>
<version>4.2.1</version>
<creationDate>2022-08</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
1 change: 1 addition & 0 deletions build/build.php
Expand Up @@ -170,6 +170,7 @@ function clean_checkout(string $dir)
system('rm -rf libraries/vendor/symfony/*/Resources/doc');
system('rm -rf libraries/vendor/symfony/*/Tests');
system('rm -rf libraries/vendor/symfony/console/Resources');
system('rm -rf libraries/vendor/symfony/string/Resources/bin');

// tobscure/json-api
system('rm -rf libraries/vendor/tobscure/json-api/tests');
Expand Down
49 changes: 27 additions & 22 deletions build/media_source/com_joomlaupdate/js/default.es6.js
Expand Up @@ -10,13 +10,14 @@ Joomla = window.Joomla || {};

Joomla.submitbuttonUpload = () => {
const form = document.getElementById('uploadForm');
const confirmBackup = document.getElementById('joomlaupdate-confirm-backup');

// do field validation
if (form.install_package.value === '') {
alert(Joomla.Text._('COM_INSTALLER_MSG_INSTALL_PLEASE_SELECT_A_PACKAGE'), true);
} else if (form.install_package.files[0].size > form.max_upload_size.value) {
alert(Joomla.Text._('COM_INSTALLER_MSG_WARNINGS_UPLOADFILETOOBIG'), true);
} else if (document.getElementById('joomlaupdate-confirm-backup').checked) {
} else if (confirmBackup && confirmBackup.checked) {
form.submit();
}
};
Expand Down Expand Up @@ -53,13 +54,15 @@ Joomla = window.Joomla || {};
const form = installButton ? installButton.closest('form') : null;
const task = form ? form.querySelector('[name=task]', form) : null;
if (uploadButton) {
uploadButton.disabled = !updateCheck.checked;
uploadButton.addEventListener('click', Joomla.submitbuttonUpload);
updateCheck.addEventListener('change', () => {
uploadButton.disabled = !updateCheck.checked;
});
uploadButton.disabled = updateCheck && !updateCheck.checked;
if (updateCheck) {
updateCheck.addEventListener('change', () => {
uploadButton.disabled = !updateCheck.checked;
});
}
}
if (confirmButton && !updateCheck.checked) {
if (confirmButton && updateCheck && !updateCheck.checked) {
confirmButton.classList.add('disabled');
}
if (confirmButton && updateCheck) {
Expand All @@ -73,22 +76,24 @@ Joomla = window.Joomla || {};
}
if (uploadField) {
uploadField.addEventListener('change', Joomla.installpackageChange);
uploadField.addEventListener('change', () => {
const fileSize = uploadForm.install_package.files[0].size;
const allowedSize = uploadForm.max_upload_size.value;
if (fileSize <= allowedSize && updateCheck.disabled) {
updateCheck.disabled = !updateCheck.disabled;
} else if (fileSize <= allowedSize && !updateCheck.disabled && !updateCheck.checked) {
updateCheck.disabled = false;
} else if (fileSize <= allowedSize && updateCheck.checked) {
updateCheck.checked = updateCheck.classList.contains('d-none');
uploadButton.disabled = true;
} else if (fileSize > allowedSize && !updateCheck.disabled) {
updateCheck.disabled = !updateCheck.disabled;
updateCheck.checked = updateCheck.classList.contains('d-none');
uploadButton.disabled = true;
}
});
if (updateCheck) {
uploadField.addEventListener('change', () => {
const fileSize = uploadForm.install_package.files[0].size;
const allowedSize = uploadForm.max_upload_size.value;
if (fileSize <= allowedSize && updateCheck.disabled) {
updateCheck.disabled = !updateCheck.disabled;
} else if (fileSize <= allowedSize && !updateCheck.disabled && !updateCheck.checked) {
updateCheck.disabled = false;
} else if (fileSize <= allowedSize && updateCheck.checked) {
updateCheck.checked = updateCheck.classList.contains('d-none');
uploadButton.disabled = true;
} else if (fileSize > allowedSize && !updateCheck.disabled) {
updateCheck.disabled = !updateCheck.disabled;
updateCheck.checked = updateCheck.classList.contains('d-none');
uploadButton.disabled = true;
}
});
}
}
// Trigger (re-) install (including checkbox confirm if we update)
if (installButton && installButton.getAttribute('href') === '#' && task) {
Expand Down
4 changes: 2 additions & 2 deletions components/com_finder/src/Helper/FinderHelper.php
Expand Up @@ -47,8 +47,8 @@ public static function logSearch(Query $searchquery, $resultCount = 0)
$query = $db->getQuery(true);

// Sanitise the term for the database
$temp = unserialize(serialize($searchquery));
$temp->input = trim(strtolower($searchquery->input));
$temp = new \stdClass();
$temp->input = trim(strtolower((string) $searchquery->input));
$entry = new \stdClass();
$entry->searchterm = $temp->input;
$entry->query = serialize($temp);
Expand Down
5 changes: 3 additions & 2 deletions components/com_users/src/Controller/UserController.php
Expand Up @@ -48,10 +48,11 @@ public function login()

// Check for a simple menu item id
if (is_numeric($data['return'])) {
$data['return'] = 'index.php?Itemid=' . $data['return'];
$itemId = (int) $data['return'];
$data['return'] = 'index.php?Itemid=' . $itemId;

if (Multilanguage::isEnabled()) {
$language = $this->getModel('Login', 'Site')->getMenuLanguage($data['return']);
$language = $this->getModel('Login', 'Site')->getMenuLanguage($itemId);

if ($language !== '*') {
$data['return'] .= '&lang=' . $language;
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -96,7 +96,8 @@
"dragonmantank/cron-expression": "^3.1",
"enshrined/svg-sanitize": "^0.15.4",
"lcobucci/jwt": "^3.4.6",
"web-token/signature-pack": "^2.2.11"
"web-token/signature-pack": "^2.2.11",
"phpseclib/bcmath_compat": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
Expand Down

0 comments on commit ac3f767

Please sign in to comment.