Skip to content

Commit 0b6155a

Browse files
authored
Merge branch '5.1-dev' into feature/5.1-dev/replace-img-by-jlayout
2 parents a1ba0fa + f8003bc commit 0b6155a

File tree

473 files changed

+7709
-4436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

473 files changed

+7709
-4436
lines changed

.drone.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ clone:
66

77
steps:
88
- name: setup
9-
image: joomlaprojects/docker-images:php8.2
9+
image: joomlaprojects/docker-images:php8.3
1010
volumes:
1111
- name: certificates
1212
path: /certificates
1313
commands:
1414
- cp -v tests/certs/* /certificates/
1515

1616
- name: composer
17-
image: joomlaprojects/docker-images:php8.2
17+
image: joomlaprojects/docker-images:php8.3
1818
volumes:
1919
- name: composer-cache
2020
path: /tmp/composer-cache
@@ -63,6 +63,13 @@ steps:
6363
- php -v
6464
- ./libraries/vendor/bin/phpunit --testsuite Unit
6565

66+
- name: php83-unit
67+
depends_on: [ phpcs ]
68+
image: joomlaprojects/docker-images:php8.3
69+
commands:
70+
- php -v
71+
- ./libraries/vendor/bin/phpunit --testsuite Unit
72+
6673
- name: php81-integration
6774
depends_on: [ npm ]
6875
image: joomlaprojects/docker-images:php8.1
@@ -77,6 +84,13 @@ steps:
7784
- php -v
7885
- ./libraries/vendor/bin/phpunit --testsuite Integration
7986

87+
- name: php83-integration
88+
depends_on: [ npm ]
89+
image: joomlaprojects/docker-images:php8.3
90+
commands:
91+
- php -v
92+
- ./libraries/vendor/bin/phpunit --testsuite Integration
93+
8094
- name: php81-integration-pgsql
8195
depends_on: [ npm ]
8296
image: joomlaprojects/docker-images:php8.1
@@ -91,6 +105,13 @@ steps:
91105
- php -v
92106
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
93107

108+
- name: php83-integration-pgsql
109+
depends_on: [ npm ]
110+
image: joomlaprojects/docker-images:php8.3
111+
commands:
112+
- php -v
113+
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
114+
94115
- name: scss-cs
95116
depends_on: [ npm ]
96117
image: node:current-alpine
@@ -145,7 +166,7 @@ steps:
145166
- name: phpnext-system-mysql
146167
depends_on:
147168
- phpmax-system-mysql
148-
image: joomlaprojects/docker-images:cypress8.2
169+
image: joomlaprojects/docker-images:cypress8.3
149170
volumes:
150171
- name: cypress-cache
151172
path: /root/.cache/Cypress
@@ -184,7 +205,7 @@ steps:
184205
- name: phpnext-system-postgres
185206
depends_on:
186207
- phpmax-system-postgres
187-
image: joomlaprojects/docker-images:cypress8.2
208+
image: joomlaprojects/docker-images:cypress8.3
188209
volumes:
189210
- name: cypress-cache
190211
path: /root/.cache/Cypress
@@ -333,7 +354,7 @@ steps:
333354
- mkdir -p transfer
334355
- date +%s > transfer/$MINORVERSION-time.txt
335356
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
336-
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2 --disable-patch-packages
357+
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --disable-patch-packages
337358
- mv build/tmp/packages/* transfer/
338359

339360
- name: upload
@@ -382,6 +403,6 @@ trigger:
382403

383404
---
384405
kind: signature
385-
hmac: 5814cadc441b90eec51da0aa32cd29ff1014c4d759841cc70063b5e9245d2b08
406+
hmac: c1434b09300896f8627ccb11c92e97878caf7a303772db01a647dca53a92fa3f
386407

387408
...

.github/workflows/cacert-update.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/create-translation-pull-request-v4.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 0
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 16
31+
node-version: 20
3232

3333
- name: Fetch latest cms changes
3434
run: |
@@ -37,7 +37,7 @@ jobs:
3737
git remote add upstream https://github.com/joomla/joomla-cms.git
3838
git fetch upstream
3939
git checkout --progress --force -B translation refs/remotes/origin/translation
40-
git merge upstream/4.3-dev
40+
git merge upstream/4.4-dev
4141
4242
- name: Fetch and extract translations
4343
run: |
@@ -73,5 +73,5 @@ jobs:
7373
env:
7474
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
7575
run: |
76-
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
77-
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
76+
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
77+
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
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Create translation pull request
2+
3+
on:
4+
push:
5+
branches: [ translation ]
6+
7+
workflow_dispatch:
8+
9+
schedule:
10+
# Run daily at 7:32
11+
- cron: '32 7 * * *'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
permissions:
19+
contents: write # for Git to git push
20+
runs-on: ubuntu-latest
21+
# Only run this action the translation-bot repository in the translation branch
22+
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation5' }}
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
# We need the full depth to create / update the pull request against the main repo
27+
with:
28+
fetch-depth: 0
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: 20
32+
33+
- name: Fetch latest cms changes
34+
run: |
35+
git config user.name Translation Bot
36+
git config user.email [email protected]
37+
git remote add upstream https://github.com/joomla/joomla-cms.git
38+
git fetch upstream
39+
git checkout --progress --force -B translation5 refs/remotes/origin/translation5
40+
git merge upstream/5.0-dev
41+
42+
- name: Fetch and extract translations
43+
run: |
44+
cd ..
45+
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
46+
unzip main.zip
47+
48+
- name: Syncing directories
49+
# We use a simple copy paste syntax here if needed customization for different directories
50+
run: |
51+
cd ..
52+
SYNC_VERSION="v5"
53+
54+
SYNC_PATH="installation/language/"
55+
echo ${SYNC_PATH}
56+
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
57+
58+
- name: Update static error pages
59+
run: |
60+
npm ci --ignore-scripts && node build/build.js --build-pages
61+
62+
- name: Create commit
63+
continue-on-error: true
64+
run: |
65+
git config user.name Translation Bot
66+
git config user.email [email protected]
67+
git add .
68+
git commit -m "Language update"
69+
git push --force
70+
71+
- name: Create pull request
72+
if: ${{ success() }}
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
75+
run: |
76+
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
77+
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.0-dev

.php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
'@PSR12' => true,
7171
// Short array syntax
7272
'array_syntax' => ['syntax' => 'short'],
73-
// Lists should not have a trailing comma like list($foo, $bar,) = ...
74-
'no_trailing_comma_in_list_call' => true,
73+
// List of values separated by a comma is contained on a single line should not have a trailing comma like [$foo, $bar,] = ...
74+
'no_trailing_comma_in_singleline' => true,
7575
// Arrays on multiline should have a trailing comma
7676
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
7777
// Align elements in multiline array and variable declarations on new lines below each other

administrator/components/com_actionlogs/src/Field/UserlogtypeField.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
/**
2323
* Field to load a list of all users that have logged actions
2424
*
25-
* @since __DEPLOY_VERSION__
25+
* @since 5.1.0
2626
*/
2727
class UserlogtypeField extends ListField
2828
{
2929
/**
3030
* The form field type.
3131
*
3232
* @var string
33-
* @since __DEPLOY_VERSION__
33+
* @since 5.1.0
3434
*/
3535
protected $type = 'UserLogType';
3636

@@ -39,7 +39,7 @@ class UserlogtypeField extends ListField
3939
*
4040
* @return array The field option objects.
4141
*
42-
* @since __DEPLOY_VERSION__
42+
* @since 5.1.0
4343
*/
4444
public function getOptions()
4545
{

administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ public static function getHumanReadableLogMessage($log, $generateLinks = true)
198198
$messageData['type'] = Text::_($messageData['type']);
199199
}
200200

201+
// Remove links from the message template, if we should not generate links.
202+
if (!$generateLinks) {
203+
$message = preg_replace('/<a href=["\'].+?["\']>/', '', $message);
204+
$message = str_replace('</a>', '', $message);
205+
}
206+
201207
$linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? Route::TLS_FORCE : Route::TLS_IGNORE;
202208

203209
foreach ($messageData as $key => $value) {
@@ -324,6 +330,12 @@ public static function loadActionLogPluginsLanguage()
324330
// Load plg_system_actionlogs too
325331
$lang->load('plg_system_actionlogs', JPATH_ADMINISTRATOR);
326332

333+
// Load plg_system_privacyconsent too
334+
$lang->load('plg_system_privacyconsent', JPATH_ADMINISTRATOR);
335+
336+
// Load plg_user_terms too
337+
$lang->load('plg_user_terms', JPATH_ADMINISTRATOR);
338+
327339
// Load com_privacy too.
328340
$lang->load('com_privacy', JPATH_ADMINISTRATOR);
329341
}

administrator/components/com_actionlogs/src/Model/ActionlogModel.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ protected function sendNotificationEmails($messages, $username, $context)
151151
$lang->load('com_actionlogs', JPATH_ADMINISTRATOR);
152152
ActionlogsHelper::loadTranslationFiles($extension);
153153
$temp = [];
154+
$tempPlain = [];
154155

155156
foreach ($messages as $message) {
156157
$m = [];
@@ -159,14 +160,23 @@ protected function sendNotificationEmails($messages, $username, $context)
159160
$m['date'] = HTMLHelper::_('date', $message->log_date, 'Y-m-d H:i:s T', 'UTC');
160161
$m['username'] = $username;
161162
$temp[] = $m;
163+
164+
// copy replacement tags array and set non-HTML message.
165+
$mPlain = array_merge([], $m);
166+
$mPlain['message'] = ActionlogsHelper::getHumanReadableLogMessage($message, false);
167+
$tempPlain[] = $mPlain;
162168
}
163169

164170
$templateData = [
165171
'messages' => $temp,
166172
];
173+
$templateDataPlain = [
174+
'messages' => $tempPlain,
175+
];
167176

168177
$mailer = new MailTemplate('com_actionlogs.notification', $app->getLanguage()->getTag());
169178
$mailer->addTemplateData($templateData);
179+
$mailer->addTemplateData($templateDataPlain, true);
170180

171181
foreach ($recipients as $recipient) {
172182
$mailer->addRecipient($recipient);

0 commit comments

Comments
 (0)