Skip to content

Commit b8eb1b7

Browse files
authored
Merge branch '5.0-dev' into editors_dark_mode
2 parents 0069901 + 6eff78c commit b8eb1b7

File tree

16 files changed

+69
-50
lines changed

16 files changed

+69
-50
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ hosts:
4848
openldap: 127.0.0.1
4949

5050
services:
51-
- mysql
5251
- iis
5352

5453
before_test:
5554
# Run openldap docker image
5655
- ps: docker pull bitnami/openldap:2.6.3
5756
- ps: docker run --rm --name openldap --publish 1389:1389 --publish 1636:1636 -v ${pwd}\tests\certs:/certificates --env LDAP_ADMIN_USERNAME=admin --env LDAP_ADMIN_PASSWORD=adminpassword --env LDAP_USERS=customuser --env LDAP_PASSWORDS=custompassword --env LDAP_ENABLE_TLS=yes --env LDAP_TLS_CERT_FILE=/certificates/openldap.crt --env LDAP_TLS_KEY_FILE=/certificates/openldap.key --env LDAP_TLS_CA_FILE=/certificates/CA.crt --env BITNAMI_DEBUG=true --env LDAP_CONFIG_ADMIN_ENABLED=yes --env LDAP_CONFIG_ADMIN_USERNAME=admin --env LDAP_CONFIG_ADMIN_PASSWORD=configpassword -d bitnami/openldap:2.6.3
5857
# Database setup for MySQL via PowerShell tools
58+
- ps: Start-Service MySQL80
5959
- >
60-
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
60+
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
6161
# Wait till slapd has started
6262
- ps: |
6363
$Counter=0

.drone.yml

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -286,29 +286,39 @@ steps:
286286
- name: packager
287287
image: joomlaprojects/docker-images:packager
288288
environment:
289-
FTP_USERNAME:
290-
from_secret: ftpusername
291-
FTP_PASSWORD:
292-
from_secret: ftppassword
293-
FTP_HOSTNAME: ci.joomla.org
294-
FTP_PORT: "21"
295-
FTP_DEST_DIR: /artifacts
296-
FTP_VERIFY: "false"
297-
FTP_SECURE: "true"
298-
HTTP_ROOT: "https://ci.joomla.org/artifacts"
289+
HTTP_ROOT: "https://artifacts.joomla.org/drone"
299290
DRONE_PULL_REQUEST: DRONE_PULL_REQUEST
300291
DRONE_COMMIT: DRONE_COMMIT
292+
commands:
293+
- /bin/drone_prepare_package.sh
294+
295+
- name: upload
296+
image: joomlaprojects/docker-images:packager
297+
environment:
298+
package_key:
299+
from_secret: package_key
300+
package_user:
301+
from_secret: package_user
302+
package_host:
303+
from_secret: package_host
304+
package_root:
305+
from_secret: package_root
301306
GITHUB_TOKEN:
302307
from_secret: github_token
303308
commands:
304-
- if [ $DRONE_REPO_NAME != 'joomla-cms' ]; then echo "The packager only runs on the joomla/joomla-cms repo"; exit 0; fi
305-
- /bin/drone_build.sh
306-
volumes:
307-
- name: reference
308-
path: /reference
309-
when:
310-
repo:
311-
- joomla/joomla-cms
309+
- mkdir -p ~/.ssh
310+
- eval $(ssh-agent -s)
311+
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
312+
- echo "$package_key" > ~/.ssh/id_rsa
313+
- chmod 600 ~/.ssh/id_rsa
314+
- ssh-add
315+
- rclone config create package sftp host $package_host user $package_user port 22
316+
- rclone copy ./upload/ package:$package_root/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/downloads/$DRONE_BUILD_NUMBER
317+
- /bin/add_github_status.sh "Download" "Prebuilt packages are available for download." "https://artifacts.joomla.org/drone/${DRONE_REPO}/${DRONE_BRANCH}/${DRONE_PULL_REQUEST}/downloads/${DRONE_BUILD_NUMBER}"
318+
319+
trigger:
320+
repo:
321+
- joomla/joomla-cms
312322

313323
---
314324
kind: pipeline
@@ -335,8 +345,8 @@ steps:
335345
from_secret: nightly_user
336346
nightly_host:
337347
from_secret: nightly_host
338-
RINGCENTRAL_WEBHOOK:
339-
from_secret: notification_url
348+
MATTERMOST_NIGHTLY_HOOK:
349+
from_secret: mattermost_nightly_hook
340350
commands:
341351
- export MINORVERSION=${DRONE_BRANCH%-*}
342352
- mkdir -p ~/.ssh
@@ -349,20 +359,20 @@ steps:
349359
- rclone delete nightly:/home/devj/public_html/nightlies/ --include "Joomla_$MINORVERSION.*"
350360
- rclone delete nightly:/home/devj/public_html/cache/com_content/
351361
- rclone copy ./transfer/ nightly:/home/devj/public_html/nightlies/
352-
- /bin/notify
362+
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.0](https://developer.joomla.org/nightly-builds.html) successfully built."}' $MATTERMOST_NIGHTLY_HOOK
363+
353364

354365
- name: buildfailure
355366
image: joomlaprojects/docker-images:packager
356367
environment:
357-
RINGCENTRAL_WEBHOOK:
358-
from_secret: notification_url
368+
MATTERMOST_NIGHTLY_HOOK:
369+
from_secret: mattermost_nightly_hook
359370
commands:
360-
- /bin/notify
371+
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.0](https://developer.joomla.org/nightly-builds.html) FAILED to built."}' $MATTERMOST_NIGHTLY_HOOK
361372
when:
362373
status:
363374
- failure
364375

365-
366376
trigger:
367377
event:
368378
- cron
@@ -372,6 +382,6 @@ trigger:
372382

373383
---
374384
kind: signature
375-
hmac: 45b19b7430edc5ec922ef32c2f2dcb284c7cbf7ba55eb295ba4d877cee0fe5a4
385+
hmac: 16aad9229964700a46de8f3e3265147715d3d5c1173eec9439148af364d6092c
376386

377387
...

administrator/components/com_fields/src/Helper/FieldsHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,10 @@ function ($f) {
227227
]))->getArgument('result', []);
228228

229229
if (\is_array($value)) {
230-
$value = implode(' ', $value);
230+
$value = array_filter($value, function ($v) {
231+
return $v !== '' && $v !== null;
232+
});
233+
$value = $value ? implode(' ', $value) : '';
231234
}
232235

233236
/*

administrator/components/com_fields/src/Plugin/FieldsPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function prepareField(PrepareFieldEvent $event)
9292
{
9393
$result = $this->onCustomFieldsPrepareField($event->getContext(), $event->getItem(), $event->getField());
9494

95-
if ($result) {
95+
if ($result !== '' && $result !== null) {
9696
$event->addResult($result);
9797
}
9898
}

administrator/components/com_users/tmpl/users/modal.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
<form action="<?php echo Route::_('index.php?option=com_users&view=users&layout=modal&tmpl=component&groups=' . $input->get('groups', '', 'BASE64') . '&excluded=' . $input->get('excluded', '', 'BASE64')); ?>" method="post" name="adminForm" id="adminForm">
3434
<?php if (!$userRequired) : ?>
3535
<div>
36-
<button type="button" class="btn btn-primary button-select" data-user-value="0" data-user-name="<?php echo $this->escape(Text::_('JLIB_FORM_SELECT_USER')); ?>"
37-
data-user-field="<?php echo $this->escape($field); ?>"><?php echo Text::_('JOPTION_NO_USER'); ?></button>&nbsp;
36+
<button type="button" class="btn btn-primary button-select"
37+
data-content-select data-content-type="com_users.user" data-id="" data-name=""
38+
data-user-value="" data-user-name="" data-user-field="<?php echo $this->escape($field); ?>"><?php echo Text::_('JOPTION_NO_USER'); ?></button>&nbsp;
3839
</div>
3940
<?php endif; ?>
4041
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>

build/media_source/plg_editors_tinymce/js/plugins/joomla-highlighter/plugin.es6.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
33
* @license GNU General Public License version 2 or later; see LICENSE.txt
44
*/
5+
// @TODO: remove the specific conditional on plg_system_shortcut/js/shortcut.es6.js when this moves to JoomlaDialog
56
window.tinymce.PluginManager.add('joomlaHighlighter', (editor) => {
67
const setContent = (html) => {
78
editor.focus();

build/media_source/plg_editors_tinymce/js/tinymce.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Joomla.JoomlaTinyMCE = {
9494
editors.forEach((editor) => {
9595
const currentEditor = editor.querySelector('textarea');
9696
const toggleButton = editor.querySelector('.js-tiny-toggler-button');
97-
const toggleIcon = toggleButton.querySelector('.icon-eye');
97+
const toggleIcon = toggleButton ? toggleButton.querySelector('.icon-eye') : false;
9898

9999
// Set up the editor
100100
Joomla.JoomlaTinyMCE.setupEditor(currentEditor, pluginOptions);

build/media_source/plg_system_shortcut/js/shortcut.es6.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
if (target.type === 'checkbox') {
5050
return true;
5151
}
52+
53+
// Ignore TinyMCE joomlaHighlighter plugin,
54+
// @TODO: remove this when the joomlaHighlighter plugin will use JoomlaDialog
55+
if (target.classList.contains('tox-textarea-wrap') && target.closest('.joomla-highlighter-dialog')) {
56+
return false;
57+
}
58+
5259
// Default hotkeys filter behavior
5360
return !(target.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA');
5461
};

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"shepherd.js": "^11.2.0",
8282
"short-and-sweet": "^1.0.4",
8383
"skipto": "^4.1.7",
84-
"tinymce": "^6.7.0",
84+
"tinymce": "^6.7.1",
8585
"vue": "3.2.45",
8686
"vue-focus-lock": "^2.0.5",
8787
"vuex": "^4.1.0",

0 commit comments

Comments
 (0)