Skip to content

Commit

Permalink
Merge branch '5.2-dev' into activate_send_email
Browse files Browse the repository at this point in the history
  • Loading branch information
richard67 committed May 4, 2024
2 parents f5cf34a + 7db6a0f commit f316e46
Show file tree
Hide file tree
Showing 511 changed files with 1,342 additions and 804 deletions.
38 changes: 23 additions & 15 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,29 @@ steps:
environment:
WEB_SERVER:
from_secret: webserver
FTP_SERVER:
from_secret: ftpserver
FTP_USERNAME:
from_secret: ftpusername
FTP_PASSWORD:
from_secret: ftppassword
FTP_KEY:
from_secret: ftp_key
FTP_USER:
from_secret: ftp_user
FTP_HOST:
from_secret: ftp_host
ARTIFACTS_ROOT:
from_secret: artifacts_root
GITHUB_TOKEN:
from_secret: github_token
commands:
- export PLUGIN_DEST_DIR=/artifacts/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
- echo https://$WEB_SERVER$PLUGIN_DEST_DIR
- rclone config create artifacts ftp host $FTP_SERVER user $FTP_USERNAME port 21 pass $FTP_PASSWORD
- rclone mkdir artifacts:$PLUGIN_DEST_DIR
- rclone copy tests/System/output/ artifacts:$PLUGIN_DEST_DIR
- 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://$WEB_SERVER$PLUGIN_DEST_DIR\"}" > /dev/null'
- export PLUGIN_DEST_DIR=$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
- echo https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- echo "$FTP_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-add
- rclone config create artifacts sftp host $FTP_HOST user $FTP_USER port 22
- rclone mkdir artifacts:$ARTIFACTS_ROOT/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
- rclone copy tests/System/output/ artifacts:$ARTIFACTS_ROOT/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
- 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR\"}" > /dev/null'
when:
status:
- failure
Expand Down Expand Up @@ -384,15 +392,15 @@ steps:
- rclone delete nightly:/home/devj/public_html/nightlies/ --include "Joomla_$MINORVERSION.*"
- rclone delete nightly:/home/devj/public_html/cache/com_content/
- rclone copy ./transfer/ nightly:/home/devj/public_html/nightlies/
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.1](https://developer.joomla.org/nightly-builds.html) successfully built."}' $MATTERMOST_NIGHTLY_HOOK
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.2](https://developer.joomla.org/nightly-builds.html) successfully built."}' $MATTERMOST_NIGHTLY_HOOK

- name: buildfailure
image: joomlaprojects/docker-images:packager
environment:
MATTERMOST_NIGHTLY_HOOK:
from_secret: mattermost_nightly_hook
commands:
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.1](https://developer.joomla.org/nightly-builds.html) FAILED to built."}' $MATTERMOST_NIGHTLY_HOOK
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.2](https://developer.joomla.org/nightly-builds.html) FAILED to built."}' $MATTERMOST_NIGHTLY_HOOK
when:
status:
- failure
Expand All @@ -407,6 +415,6 @@ trigger:

---
kind: signature
hmac: 2511b0e67290bd50c69982b00930e6b7d32097a32cec1bd787cfc3d06c94e875
hmac: 90d71e1cf5e5dcdb753ea1da6f8b6e571fc82a47994bd856e83c5f30bdd4a2af

...
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Joomla! CMS™
====================

The Joomla! 5.1 branch is under heavy development and not all links in this document are available yet
The Joomla! 5.2 branch is under heavy development and not all links in this document are available yet
------------------------------------------------------------------------------------------------------

Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
|------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=5.1-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/5.1-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V8.1.0-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V18.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v9.6.7-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=5.2-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/5.2-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V8.1.0-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V18.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v9.6.7-green)](https://nodejs.org/en/) |

Overview
---------------------
* This is the source of Joomla! 5.x.
* Joomla's [Official website](https://www.joomla.org).
* Joomla! 5.1 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.1_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/5.1-dev).
* Joomla! 5.2 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_5.2_version_history).
* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/5.2-dev).

What is Joomla?
---------------------
Expand Down Expand Up @@ -48,9 +48,9 @@ git clone https://github.com/joomla/joomla-cms.git
```bash
cd joomla-cms
```
- Go to the 5.1-dev branch:
- Go to the 5.2-dev branch:
```bash
git checkout 5.1-dev
git checkout 5.2-dev
```
- Install all the needed composer packages:
```bash
Expand Down
6 changes: 3 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Joomla! CMS™

The Joomla! 5.1 branch is under heavy development and not all links in this document are available yet
The Joomla! 5.2 branch is under heavy development and not all links in this document are available yet
------------------------------------------------------------------------------------------------------

1- Overview
* This is a Joomla! 5.x installation/upgrade package.
* Joomla! Official site: https://www.joomla.org
* Joomla! 5.1 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.1_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/5.1-dev
* Joomla! 5.2 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_5.2_version_history
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/5.2-dev

2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
*
Expand Down Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@
*/
function admin_postinstall_htaccessbrotli_condition()
{
return true;
$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');
}
2 changes: 2 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -2322,6 +2322,8 @@ 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',
];
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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';

-----------------------------------------------------------
-- --------------------------------------------------------
-- 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
--
-- Add post-installation message about Brotli compression in .htaccess
--
INSERT IGNORE 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';
-- 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;
Original file line number Diff line number Diff line change
@@ -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;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ 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';

-----------------------------------------------------------
-- --------------------------------------------------------
-- 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +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'
ON CONFLICT DO NOTHING;
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;
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion administrator/components/com_admin/tmpl/help/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -43,7 +43,7 @@
2 => 'icon-folder',
];

$this->document->addScriptOptions('associations-modal', ['func' => $function]);
$this->getDocument()->addScriptOptions('associations-modal', ['func' => $function]);

?>
<div class="container-popup">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -94,7 +95,7 @@ public function &getCategoryOrders()
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -94,7 +95,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*/
protected function getListQuery()
{
Expand Down

0 comments on commit f316e46

Please sign in to comment.