diff --git a/.drone.yml b/.drone.yml index b6a399eea2402..f18730fc4a829 100644 --- a/.drone.yml +++ b/.drone.yml @@ -272,7 +272,7 @@ volumes: services: - name: mysql - image: mysql:8 + image: mysql:8.0 command: ["--default-authentication-plugin=mysql_native_password"] environment: MYSQL_USER: joomla_ut @@ -405,7 +405,6 @@ steps: status: - failure - trigger: event: - cron @@ -415,6 +414,6 @@ trigger: --- kind: signature -hmac: 3e27d8cd2799f97105892b5e08d8283271a4d5c5e21aa1fe2b7ae1c4df3e349b +hmac: d4131ffaa91f4925cae9118af99cf2a7d8bd6fc2dc59fb50259c7ced220c48d5 ... diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 751a1ce63d1a2..d659b92ed8779 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 @@ -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 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 50b6393e5c76d..eb65c17eb65ff 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -7,19 +7,22 @@ You are welcome to submit a contribution for review and possible inclusion in th 2) Follow the [Joomla! Coding Standards](https://developer.joomla.org/coding-standards.html). 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. + 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. 4) Report security issues to the Joomla! Security Strike Team (JSST) at security@joomla.org or use the [JSST contact form](https://developer.joomla.org/contact-security-team.html). Please do not use the public tracker for security issues. +5) 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. + 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. #### 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. | + diff --git a/README.md b/README.md index 1235cf830a13b..6fee16cabf670 100644 --- a/README.md +++ b/README.md @@ -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? diff --git a/README.txt b/README.txt index 3be3782a4724b..14a462310f20f 100644 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ The Joomla! 6.0 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? diff --git a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php index 102e2638c7538..658788a9486c4 100644 --- a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php +++ b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php @@ -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'])) { diff --git a/administrator/components/com_actionlogs/src/Model/ActionlogsModel.php b/administrator/components/com_actionlogs/src/Model/ActionlogsModel.php index 4ce6d9e0427b0..0dc3ce23761ff 100644 --- a/administrator/components/com_actionlogs/src/Model/ActionlogsModel.php +++ b/administrator/components/com_actionlogs/src/Model/ActionlogsModel.php @@ -18,8 +18,8 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Model\ListModel; use Joomla\Database\DatabaseIterator; -use Joomla\Database\DatabaseQuery; use Joomla\Database\ParameterType; +use Joomla\Database\QueryInterface; use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects @@ -79,7 +79,7 @@ protected function populateState($ordering = 'a.id', $direction = 'desc') /** * Build an SQL query to load the list data. * - * @return DatabaseQuery + * @return QueryInterface * * @since 3.9.0 * @@ -298,7 +298,7 @@ public function getLogDataAsIterator($pks = null) * * @param integer[]|null $pks An optional array of log record IDs to load * - * @return DatabaseQuery + * @return QueryInterface * * @since 3.9.0 */ diff --git a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php index d0e868c38dc3d..e0f9d0bf806b1 100644 --- a/administrator/components/com_actionlogs/tmpl/actionlogs/default.php +++ b/administrator/components/com_actionlogs/tmpl/actionlogs/default.php @@ -23,7 +23,7 @@ $listDirn = $this->escape($this->state->get('list.direction')); /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ -$wa = $this->document->getWebAssetManager(); +$wa = $this->getDocument()->getWebAssetManager(); $wa->useScript('keepalive') ->useScript('table.columns') ->useScript('multiselect') diff --git a/administrator/components/com_admin/postinstall/htaccessbrotli.php b/administrator/components/com_admin/postinstall/htaccessbrotli.php new file mode 100644 index 0000000000000..58f7bb02b37b9 --- /dev/null +++ b/administrator/components/com_admin/postinstall/htaccessbrotli.php @@ -0,0 +1,36 @@ + + * @license GNU General Public License version 2 or later; see LICENSE.txt + * + * This file contains post-installation message handling for notifying users of a change + * in the default .htaccess file regarding Brotli compression. + */ + +// phpcs:disable PSR1.Files.SideEffects +\defined('_JEXEC') or die; +// phpcs:enable PSR1.Files.SideEffects + +/** + * Notifies users of a change in the default .htaccess file regarding setting for brotli to prevent double compression + * + * This check returns true regardless of condition. + * + * @return boolean + * + * @since 4.4.4 + */ +function admin_postinstall_htaccessbrotli_condition() +{ + $htaccessContent = ''; + + if (is_file(JPATH_ROOT . '/.htaccess') || is_file(JPATH_ROOT . '/htaccess.txt')) { + $htaccessContent = file_get_contents(is_file(JPATH_ROOT . '/.htaccess') ? JPATH_ROOT . '/.htaccess' : JPATH_ROOT . '/htaccess.txt'); + } + + return !str_contains($htaccessContent, 'E=no-brotli:1'); +} diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index 5b32d2914e5fe..8932fd19a54db 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -2322,7 +2322,17 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/web-token/jwt-signature-algorithm-none/LICENSE', '/libraries/vendor/web-token/jwt-signature-algorithm-rsa/LICENSE', // From 5.1.0-beta2 to 5.1.0-rc1 + '/administrator/components/com_admin/sql/updates/mysql/4.4.4-2024-03-28.sql', + '/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 = [ @@ -2580,6 +2590,13 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) '/libraries/vendor/web-token/jwt-experimental/ContentEncryption', '/libraries/vendor/web-token/jwt-experimental', '/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; diff --git a/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-24.sql b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-24.sql index a47e63e54505b..3716a866f8d64 100644 --- a/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-24.sql +++ b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-24.sql @@ -14,10 +14,17 @@ CREATE TABLE IF NOT EXISTS `#__tuf_metadata` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Secure TUF Updates'; -- -------------------------------------------------------- +-- The following INSERT statement has been modified to avoid an SQL error +-- when there is more than 1 update site for the Joomla core. +-- See https://github.com/joomla/joomla-cms/pull/43169 for details. +-- INSERT INTO `#__tuf_metadata` (`update_site_id`, `root`) -VALUES ((SELECT ue.`update_site_id` FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) WHERE e.`type`='file' AND e.`element`='joomla'), '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}'); +SELECT ue.`update_site_id`, + '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}' + FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) + WHERE e.`type`='file' AND e.`element`='joomla'; ------------------------------------------------------------ +-- -------------------------------------------------------- -- The following UPDATE statement has been modified to avoid an SQL error -- when there is more than 1 update site for the Joomla core. -- See https://github.com/joomla/joomla-cms/pull/42988 for details. diff --git a/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-03-28.sql b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-03-28.sql new file mode 100644 index 0000000000000..e76716010f9fd --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-03-28.sql @@ -0,0 +1,12 @@ +-- +-- Add post-installation message about Brotli compression in .htaccess +-- +-- This statement had to be modified to prevent duplicate postinstall messages +-- when updating from 4.4. +-- See https://github.com/joomla/joomla-cms/pull/43182 for details. +-- +INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`) +SELECT `extension_id`, 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '5.1.0', 1 + FROM `#__extensions` + WHERE `name` = 'files_joomla' + AND (SELECT COUNT(a.`postinstall_message_id`) FROM `#__postinstall_messages` a WHERE a.`title_key` = 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE') = 0; diff --git a/administrator/components/com_admin/sql/updates/mysql/5.1.1-2024-04-18.sql b/administrator/components/com_admin/sql/updates/mysql/5.1.1-2024-04-18.sql new file mode 100644 index 0000000000000..8e59290ac5607 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/5.1.1-2024-04-18.sql @@ -0,0 +1,10 @@ +-- +-- Add a default value for the colorScheme in the Atum template on Joomla update +-- only when a value is not already set. +-- New installs will have the default value set in the installation sql. +-- + +UPDATE `#__template_styles` +SET `params` = JSON_SET(`params`, '$.colorScheme', 'os') +WHERE `template` = 'atum' +AND JSON_EXTRACT(`params`, '$.colorScheme') IS NULL; diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-24.sql b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-24.sql index 55181c00702bf..36692be7b3278 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-24.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-24.sql @@ -15,10 +15,18 @@ PRIMARY KEY ("id") COMMENT ON TABLE "#__tuf_metadata" IS 'Secure TUF Updates'; +-- -------------------------------------------------------- +-- The following INSERT statement has been modified to avoid an SQL error +-- when there is more than 1 update site for the Joomla core. +-- See https://github.com/joomla/joomla-cms/pull/43169 for details. +-- INSERT INTO "#__tuf_metadata" ("update_site_id", "root") -VALUES ((SELECT ue."update_site_id" FROM "#__update_sites_extensions" AS ue JOIN "#__extensions" AS e ON (e."extension_id" = ue."extension_id") WHERE e."type"='file' AND e."element"='joomla'), '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}'); +SELECT ue."update_site_id", + '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}' + FROM "#__update_sites_extensions" AS ue JOIN "#__extensions" AS e ON (e."extension_id" = ue."extension_id") + WHERE e."type"='file' AND e."element"='joomla'; ------------------------------------------------------------ +-- -------------------------------------------------------- -- The following UPDATE statement has been modified to avoid an SQL error -- when there is more than 1 update site for the Joomla core. -- See https://github.com/joomla/joomla-cms/pull/42988 for details. diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-08.sql b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-08.sql index 03618c5ec72c3..dde57323da713 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-08.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-08.sql @@ -1,4 +1,4 @@ -INSERT IGNORE INTO "#__guidedtour_steps" ("tour_id", "title", "published", "description", "ordering", "position", "target", "type", "interactive_type", "url", "created", "created_by", "modified", "modified_by", "language") VALUES +INSERT INTO "#__guidedtour_steps" ("tour_id", "title", "published", "description", "ordering", "position", "target", "type", "interactive_type", "url", "created", "created_by", "modified", "modified_by", "language") VALUES (0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_MENUS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_MENUS_DESCRIPTION', 1, 'right', '#sidebarmenu', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'), (0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_QUICKACCESS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_QUICKACCESS_DESCRIPTION', 2, 'center', '', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'), (0, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_NOTIFICATIONS_TITLE', 1, 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_STEP_NOTIFICATIONS_DESCRIPTION', 3, 'left', '.quickicons-for-update_quickicon .card', 0, 1, '', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, '*'), @@ -8,7 +8,7 @@ ON CONFLICT DO NOTHING; ALTER TABLE "#__guidedtours" ADD COLUMN "autostart" int NOT NULL DEFAULT 0 /** CAN FAIL **/; -INSERT IGNORE INTO "#__guidedtours" ("title", "uid", "description", "ordering", "extensions", "url", "created", "created_by", "modified", "modified_by", "published", "language", "access", "autostart") VALUES +INSERT INTO "#__guidedtours" ("title", "uid", "description", "ordering", "extensions", "url", "created", "created_by", "modified", "modified_by", "published", "language", "access", "autostart") VALUES ('COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_TITLE', 'joomla-welcome', 'COM_GUIDEDTOURS_TOUR_WELCOMETOJOOMLA_DESCRIPTION', 1, '["com_cpanel"]', 'administrator/index.php', CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, 1, '*', 1, 0) ON CONFLICT DO NOTHING; diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-28.sql b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-28.sql new file mode 100644 index 0000000000000..82bf0d612608c --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-28.sql @@ -0,0 +1,12 @@ +-- +-- Add post-installation message about Brotli compression in .htaccess +-- +-- This statement had to be modified to prevent duplicate postinstall messages +-- when updating from 4.4. +-- See https://github.com/joomla/joomla-cms/pull/43182 for details. +-- +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") +SELECT "extension_id", 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '5.1.0', 1 + FROM "#__extensions" + WHERE "name" = 'files_joomla' + AND (SELECT COUNT(a."postinstall_message_id") FROM "#__postinstall_messages" a WHERE a."title_key" = 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE') = 0; diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.1.1-2024-04-18.sql b/administrator/components/com_admin/sql/updates/postgresql/5.1.1-2024-04-18.sql new file mode 100644 index 0000000000000..fc44f25a2a219 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/5.1.1-2024-04-18.sql @@ -0,0 +1,10 @@ +-- +-- Add a default value for the colorScheme in the Atum template on Joomla update +-- only when a value is not already set. +-- New installs will have the default value set in the installation sql. +-- + +UPDATE "#__template_styles" +SET "params" = jsonb_set("params"::jsonb, '{colorScheme}', '"os"', true) +WHERE "template" = 'atum' +AND "params"::jsonb->>'colorScheme' IS NULL; diff --git a/administrator/components/com_admin/tmpl/help/default.php b/administrator/components/com_admin/tmpl/help/default.php index 69480f7d90311..14e0a81b9833f 100644 --- a/administrator/components/com_admin/tmpl/help/default.php +++ b/administrator/components/com_admin/tmpl/help/default.php @@ -18,7 +18,7 @@ /** @var \Joomla\Component\Admin\Administrator\View\Help\HtmlView $this */ /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ -$wa = $this->document->getWebAssetManager(); +$wa = $this->getDocument()->getWebAssetManager(); $wa->useScript('com_admin.admin-help'); ?> diff --git a/administrator/components/com_associations/src/Model/AssociationsModel.php b/administrator/components/com_associations/src/Model/AssociationsModel.php index 1c9756a3aed34..1f22e6130cd30 100644 --- a/administrator/components/com_associations/src/Model/AssociationsModel.php +++ b/administrator/components/com_associations/src/Model/AssociationsModel.php @@ -18,6 +18,7 @@ use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper; use Joomla\Database\Exception\ExecutionFailureException; use Joomla\Database\ParameterType; +use Joomla\Database\QueryInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; @@ -152,7 +153,7 @@ protected function getStoreId($id = '') /** * Build an SQL query to load the list data. * - * @return \Joomla\Database\DatabaseQuery|boolean + * @return QueryInterface|boolean * * @since 3.7.0 */ diff --git a/administrator/components/com_associations/tmpl/association/edit.php b/administrator/components/com_associations/tmpl/association/edit.php index 9928dfcfc4513..efbe432ed63df 100644 --- a/administrator/components/com_associations/tmpl/association/edit.php +++ b/administrator/components/com_associations/tmpl/association/edit.php @@ -18,7 +18,7 @@ /** @var HtmlView $this */ /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ -$wa = $this->document->getWebAssetManager(); +$wa = $this->getDocument()->getWebAssetManager(); $wa->useScript('keepalive') ->useScript('form.validate') ->usePreset('com_associations.sidebyside') diff --git a/administrator/components/com_associations/tmpl/associations/default.php b/administrator/components/com_associations/tmpl/associations/default.php index 1c4f69aea404e..01a8f1ad29579 100644 --- a/administrator/components/com_associations/tmpl/associations/default.php +++ b/administrator/components/com_associations/tmpl/associations/default.php @@ -19,7 +19,7 @@ /** @var Joomla\Component\Associations\Administrator\View\Associations\HtmlView $this */ /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ -$wa = $this->document->getWebAssetManager(); +$wa = $this->getDocument()->getWebAssetManager(); $wa->useScript('com_associations.admin-associations-default') ->useScript('table.columns') ->useScript('multiselect'); diff --git a/administrator/components/com_associations/tmpl/associations/modal.php b/administrator/components/com_associations/tmpl/associations/modal.php index 0a92bc991945f..8db50389fc743 100644 --- a/administrator/components/com_associations/tmpl/associations/modal.php +++ b/administrator/components/com_associations/tmpl/associations/modal.php @@ -27,7 +27,7 @@ } /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */ -$wa = $this->document->getWebAssetManager(); +$wa = $this->getDocument()->getWebAssetManager(); $wa->useScript('multiselect') ->useScript('com_associations.admin-associations-modal'); @@ -43,7 +43,7 @@ 2 => 'icon-folder', ]; -$this->document->addScriptOptions('associations-modal', ['func' => $function]); +$this->getDocument()->addScriptOptions('associations-modal', ['func' => $function]); ?>