Skip to content

Commit b53a840

Browse files
committed
Merge remote-tracking branch 'upstream/5.3-dev' into 5.4-dev-upmerge-2025-03-16
2 parents ec9034a + adc9f2d commit b53a840

File tree

89 files changed

+753
-659
lines changed

Some content is hidden

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

89 files changed

+753
-659
lines changed

.drone.yml

Lines changed: 26 additions & 44 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.3
9+
image: joomlaprojects/docker-images:php8.4
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.3
17+
image: joomlaprojects/docker-images:php8.4
1818
volumes:
1919
- name: composer-cache
2020
path: /tmp/composer-cache
@@ -70,6 +70,13 @@ steps:
7070
- php -v
7171
- ./libraries/vendor/bin/phpunit --testsuite Unit
7272

73+
- name: php84-unit
74+
depends_on: [ phpcs ]
75+
image: joomlaprojects/docker-images:php8.4
76+
commands:
77+
- php -v
78+
- ./libraries/vendor/bin/phpunit --testsuite Unit
79+
7380
- name: php81-integration
7481
depends_on: [ npm ]
7582
image: joomlaprojects/docker-images:php8.1
@@ -91,6 +98,13 @@ steps:
9198
- php -v
9299
- ./libraries/vendor/bin/phpunit --testsuite Integration
93100

101+
- name: php84-integration
102+
depends_on: [ npm ]
103+
image: joomlaprojects/docker-images:php8.4
104+
commands:
105+
- php -v
106+
- ./libraries/vendor/bin/phpunit --testsuite Integration
107+
94108
- name: php81-integration-pgsql
95109
depends_on: [ npm ]
96110
image: joomlaprojects/docker-images:php8.1
@@ -112,6 +126,13 @@ steps:
112126
- php -v
113127
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
114128

129+
- name: php84-integration-pgsql
130+
depends_on: [ npm ]
131+
image: joomlaprojects/docker-images:php8.4
132+
commands:
133+
- php -v
134+
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
135+
115136
- name: scss-cs
116137
depends_on: [ npm ]
117138
image: node:current-alpine
@@ -154,7 +175,7 @@ steps:
154175
- name: phpmax-system-mysql
155176
depends_on:
156177
- phpmin-system-mysql
157-
image: joomlaprojects/docker-images:cypress8.3
178+
image: joomlaprojects/docker-images:cypress8.4
158179
volumes:
159180
- name: cypress-cache
160181
path: /root/.cache/Cypress
@@ -167,24 +188,6 @@ steps:
167188
exclude:
168189
- pull_request
169190

170-
- name: phpnext-system-mysql
171-
depends_on:
172-
- phpmax-system-mysql
173-
image: joomlaprojects/docker-images:cypress8.4
174-
volumes:
175-
- name: cypress-cache
176-
path: /root/.cache/Cypress
177-
environment:
178-
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
179-
failure: ignore
180-
commands:
181-
- echo "This test is disabled because php next is not stable yet"
182-
- exit 1
183-
- bash tests/System/entrypoint.sh "$(pwd)" cmysqlnext mysqli mysql
184-
when:
185-
event:
186-
exclude:
187-
- pull_request
188191

189192
- name: phpmin-system-postgres
190193
depends_on:
@@ -205,39 +208,18 @@ steps:
205208
- name: phpmax-system-postgres
206209
depends_on:
207210
- phpmin-system-postgres
208-
image: joomlaprojects/docker-images:cypress8.3
209-
volumes:
210-
- name: cypress-cache
211-
path: /root/.cache/Cypress
212-
environment:
213-
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
214-
commands:
215-
- bash tests/System/entrypoint.sh "$(pwd)" cpostgresmax pgsql postgres
216-
217-
- name: phpnext-system-postgres
218-
depends_on:
219-
- phpmax-system-postgres
220211
image: joomlaprojects/docker-images:cypress8.4
221212
volumes:
222213
- name: cypress-cache
223214
path: /root/.cache/Cypress
224215
environment:
225216
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
226-
failure: ignore
227217
commands:
228-
- echo "This test is disabled because php next is not stable yet"
229-
- exit 1
230-
- bash tests/System/entrypoint.sh "$(pwd)" cpostgresnext pgsql postgres
231-
when:
232-
event:
233-
exclude:
234-
- pull_request
218+
- bash tests/System/entrypoint.sh "$(pwd)" cpostgresmax pgsql postgres
235219

236220
- name: artifacts-system-tests
237221
image: joomlaprojects/docker-images:packager
238222
depends_on:
239-
- phpnext-system-mysql
240-
- phpnext-system-postgres
241223
- phpmax-system-mysql
242224
- phpmax-system-postgres
243225
- phpmin-system-mysql
@@ -433,6 +415,6 @@ trigger:
433415

434416
---
435417
kind: signature
436-
hmac: fedcefde305c98f4dfc926b9039f83692827337da9e689e423c9de93a97248dd
418+
hmac: 99da78521b10f37ddf6731e695fe52f85ee3db142bccac66901ae5372e332aae
437419

438420
...
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- disable autostart for the previous tour
2+
UPDATE `#__guidedtours` SET `autostart` = 0 WHERE `uid` = 'joomla-whatsnew-5-2';
3+
4+
INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES
5+
('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-3', 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0);
6+
7+
INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`)
8+
SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '"{\"required\":1,\"requiredvalue\":\"\"}"', MAX(`id`), CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0
9+
FROM `#__guidedtours`
10+
WHERE `uid` = 'joomla-whatsnew-5-3';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-- disable autostart for the previous tour
2+
UPDATE "#__guidedtours" SET "autostart" = 0 WHERE "uid" = 'joomla-whatsnew-5-2';
3+
4+
INSERT INTO "#__guidedtours" ("title", "description", "extensions", "url", "published", "language", "note", "access", "uid", "autostart", "created", "created_by", "modified", "modified_by") VALUES
5+
('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-3', 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0);
6+
7+
INSERT INTO "#__guidedtour_steps" ("title", "description", "position", "target", "type", "interactive_type", "url", "published", "language", "note", "params", "tour_id", "created", "created_by", "modified", "modified_by")
8+
SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_3_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '"{\"required\":1,\"requiredvalue\":\"\"}"', MAX("id"), CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0
9+
FROM "#__guidedtours"
10+
WHERE "uid" = 'joomla-whatsnew-5-3';

administrator/components/com_categories/src/Field/CategoryeditField.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,13 @@ protected function getOptions()
152152
// Let's get the id for the current item, either category or content item.
153153
$jinput = Factory::getApplication()->getInput();
154154

155+
// Is this field used to select parent category for a category ?
156+
$isParentCategoryField = isset($this->element['parent']) || $jinput->getCmd('option') === 'com_categories';
157+
155158
// Load the category options for a given extension.
156159

157160
// For categories the old category is the category id or 0 for new category.
158-
if ($this->element['parent'] || $jinput->get('option') == 'com_categories') {
161+
if ($isParentCategoryField) {
159162
$oldCat = $jinput->get('id', 0);
160163
$oldParent = $this->form->getValue($name, 0);
161164
$extension = $this->element['extension'] ? (string) $this->element['extension'] : (string) $jinput->get('extension', 'com_content');
@@ -186,7 +189,7 @@ protected function getOptions()
186189
->from($db->quoteName('#__categories', 'a'));
187190

188191
// Filter by the extension type
189-
if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') {
192+
if ($isParentCategoryField) {
190193
$query->where('(' . $db->quoteName('a.extension') . ' = :extension OR ' . $db->quoteName('a.parent_id') . ' = 0)')
191194
->bind(':extension', $extension);
192195
} else {
@@ -195,7 +198,7 @@ protected function getOptions()
195198
}
196199

197200
// Filter language
198-
if (!empty($this->element['language'])) {
201+
if (isset($this->element['language'])) {
199202
if (str_contains($this->element['language'], ',')) {
200203
$language = explode(',', $this->element['language']);
201204
} else {
@@ -219,7 +222,7 @@ protected function getOptions()
219222
$query->order($db->quoteName('a.lft') . ' ASC');
220223

221224
// If parent isn't explicitly stated but we are in com_categories assume we want parents
222-
if ($oldCat != 0 && ($this->element['parent'] == true || $jinput->get('option') == 'com_categories')) {
225+
if ($oldCat != 0 && $isParentCategoryField) {
223226
// Prevent parenting to children of this item.
224227
// To rearrange parents and children move the children up, not the parents down.
225228
$query->join(
@@ -244,10 +247,8 @@ protected function getOptions()
244247
// Pad the option text with spaces using depth level as a multiplier.
245248
foreach ($options as $option) {
246249
// Translate ROOT
247-
if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') {
248-
if ($option->level == 0) {
249-
$option->text = Text::_('JGLOBAL_ROOT_PARENT');
250-
}
250+
if ($isParentCategoryField && $option->level == 0) {
251+
$option->text = Text::_('JGLOBAL_ROOT_PARENT');
251252
}
252253

253254
if ($option->published == 1) {
@@ -311,7 +312,7 @@ protected function getOptions()
311312
}
312313

313314
if (
314-
$oldCat != 0 && ($this->element['parent'] == true || $jinput->get('option') == 'com_categories')
315+
$oldCat != 0 && $isParentCategoryField
315316
&& !isset($options[0])
316317
&& isset($this->element['show_root'])
317318
) {

administrator/components/com_config/src/Model/ApplicationModel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,10 @@ public function save($data)
745745
$config = new Registry($data);
746746

747747
// Overwrite webservices cors settings
748-
$app->set('cors', $data['cors']);
749-
$app->set('cors_allow_origin', $data['cors_allow_origin']);
750-
$app->set('cors_allow_headers', $data['cors_allow_headers']);
751-
$app->set('cors_allow_methods', $data['cors_allow_methods']);
748+
$app->set('cors', $data['cors'] ?? 0);
749+
$app->set('cors_allow_origin', $data['cors_allow_origin'] ?? '*');
750+
$app->set('cors_allow_headers', $data['cors_allow_headers'] ?? 'Content-Type,X-Joomla-Token');
751+
$app->set('cors_allow_methods', $data['cors_allow_methods'] ?? '');
752752

753753
// Clear cache of com_config component.
754754
$this->cleanCache('_system');

administrator/components/com_tags/src/Model/TagsModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function getItems()
276276
$items = parent::getItems();
277277

278278
if ($items != false) {
279-
$extension = $this->getState('filter.extension');
279+
$extension = $this->getState('filter.extension', '');
280280

281281
$this->countItems($items, $extension);
282282
}

0 commit comments

Comments
 (0)