Skip to content

Commit

Permalink
Merge branch '5.2-dev' into pr/43323
Browse files Browse the repository at this point in the history
  • Loading branch information
heelc29 committed Jun 30, 2024
2 parents 673d5ef + cd3085d commit 02fe995
Show file tree
Hide file tree
Showing 189 changed files with 4,904 additions and 806 deletions.
9 changes: 3 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ build/bump.php @rdeutz
build/deleted_file_check.php @rdeutz

# Core/Extension Install/Update Tools
administrator/components/com_joomlaupdate/* @rdeutz @zero-24
libraries/src/Installer/* @rdeutz @zero-24
libraries/src/Updater/* @rdeutz @zero-24
administrator/components/com_joomlaupdate/* @rdeutz
libraries/src/Installer/* @rdeutz
libraries/src/Updater/* @rdeutz

# Automated Testing
tests/* @hackwar @fancyFranci
Expand All @@ -24,9 +24,6 @@ tests/Unit/* @rdeutz @fancyFranci
phpunit.xml.dist @rdeutz @hackwar @fancyFranci
phpunit-pgsql.xml.dist @rdeutz @hackwar @fancyFranci

# HttpHeaders Plugin
plugins/system/httpheaders/* @zero-24

# Workflow
administrator/components/com_workflow/* @bembelimen @hleithner
administrator/language/en-GB/com_workflow.ini @bembelimen @hleithner
Expand Down
28 changes: 15 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
Contributing to the Joomla! CMS™
===============
You are welcome to submit a contribution for review and possible inclusion in the Joomla! CMS but, before it will be accepted, we ask that you follow these simple steps:
You are welcome to submit a contribution for review and possible inclusion in the Joomla! CMS but, before it will be accepted, we ask that you follow these simple guidelines:

1) Open an issue on our [Issue Tracker](https://issues.joomla.org/) or here on GitHub. If you can, please provide a fix and create a pull request (PR) instead; this will automatically create an issue for you so you do not have to create an issue if you are creating a pull request.
* If you have a feature request, then please open a discussion to define the feature request and discuss possible solutions. Discussions can be converted into issues when the request is defined sufficiently that a developer can start coding the feature. In this process you will get feedback from the maintainers, if the feature is something for the Joomla core distribution or not.

2) Follow the [Joomla! Coding Standards](https://developer.joomla.org/coding-standards.html).
* If you have found a bug, open an issue on our [Issue Tracker](https://issues.joomla.org/) or here on GitHub. If you can, please provide a fix and create a pull request (PR) instead; this will automatically create an issue for you so you do not have to create an issue, if you are creating a pull request.

3) When filing an issue or opening a PR, please include a clear title and description. The title should be a short summary of an issue and, if possible, should include a reference to an open issue. For example, `Invalid Query in com_admin (Ref #1234)` would be sufficient. All issues and PRs should include a description with as much detail as possible.
If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission.
* Follow the [Joomla! Coding Standards](https://manual.joomla.org/docs/get-started/codestyle) for code contributions.

4) Report security issues to the Joomla! Security Strike Team (JSST) at [email protected] or use the [JSST contact form](https://developer.joomla.org/contact-security-team.html). Please do not use the public tracker for security issues.
* When filing an issue or opening a Pull Request(PR), please include a clear title and description. The title should be a short summary of the issue. For example, `Invalid Query in com_admin`. All issues and PRs should include a description with as much detail as possible. If it is a PR, include what the issue is, what the PR is addressing, testing instructions and environmental information (PHP version, database driver and version, and other data you can retrieve from your site's system information view) in case the issue is specific to certain environments. If additional information is needed, please be prepared to provide it as our community members review your submission.

Please be patient as not all items will be tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.
* Report security issues to the Joomla! Security Strike Team (JSST) at [email protected] or use the [JSST contact form](https://developer.joomla.org/contact-security-team.html). Please do not use the public tracker for security issues. Find [here](https://github.com/joomla/joomla-cms?tab=security-ov-file#readme) more information about the [Security Policies and Procedures](https://github.com/joomla/joomla-cms?tab=security-ov-file#readme).

Please be patient as not all items will be viewed or tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.

#### Branches
PRs should usually be made to the `4.3-dev` branch as this contains the most recent version of the code.
There are other branches available which serve specific purposes.
While 4.4 is in maintenance mode, ie we are still fixing bugs, PRs should be made to the `4.4-dev` branch. Merged bugfixes will be upmerged into the current 5.x branch. If a bug is only in the 5.x series the PR should be made to the current 5.x branch (currently 5.1).


| Branch | Purpose |
| ------ | ------- |
| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will now only include security patches. |
| 4.3-dev | Branch for the current minor Joomla version.|
| 4.4-dev | Branch for the next minor Joomla version. Commits to 4.3-dev will be applied to this branch as well. |
| 5.0-dev | Branch for the next major Joomla version. New features go into this branch. |
| 4.4-dev | Branch for the current 4.x Joomla version. Currently in maintenance mode |
| 5.1-dev | Branch for the current 5.x Joomla version. Bugfix only for 5.x go into this branch. |
| 5.2-dev | Branch for the next minor 5.x Joomla version. New features go into this branch. |
| 6.0-dev | Branch for the next major Joomla version. New features that include a b/c break have to go into this branch. |

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Overview
What is Joomla?
---------------------
* [Joomla!](https://www.joomla.org/about-joomla.html) is a **Content Management System** (CMS) which enables you to build websites and powerful online applications.
* It is a simple and powerful web server application which requires a server with PHP and either MySQL or PostgreSQL to run. You can find [full technical requirements here](https://downloads.joomla.org/technical-requirements).
* It is a simple and powerful web server application which requires a server with PHP and either MySQL, MariaDB or PostgreSQL to run. You can find [full technical requirements here](https://downloads.joomla.org/technical-requirements).
* Joomla! is **free and Open Source software** distributed under the GNU General Public License version 2 or later.

Looking for an installable package?
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Joomla! 5.2 branch is under heavy development and not all links in this docu
2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications.
* It's a free and Open Source software, distributed under the GNU General Public License version 2 or later.
* This is a simple and powerful web server application and it requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run.
* This is a simple and powerful web server application and it requires a server with PHP and either MySQL, MariaDB or PostgreSQL to run.
You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.

3- Is Joomla! for you?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ public static function getLogContentTypeParams($context)
*/
public static function getHumanReadableLogMessage($log, $generateLinks = true)
{
static::loadActionLogPluginsLanguage();
static $links = [];

$message = Text::_($log->message_language_key);
$messageData = json_decode($log->message, true);
$message = Text::_($log->message_language_key);
$messageData = json_decode($log->message, true);

// Special handling for translation extension name
if (isset($messageData['extension_name'])) {
Expand Down
14 changes: 13 additions & 1 deletion administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -2326,6 +2326,13 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/administrator/components/com_admin/sql/updates/postgresql/4.4.4-2024-03-28.sql',
'/administrator/modules/mod_post_installation_messages/mod_post_installation_messages.php',
'/media/vendor/punycode/LICENSE-MIT.txt',
// From 5.1.0 to 5.1.1
'/libraries/vendor/cweagans/composer-patches/LICENSE.md',
'/libraries/vendor/cweagans/composer-patches/src/PatchEvent.php',
'/libraries/vendor/cweagans/composer-patches/src/PatchEvents.php',
'/libraries/vendor/cweagans/composer-patches/src/Patches.php',
'/libraries/vendor/cweagans/composer-patches/tests/PatchEventTest.php',
'/libraries/vendor/laminas/laminas-diactoros/PATCHES.txt',
];

$folders = [
Expand Down Expand Up @@ -2585,6 +2592,11 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/src/Event/Router',
// From 5.1.0-beta2 to 5.1.0-rc1
'/media/vendor/punycode',
// From 5.1.0 to 5.1.1
'/libraries/vendor/cweagans/composer-patches/tests',
'/libraries/vendor/cweagans/composer-patches/src',
'/libraries/vendor/cweagans/composer-patches',
'/libraries/vendor/cweagans',
];

$status['files_checked'] = $files;
Expand Down Expand Up @@ -2990,7 +3002,7 @@ private function migrateTinymceConfiguration(): bool
/**
* setup Guided Tours Unique Identifiers
*
* @return boolean True on success
* @return void
*
* @since 5.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function getAssociationList($extensionName, $typeName, $itemId)
}

/**
* Get the the instance of the extension helper class
* Get the instance of the extension helper class
*
* @param string $extensionName The extension name with com_
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,8 @@ public function publish(&$pks, $value = 1)

return true;
}

return false;
}

/**
Expand Down
10 changes: 9 additions & 1 deletion administrator/components/com_finder/src/Indexer/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,16 @@ public static function addContentType($title, $mime = null)
$db->setQuery($query);
$db->execute();

// Cache the result
$type = new \stdClass();
$type->title = $title;
$type->mime = $mime ?? '';
$type->id = (int) $db->insertid();

$types[$title] = $type;

// Return the new id.
return (int) $db->insertid();
return $type->id;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public function compareUpdateVersion($extension)
/**
* Get a message of the tables skipped and checked
*
* @param array $status status of of the update files
* @param array $status status of the update files
*
* @return array Messages with the errors with the update version
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected function getLanguages()
}

$languages = [];
$search = strtolower($this->getState('filter.search'));
$search = strtolower($this->getState('filter.search', ''));

foreach ($updateSiteXML->extension as $extension) {
$language = new \stdClass();
Expand Down Expand Up @@ -183,9 +183,9 @@ protected function getLanguages()
usort(
$languages,
function ($a, $b) use ($that) {
$ordering = $that->getState('list.ordering');
$ordering = $that->getState('list.ordering', 'name');

if (strtolower($that->getState('list.direction')) === 'asc') {
if (strtolower($that->getState('list.direction', 'asc')) === 'asc') {
return StringHelper::strcmp($a->$ordering, $b->$ordering);
}

Expand All @@ -195,9 +195,9 @@ function ($a, $b) use ($that) {

// Count the non-paginated list
$this->languageCount = \count($languages);
$limit = ($this->getState('list.limit') > 0) ? $this->getState('list.limit') : $this->languageCount;
$limit = ($this->getState('list.limit', 20) > 0) ? $this->getState('list.limit', 20) : $this->languageCount;

return \array_slice($languages, $this->getStart(), $limit);
return \array_slice($languages, $this->getStart() ?? 0, $limit);
}

/**
Expand Down
6 changes: 6 additions & 0 deletions administrator/components/com_joomlaupdate/extract.php
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,9 @@ private function processTypeFileUncompressed(): bool
if ($this->dataReadLength == 0) {
// Before processing file data, ensure permissions are adequate
$this->setCorrectPermissions($this->fileHeader->file);

// This file is changed during the script's operation so we clear the status cache.
clearstatcache($this->fileHeader->file);
}

// Open the output file
Expand Down Expand Up @@ -1491,6 +1494,9 @@ private function processTypeFileCompressed(): bool
// Before processing file data, ensure permissions are adequate
$this->setCorrectPermissions($this->fileHeader->file);

// This file is changed during the script's operation so we clear the status cache.
clearstatcache($this->fileHeader->file);

// Open the output file
$outfp = @fopen($this->fileHeader->realFile, 'wb');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@ private function checkCompatibility($updateFileUrl, $joomlaTargetVersion)
$minimumStability = ComponentHelper::getParams('com_installer')->get('minimum_stability', Updater::STABILITY_STABLE);

$update = new Update();
$update->set('jversion.full', $joomlaTargetVersion);
$update->setTargetVersion($joomlaTargetVersion);
$update->loadFromXml($updateFileUrl, $minimumStability);

$compatibleVersions = $update->get('compatibleVersions');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public function delete($cids)
/**
* Removes all of the cached strings from the table.
*
* @return boolean result of operation
* @return void|\RuntimeException
*
* @since 3.4.2
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default {
},
},
methods: {
/* Check if the the form is valid */
/* Check if the form is valid */
isValid() {
return (this.folder);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ public function save($key = null, $urlVar = null)
$this->setRedirect(Route::_('index.php?option=com_menus&view=menus', false));
break;
}

return true;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/src/Model/ItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
];
$metaPath = Path::find($metadataFolders, 'metadata.xml');

if (is_file($path = Path::clean($metaPath))) {
if ($metaPath !== false && is_file($path = Path::clean($metaPath))) {
$formFile = $path;
}
} elseif ($base) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function getGroups()
/**
* Method to get the users to exclude from the list of users
*
* @return array|null array of users to exclude or null to to not exclude them
* @return array|null array of users to exclude or null to not exclude them
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function save($key = null, $urlVar = null)
/**
* Method to get the other modules in the same position
*
* @return string The data for the Ajax request.
* @return void
*
* @since 3.6.3
*/
Expand Down Expand Up @@ -303,7 +303,7 @@ public function orderPosition()
} catch (\RuntimeException $e) {
$app->enqueueMessage($e->getMessage(), 'error');

return '';
return;
}

$orders2 = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,5 +208,7 @@ protected function addModalToolbar()
}

$toolbar->cancel('module.cancel');

$toolbar->inlinehelp();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,7 @@ protected function addModalToolbar()
}

$toolbar->cancel('plugin.cancel');

$toolbar->inlinehelp();
}
}
1 change: 1 addition & 0 deletions administrator/components/com_redirect/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
name="mode"
type="radio"
label="COM_REDIRECT_MODE_LABEL"
description="COM_REDIRECT_MODE_DESC"
layout="joomla.form.field.radio.switcher"
default="0"
>
Expand Down
10 changes: 4 additions & 6 deletions administrator/components/com_users/tmpl/methods/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ class="img-fluid"
<?php foreach ($method['active'] as $record) : ?>
<div class="com-users-methods-list-method-record d-flex flex-row flex-wrap justify-content-start border-top py-2">
<div class="com-users-methods-list-method-record-info flex-grow-1 d-flex flex-column align-items-start gap-1">
<?php if ($methodName === 'backupcodes') : ?>
<?php if ($canAddEdit) : ?>
<div class="alert alert-info mt-1 w-100">
<?php echo Text::sprintf('COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT_HEAD', Route::_('index.php?option=com_users&task=method.edit&id=' . (int) $record->id . ($this->returnURL ? '&returnurl=' . $this->escape(urlencode($this->returnURL)) : '') . '&user_id=' . $this->user->id)) ?>
</div>
<?php endif ?>
<?php if ($methodName === 'backupcodes' && $canAddEdit) : ?>
<div class="alert alert-info mt-1 w-100">
<?php echo Text::sprintf('COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT_HEAD', Route::_('index.php?option=com_users&task=method.edit&id=' . (int) $record->id . ($this->returnURL ? '&returnurl=' . $this->escape(urlencode($this->returnURL)) : '') . '&user_id=' . $this->user->id), 'text-decoration-underline') ?>
</div>
<?php else : ?>
<h4 class="com-users-methods-list-method-record-title-container mb-1 fs-3">
<?php if ($record->default) : ?>
Expand Down
1 change: 1 addition & 0 deletions administrator/language/en-GB/com_redirect.ini
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ COM_REDIRECT_HEADING_STATUS_CODE_DESC="Status Code descending"
COM_REDIRECT_MANAGER_LINK_EDIT="Redirects: Edit"
COM_REDIRECT_MANAGER_LINK_NEW="Redirects: New"
COM_REDIRECT_MANAGER_LINKS="Redirects: Links"
COM_REDIRECT_MODE_DESC="The Advanced Mode allows the use of HTTP 1.1 status codes other than the default '301 Permanently Moved'."
COM_REDIRECT_MODE_LABEL="Activate Advanced Mode"
COM_REDIRECT_N_ITEMS_ARCHIVED="%d links archived."
COM_REDIRECT_N_ITEMS_ARCHIVED_1="Link archived."
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ COM_USERS_MFA_ACTIVE="Uses Multi-factor Authentication"
COM_USERS_MFA_ADD_AUTHENTICATOR_OF_TYPE="Add a new %s"
COM_USERS_MFA_ADD_PAGE_HEAD="Add a Multi-factor Authentication Method"
COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT="Backup Codes let you log into the site if your regular Multi-factor Authentication method does not work or you no longer have access to it. Each code can be used <em>only once</em>."
COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT_HEAD="<a href=\"%s\">Print these codes</a> and keep them in your wallet."
COM_USERS_MFA_BACKUPCODES_PRINT_PROMPT_HEAD="<a href=\"%1s\" class=\"%2s\">Print these codes</a> and keep them in your wallet."
COM_USERS_MFA_BACKUPCODES_RESET="Regenerate Backup Codes"
COM_USERS_MFA_BACKUPCODES_RESET_INFO="Use the \"Regenerate Backup Codes\" button on the toolbar to generate a new set of Backup Codes. We recommend that you do this if you think your Backup Codes are compromised, e.g. someone got hold of a printout with them, or if you are running low on available Backup Codes."
COM_USERS_MFA_EDIT_FIELD_DEFAULT="Make this the default Multi-factor Authentication method"
Expand Down
Loading

0 comments on commit 02fe995

Please sign in to comment.