Skip to content

Commit 5e4e23a

Browse files
committed
Merge remote-tracking branch 'upstream/4.4-dev' into 5.0-dev
# Conflicts: # administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
2 parents 4f3f280 + f8ab092 commit 5e4e23a

File tree

98 files changed

+931
-150
lines changed

Some content is hidden

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

98 files changed

+931
-150
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ If it is a PR, include what the issue is, what the PR is addressing, testing ins
1414
Please be patient as not all items will be tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.
1515

1616
#### Branches
17-
PRs should usually be made to the `4.2-dev` branch as this contains the most recent version of the code.
17+
PRs should usually be made to the `4.3-dev` branch as this contains the most recent version of the code.
1818
There are other branches available which serve specific purposes.
1919

2020
| Branch | Purpose |
2121
| ------ | ------- |
2222
| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will now only include security patches. |
23-
| 4.2-dev | Branch for the current minor Joomla version.|
24-
| 4.3-dev | Branch for the next minor Joomla version. New features go into this branch. Commits to 4.2-dev will be applied to this branch as well. |
25-
| 5.0-dev | Branch for the next major Joomla version. |
23+
| 4.3-dev | Branch for the current minor Joomla version.|
24+
| 4.4-dev | Branch for the next minor Joomla version. Commits to 4.3-dev will be applied to this branch as well. |
25+
| 5.0-dev | Branch for the next major Joomla version. New features go into this branch. |

administrator/components/com_content/forms/filter_featured.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
label="JOPTION_SELECT_STAGE"
1717
class="js-select-submit-on-change"
1818
activeonly="true"
19-
extension="com_content"
19+
extension="com_content.article"
2020
>
2121
<option value="">JOPTION_SELECT_STAGE</option>
2222
</field>

administrator/components/com_fields/src/Model/GroupModel.php

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -240,29 +240,30 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
240240

241241
$parts = FieldsHelper::extract($this->state->get('filter.context'));
242242

243+
// If we don't have a valid context then return early
244+
if (!$parts) {
245+
return;
246+
}
247+
243248
// Extract the component name
244249
$component = $parts[0];
245250

246-
// Extract the optional section name
247-
$section = (count($parts) > 1) ? $parts[1] : null;
251+
// Extract the section name
252+
$section = $parts[1];
248253

249-
if ($parts) {
250-
// Set the access control rules field component value.
251-
$form->setFieldAttribute('rules', 'component', $component);
252-
}
254+
// Set the access control rules field component value.
255+
$form->setFieldAttribute('rules', 'component', $component);
253256

254-
if ($section !== null) {
255-
// Looking first in the component models/forms folder
256-
$path = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fieldgroup/' . $section . '.xml');
257+
// Looking first in the component models/forms folder
258+
$path = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fieldgroup/' . $section . '.xml');
257259

258-
if (file_exists($path)) {
259-
$lang = Factory::getLanguage();
260-
$lang->load($component, JPATH_BASE);
261-
$lang->load($component, JPATH_BASE . '/components/' . $component);
260+
if (file_exists($path)) {
261+
$lang = Factory::getLanguage();
262+
$lang->load($component, JPATH_BASE);
263+
$lang->load($component, JPATH_BASE . '/components/' . $component);
262264

263-
if (!$form->loadFile($path, false)) {
264-
throw new \Exception(Text::_('JERROR_LOADFILE_FAILED'));
265-
}
265+
if (!$form->loadFile($path, false)) {
266+
throw new \Exception(Text::_('JERROR_LOADFILE_FAILED'));
266267
}
267268
}
268269
}

administrator/components/com_fields/tmpl/fields/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
<?php // load the pagination. ?>
199199
<?php echo $this->pagination->getListFooter(); ?>
200200

201-
<?php //Load the batch processing form. ?>
201+
<?php // Load the batch processing form. ?>
202202
<?php
203203
if (
204204
$user->authorise('core.create', $component)

administrator/components/com_fields/tmpl/groups/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<?php // load the pagination. ?>
167167
<?php echo $this->pagination->getListFooter(); ?>
168168

169-
<?php //Load the batch processing form. ?>
169+
<?php // Load the batch processing form. ?>
170170
<?php
171171
if (
172172
$user->authorise('core.create', $component)

administrator/components/com_joomlaupdate/src/Model/UpdateModel.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,11 @@ protected function downloadPackage($url, $target)
494494
return false;
495495
}
496496

497+
// Fix Indirect Modification of Overloaded Property
498+
$body = $result->body;
499+
497500
// Write the file to disk
498-
$result = File::write($target, $result->body);
501+
$result = File::write($target, $body);
499502

500503
if (!$result) {
501504
return false;

administrator/components/com_templates/src/Model/TemplateModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ public function save($data)
959959
$data['source'] = str_replace(["\r\n", "\r"], "\n", $data['source']);
960960

961961
// If the asset file for the template ensure we have valid template so we don't instantly destroy it
962-
if ($fileName === '/joomla.asset.json' && json_decode($data['source']) === null) {
962+
if (str_ends_with($fileName, '/joomla.asset.json') && json_decode($data['source']) === null) {
963963
$this->setError(Text::_('COM_TEMPLATES_ERROR_ASSET_FILE_INVALID_JSON'));
964964

965965
return false;

administrator/modules/mod_guidedtours/tmpl/default.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
->getWebAssetManager()
2626
->useScript('bootstrap.dropdown');
2727

28-
$lang = $app->getLanguage();
29-
30-
$extension = $app->getInput()->get('option');
31-
32-
$listTours = [];
33-
$allTours = [];
28+
$lang = $app->getLanguage();
29+
$extension = $app->getInput()->get('option');
30+
$listTours = [];
31+
$allTours = [];
32+
$toursCount = $params->get('tourscount', 7);
3433

3534
foreach ($tours as $tour) :
36-
if (count(array_intersect(['*', $extension], $tour->extensions))) :
35+
if ($toursCount > 0 && count(array_intersect(['*', $extension], $tour->extensions))) :
3736
$listTours[] = $tour;
37+
$toursCount--;
3838
endif;
3939

4040
$uri = new Uri($tour->url);
@@ -64,10 +64,7 @@
6464
<span class="icon-angle-down" aria-hidden="true"></span>
6565
</button>
6666
<div class="dropdown-menu dropdown-menu-end">
67-
<?php foreach ($listTours as $i => $tour) : ?>
68-
<?php if ($i >= $params->get('tourscount', 7)) : ?>
69-
<?php break; ?>
70-
<?php endif; ?>
67+
<?php foreach ($listTours as $tour) : ?>
7168
<button type="button" class="button-start-guidedtour dropdown-item" data-id="<?php echo $tour->id ?>">
7269
<span class="icon-map-signs" aria-hidden="true"></span>
7370
<?php echo $tour->title; ?>

administrator/templates/atum/component.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,21 @@
1919
// Get the hue value
2020
preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches);
2121

22+
$linkColor = $this->params->get('link-color', '#2a69b8');
23+
list($r, $g, $b) = sscanf($linkColor, "#%02x%02x%02x");
24+
2225
// Enable assets
2326
$wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
2427
->useStyle('template.active.language')
2528
->useStyle('template.user')
2629
->addInlineStyle(':root {
2730
--hue: ' . $matches[1] . ';
28-
--template-bg-light: ' . $this->params->get('bg-light', '--template-bg-light') . ';
29-
--template-text-dark: ' . $this->params->get('text-dark', '--template-text-dark') . ';
30-
--template-text-light: ' . $this->params->get('text-light', '--template-text-light') . ';
31-
--template-link-color: ' . $this->params->get('link-color', '--template-link-color') . ';
32-
--template-special-color: ' . $this->params->get('special-color', '--template-special-color') . ';
31+
--template-bg-light: ' . $this->params->get('bg-light', 'var(--template-bg-light)') . ';
32+
--template-text-dark: ' . $this->params->get('text-dark', 'var(--template-text-dark)') . ';
33+
--template-text-light: ' . $this->params->get('text-light', 'var(--template-text-light)') . ';
34+
--link-color: ' . $linkColor . ';
35+
--link-color-rgb: ' . $r . ',' . $g . ',' . $b . ';
36+
--template-special-color: ' . $this->params->get('special-color', 'var(--template-special-color)') . ';
3337
}');
3438

3539
// No template.js for modals

administrator/templates/atum/error_full.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
// Get the hue value
5555
preg_match('#^hsla?\(([0-9]+)[\D]+([0-9]+)[\D]+([0-9]+)[\D]+([0-9](?:.\d+)?)?\)$#i', $this->params->get('hue', 'hsl(214, 63%, 20%)'), $matches);
5656

57+
$linkColor = $this->params->get('link-color', '#2a69b8');
58+
list($r, $g, $b) = sscanf($linkColor, "#%02x%02x%02x");
59+
5760
// Enable assets
5861
$wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
5962
->useStyle('template.active.language')
@@ -63,7 +66,8 @@
6366
--template-bg-light: ' . $this->params->get('bg-light', '#f0f4fb') . ';
6467
--template-text-dark: ' . $this->params->get('text-dark', '#495057') . ';
6568
--template-text-light: ' . $this->params->get('text-light', '#ffffff') . ';
66-
--template-link-color: ' . $this->params->get('link-color', '#2a69b8') . ';
69+
--link-color: ' . $linkColor . ';
70+
--link-color-rgb: ' . $r . ',' . $g . ',' . $b . ';
6771
--template-special-color: ' . $this->params->get('special-color', '#001B4C') . ';
6872
}');
6973

0 commit comments

Comments
 (0)