Skip to content

Commit 0c27736

Browse files
committed
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
2 parents 39ad071 + 2785134 commit 0c27736

File tree

29 files changed

+10232
-3732
lines changed

29 files changed

+10232
-3732
lines changed

administrator/components/com_admin/script.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5859,8 +5859,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
58595859
'/media/com_fields/js/admin-field-edit-modal.js',
58605860
'/media/com_fields/js/admin-field-edit-modal.min.js',
58615861
'/media/com_fields/js/admin-field-edit-modal.min.js.gz',
5862-
// 4.0 from RC 2 to RC 3
5862+
// 4.0 from RC 3 to RC 4
58635863
'/components/com_contact/layouts/joomla/form/renderfield.php',
5864+
'/libraries/src/Http/Transport/cacert.pem'
58645865
);
58655866

58665867
$folders = array(

administrator/components/com_categories/tmpl/category/edit.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Joomla\CMS\Language\Text;
1616
use Joomla\CMS\Layout\LayoutHelper;
1717
use Joomla\CMS\Router\Route;
18+
use Joomla\CMS\Workflow\WorkflowServiceInterface;
1819

1920
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
2021
$wa = $this->document->getWebAssetManager();
@@ -30,6 +31,17 @@
3031

3132
// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
3233
$this->ignore_fieldsets = ['jmetadata', 'item_associations'];
34+
35+
$c = Factory::getApplication()->bootComponent($this->state->get('category.extension'));
36+
37+
$wcontext = $c->getCategoryWorkflowContext($this->state->get('category.section'));
38+
39+
if (!$c instanceof WorkflowServiceInterface
40+
|| !$c->isWorkflowActive($wcontext))
41+
{
42+
$this->ignore_fieldsets[] = 'workflow';
43+
}
44+
3345
$this->useCoreUI = true;
3446

3547
// In case of modal

administrator/components/com_content/src/Extension/ContentComponent.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,22 @@ public function getWorkflowContexts(): array
195195
return $contexts;
196196
}
197197

198+
/**
199+
* Returns the workflow context based on the given category section
200+
*
201+
* @param string $section The section
202+
*
203+
* @return string|null
204+
*
205+
* @since __DEPLOY_VERSION__
206+
*/
207+
public function getCategoryWorkflowContext(?string $section = null): string
208+
{
209+
$context = $this->getWorkflowContexts();
210+
211+
return array_key_first($context);
212+
}
213+
198214
/**
199215
* Returns the table for the count items functions for the given section.
200216
*

administrator/components/com_content/src/Helper/ContentHelper.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Joomla\CMS\Form\Form;
1616
use Joomla\CMS\Language\Text;
1717
use Joomla\CMS\Table\Category;
18+
use Joomla\CMS\Workflow\WorkflowServiceInterface;
1819
use Joomla\Database\ParameterType;
1920
use Joomla\Registry\Registry;
2021

@@ -97,6 +98,16 @@ public static function onPrepareForm(Form $form, $data)
9798

9899
$form->setFieldAttribute('workflow_id', 'default', 'inherit');
99100

101+
$component = Factory::getApplication()->bootComponent('com_content');
102+
103+
if (!$component instanceof WorkflowServiceInterface
104+
|| !$component->isWorkflowActive('com_content.article'))
105+
{
106+
$form->removeField('workflow_id', 'params');
107+
108+
return;
109+
}
110+
100111
$query = $db->getQuery(true);
101112

102113
$query->select($db->quoteName('title'))

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,10 @@ public function getNonCoreExtensions()
13311331
foreach ($rows as $extension)
13321332
{
13331333
$decode = json_decode($extension->manifest_cache);
1334+
1335+
// Removed description so that CDATA content does not cause javascript error during pre-update check
1336+
$decode->description = '';
1337+
13341338
$this->translateExtensionName($extension);
13351339
$extension->version
13361340
= isset($decode->version) ? $decode->version : Text::_('COM_JOOMLAUPDATE_PREUPDATE_UNKNOWN_EXTENSION_MANIFESTCACHE_VERSION');
@@ -1348,7 +1352,7 @@ public function getNonCoreExtensions()
13481352
*
13491353
* @return array name,version,updateserver
13501354
*
1351-
* @since 4.0.0
1355+
* @since 3.10.0
13521356
*/
13531357
public function getNonCorePlugins($folderFilter = array())
13541358
{
@@ -1387,6 +1391,10 @@ public function getNonCorePlugins($folderFilter = array())
13871391
foreach ($rows as $plugin)
13881392
{
13891393
$decode = json_decode($plugin->manifest_cache);
1394+
1395+
// Removed description so that CDATA content does not cause javascript error during pre-update check
1396+
$decode->description = '';
1397+
13901398
$this->translateExtensionName($plugin);
13911399
$plugin->version = $decode->version ?? Text::_('COM_JOOMLAUPDATE_PREUPDATE_UNKNOWN_EXTENSION_MANIFESTCACHE_VERSION');
13921400
unset($plugin->manifest_cache);

administrator/components/com_languages/tmpl/overrides/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<?php endif; ?>
8484
</th>
8585
<td class="d-none d-md-table-cell">
86-
<span id="string[<?php echo $this->escape($key); ?>]"><?php echo $this->escape($text); ?></span>
86+
<span id="string[<?php echo $this->escape($key); ?>]"><?php echo HTMLHelper::_('string.truncate', $this->escape($text), 200); ?></span>
8787
</td>
8888
<td class="d-none d-md-table-cell">
8989
<?php echo $language; ?>

administrator/components/com_media/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
label="COM_MEDIA_FIELD_RESTRICT_UPLOADS_EXTENSIONS_LABEL"
5555
description="COM_MEDIA_FIELD_RESTRICT_UPLOADS_EXTENSIONS_DESC"
5656
size="50"
57-
default="bmp,gif,jpg,jpeg,png,ico,mp3,mp4,odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,csv"
57+
default="bmp,gif,jpg,jpeg,png,webp,ico,mp3,mp4,odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,csv"
5858
showon="restrict_uploads:1"
5959
/>
6060

administrator/components/com_media/resources/scripts/components/browser/items/row.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
}
7272
7373
// @todo remove the hardcoded extensions here
74-
const extensionWithPreview = ['jpg', 'jpeg', 'png', 'gif', 'mp4', 'mp3', 'pdf'];
74+
const extensionWithPreview = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'mp4', 'mp3', 'pdf'];
7575
7676
// Show preview
7777
if (this.item.extension

administrator/components/com_menus/presets/help.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<menuitem
1414
title="MOD_MENU_HELP_JOOMLA"
1515
type="component"
16+
element="com_admin"
1617
link="index.php?option=com_admin&amp;view=help"
1718
/>
1819
</menuitem>
@@ -40,6 +41,7 @@
4041
<menuitem
4142
title="MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM"
4243
type="component"
44+
element="com_admin"
4345
target="_blank"
4446
link="index.php?option=com_admin&amp;view=help&amp;layout=langforum"
4547
/>

administrator/components/com_menus/tmpl/item/edit.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,6 @@
133133
$this->form->setFieldAttribute('publish_up', 'showon', '');
134134
$this->form->setFieldAttribute('publish_down', 'showon', '');
135135
}
136-
137-
if (!$isModal && $this->item->type == 'container')
138-
{
139-
echo $this->loadTemplate('container');
140-
}
141136
?>
142137
<?php
143138
// Set main fields.

0 commit comments

Comments
 (0)