Skip to content

Commit

Permalink
Merge branch '5.1-dev' into 5.1-customfields1
Browse files Browse the repository at this point in the history
  • Loading branch information
Quy committed Feb 28, 2024
2 parents 70a3a53 + af73758 commit 7a367e7
Show file tree
Hide file tree
Showing 595 changed files with 13,346 additions and 5,029 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ steps:
- mkdir -p transfer
- date +%s > transfer/$MINORVERSION-time.txt
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2 --disable-patch-packages
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --disable-patch-packages
- mv build/tmp/packages/* transfer/

- name: upload
Expand Down Expand Up @@ -403,6 +403,6 @@ trigger:

---
kind: signature
hmac: e8ab45eb1d91c0b0b38c8d25a3a983d112c973dcba0153a982f2afd581dfa458
hmac: c1434b09300896f8627ccb11c92e97878caf7a303772db01a647dca53a92fa3f

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

This file was deleted.

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

- name: Fetch latest cms changes
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.3-dev
git merge upstream/4.4-dev
- name: Fetch and extract translations
run: |
Expand Down Expand Up @@ -73,5 +73,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.3-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[4.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.4-dev
77 changes: 77 additions & 0 deletions .github/workflows/create-translation-pull-request-v5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Create translation pull request

on:
push:
branches: [ translation ]

workflow_dispatch:

schedule:
# Run daily at 7:32
- cron: '32 7 * * *'

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
# Only run this action the translation-bot repository in the translation branch
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation5' }}

steps:
- uses: actions/checkout@v3
# We need the full depth to create / update the pull request against the main repo
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20

- name: Fetch latest cms changes
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation5 refs/remotes/origin/translation5
git merge upstream/5.0-dev
- name: Fetch and extract translations
run: |
cd ..
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
unzip main.zip
- name: Syncing directories
# We use a simple copy paste syntax here if needed customization for different directories
run: |
cd ..
SYNC_VERSION="v5"
SYNC_PATH="installation/language/"
echo ${SYNC_PATH}
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
- name: Update static error pages
run: |
npm ci --ignore-scripts && node build/build.js --build-pages
- name: Create commit
continue-on-error: true
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git add .
git commit -m "Language update"
git push --force
- name: Create pull request
if: ${{ success() }}
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[5.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[5.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.0-dev
4 changes: 2 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
'@PSR12' => true,
// Short array syntax
'array_syntax' => ['syntax' => 'short'],
// Lists should not have a trailing comma like list($foo, $bar,) = ...
'no_trailing_comma_in_list_call' => true,
// List of values separated by a comma is contained on a single line should not have a trailing comma like [$foo, $bar,] = ...
'no_trailing_comma_in_singleline' => true,
// Arrays on multiline should have a trailing comma
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
// Align elements in multiline array and variable declarations on new lines below each other
Expand Down
23 changes: 13 additions & 10 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,10 @@ private function migrateLogRotationPlugin($data)
return;
}

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);

// Get the timeout, as configured in plg_system_logrotation
Expand Down Expand Up @@ -433,10 +433,10 @@ private function migrateSessionGCPlugin($data)
// Get the plugin parameters
$params = new Registry($data->params);

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Session GC',
Expand Down Expand Up @@ -478,10 +478,10 @@ private function migrateUpdatenotificationPlugin($data)
$params = new Registry($data->params);
$lastrun = (int) $params->get('lastrun', time());

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Update Notification',
Expand Down Expand Up @@ -2204,6 +2204,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/administrator/components/com_newsfeeds/tmpl/newsfeeds/default_batch_footer.php',
'/administrator/components/com_tags/tmpl/tags/default_batch_footer.php',
'/administrator/components/com_users/tmpl/users/default_batch_footer.php',
// From 5.1.0-alpha3 to 5.1.0-alpha4
'/administrator/components/com_redirect/tmpl/links/default_batch_footer.php',
'/modules/mod_banners/mod_banners.php',
];

$folders = [
Expand Down Expand Up @@ -2632,10 +2635,10 @@ private function migrateDeleteActionlogsConfiguration(): bool
return true;
}

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Delete Action Logs',
Expand Down Expand Up @@ -2701,10 +2704,10 @@ private function migratePrivacyconsentConfiguration(): bool
return true;
}

/** @var SchedulerComponent $component */
/** @var \Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent $component */
$component = Factory::getApplication()->bootComponent('com_scheduler');

/** @var TaskModel $model */
/** @var \Joomla\Component\Scheduler\Administrator\Model\TaskModel $model */
$model = $component->getMVCFactory()->createModel('Task', 'Administrator', ['ignore_request' => true]);
$task = [
'title' => 'Privacy Consent',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__fields_values` MODIFY `value` MEDIUMTEXT;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__guidedtour_steps` ADD COLUMN `params` text NULL /** CAN FAIL **/;
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--
-- Table structure for table `#__tuf_metadata`
--

CREATE TABLE IF NOT EXISTS `#__tuf_metadata` (
`id` int NOT NULL AUTO_INCREMENT,
`update_site_id` int DEFAULT 0,
`root` text DEFAULT NULL,
`targets` text DEFAULT NULL,
`snapshot` text DEFAULT NULL,
`timestamp` text DEFAULT NULL,
`mirrors` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Secure TUF Updates';

-- --------------------------------------------------------
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"}]}');

-----------------------------------------------------------
UPDATE `#__update_sites`
SET `type` = 'tuf', `location` = 'https://update.joomla.org/cms/'
WHERE `update_site_id` = (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');
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "#__guidedtour_steps" ADD COLUMN "params" text NULL /** CAN FAIL **/;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--
-- Table structure for table "#__tuf_metadata"
--

CREATE TABLE IF NOT EXISTS "#__tuf_metadata" (
"id" serial NOT NULL,
"update_site_id" bigint DEFAULT 0 NOT NULL,
"root" text DEFAULT NULL,
"targets" text DEFAULT NULL,
"snapshot" text DEFAULT NULL,
"timestamp" text DEFAULT NULL,
"mirrors" text DEFAULT NULL,
PRIMARY KEY ("id")
);

COMMENT ON TABLE "#__tuf_metadata" IS 'Secure TUF Updates';

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"}]}');

UPDATE "#__update_sites"
SET "type" = 'tuf', "location" = 'https://update.joomla.org/cms/'
WHERE "update_site_id" = (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');

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);

0 comments on commit 7a367e7

Please sign in to comment.