Skip to content

Commit

Permalink
Merge branch '5.0-dev' into dark-switch
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed Dec 12, 2023
2 parents 06b78cd + bce01c4 commit fab15ba
Show file tree
Hide file tree
Showing 91 changed files with 889 additions and 1,345 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
- ./libraries/vendor/bin/phan

- name: npm
image: node:18-bullseye-slim
image: node:20-bullseye-slim
depends_on: [ phpcs ]
volumes:
- name: npm-cache
Expand Down Expand Up @@ -382,6 +382,6 @@ trigger:

---
kind: signature
hmac: 16aad9229964700a46de8f3e3265147715d3d5c1173eec9439148af364d6092c
hmac: 250f08652884d60218c5b280b139d3ff05c068d010791d159993cf87ecbbac0f

...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
|------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=5.0-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/5.0-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V8.1.0-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V18.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v9.6.7-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=5.0-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/5.0-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V8.1.0-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V20.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v10.1.0-green)](https://nodejs.org/en/) |

Overview
---------------------
Expand Down
4 changes: 4 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,10 @@ public function updateAssets($installer)
// List all components added since 4.0
$newComponents = [
// Components to be added here
'com_guidedtours',
'com_mails',
'com_scheduler',
'com_workflow',
];

foreach ($newComponents as $component) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected function addToolbar()

$childBar = $dropdown->getChildToolbar();

if (\count($this->transitions)) {
if ($canDo->get('core.execute.transition') && \count($this->transitions)) {
$childBar->separatorButton('transition-headline')
->text('COM_CONTENT_RUN_TRANSITIONS')
->buttonClass('text-center py-2 h3');
Expand Down
48 changes: 28 additions & 20 deletions administrator/components/com_content/tmpl/articles/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,39 @@
endif; ?>>
<?php foreach ($this->items as $i => $item) :
$item->max_ordering = 0;
$canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id);
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out);
$canEditOwn = $user->authorise('core.edit.own', 'com_content.article.' . $item->id) && $item->created_by == $userId;
$canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin;
$canEditCat = $user->authorise('core.edit', 'com_content.category.' . $item->catid);
$canEditOwnCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->catid) && $item->category_uid == $userId;
$canEditParCat = $user->authorise('core.edit', 'com_content.category.' . $item->parent_category_id);
$canEditOwnParCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->parent_category_id) && $item->parent_category_uid == $userId;
$canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id);
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out);
$canEditOwn = $user->authorise('core.edit.own', 'com_content.article.' . $item->id) && $item->created_by == $userId;
$canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin;
$canExecuteTransition = $user->authorise('core.execute.transition', 'com_content.article.' . $item->id);
$canEditCat = $user->authorise('core.edit', 'com_content.category.' . $item->catid);
$canEditOwnCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->catid) && $item->category_uid == $userId;
$canEditParCat = $user->authorise('core.edit', 'com_content.category.' . $item->parent_category_id);
$canEditOwnParCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->parent_category_id) && $item->parent_category_uid == $userId;

$transitions = ContentHelper::filterTransitions($this->transitions, (int) $item->stage_id, (int) $item->workflow_id);
// Transition button options
$options = [
'title' => Text::_($item->stage_title),
'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)),
'id' => 'workflow-' . $item->id,
'task' => 'articles.runTransition',
'disabled' => !$canExecuteTransition,
];

$transition_ids = ArrayHelper::getColumn($transitions, 'value');
$transition_ids = ArrayHelper::toInteger($transition_ids);
if ($canExecuteTransition) {
$transitions = ContentHelper::filterTransitions($this->transitions, (int) $item->stage_id, (int) $item->workflow_id);

$transition_ids = ArrayHelper::getColumn($transitions, 'value');
$transition_ids = ArrayHelper::toInteger($transition_ids);

$dataTransitionsAttribute = 'data-transitions="' . implode(',', $transition_ids) . '"';

$options = array_merge($options, ['transitions' => $transitions]);
}

?>
<tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->catid; ?>"
data-transitions="<?php echo implode(',', $transition_ids); ?>"
<?php echo $dataTransitionsAttribute ?? '' ?>
>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?>
Expand All @@ -192,14 +208,6 @@
<?php if ($workflow_enabled) : ?>
<td class="article-stage text-center">
<?php
$options = [
'transitions' => $transitions,
'title' => Text::_($item->stage_title),
'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)),
'id' => 'workflow-' . $item->id,
'task' => 'articles.runTransition'
];

echo (new TransitionButton($options))
->render(0, $i);
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
-2 => 'icon-trash',
0 => 'icon-times',
1 => 'icon-check',
2 => 'icon-archive',
];
?>
<?php foreach ($this->items as $i => $item) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<?php endif; ?>
</td>
<td class="d-none d-md-table-cell">
<?php echo htmlspecialchars($item->editor); ?>
<?php echo empty($item->editor) ? $item->editor_user_id : htmlspecialchars($item->editor); ?>
</td>
<td class="text-end">
<?php echo number_format((int) $item->character_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ function ($f) {
]))->getArgument('result', []);

if (\is_array($value)) {
$value = implode(' ', $value);
$value = array_filter($value, function ($v) {
return $v !== '' && $v !== null;
});
$value = $value ? implode(' ', $value) : '';
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function prepareField(PrepareFieldEvent $event)
{
$result = $this->onCustomFieldsPrepareField($event->getContext(), $event->getItem(), $event->getField());

if ($result) {
if ($result !== '' && $result !== null) {
$event->addResult($result);
}
}
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_finder/src/Indexer/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ public function parse($input)
// Find the last space character if we aren't at the end.
$ls = (($start + $chunk) < $end ? strrpos($string, ' ') : false);

// Truncate to the last space character.
// Truncate to the last space character (but include it in the string).
if ($ls !== false) {
$string = substr($string, 0, $ls);
$string = substr($string, 0, $ls + 1);
}

// Adjust the start position for the next iteration.
$start += ($ls !== false ? ($ls + 1 - $chunk) + $chunk : $chunk);
$start += $ls !== false ? $ls + 1 : $chunk;

// Parse the chunk.
$return .= $this->process($string);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function update()
$redirect_url = $app->getUserState('com_installer.redirect_url');

// Don't redirect to an external URL.
if (!Uri::isInternal($redirect_url)) {
if ($redirect_url && !Uri::isInternal($redirect_url)) {
$redirect_url = '';
}

Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_media/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
type="textarea"
label="COM_MEDIA_FIELD_RESTRICT_UPLOADS_EXTENSIONS_LABEL"
description="COM_MEDIA_FIELD_RESTRICT_UPLOADS_EXTENSIONS_DESC"
default="bmp,gif,jpg,jpeg,png,webp,avif,ico,mp3,mp4,odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,csv"
default="bmp,gif,jpg,jpeg,png,webp,avif,ico,mp3,mp4,odg,odp,ods,odt,pdf,ppt,txt,xcf,xls,csv"
showon="restrict_uploads:1"
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function getCurrentPath() {
return defaultDisk.drives[0].root;
}

// Session missmatch
// Session mismatch
setSession(path);
return path;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function delete($pk = null)
$isDefault = $db->setQuery($query)->loadResult();

if ($isDefault) {
$app->enqueueMessage(Text::_('COM_WORKFLOW_MSG_DELETE_DEFAULT'), 'error');
$app->enqueueMessage(Text::_('COM_WORKFLOW_MSG_DELETE_IS_DEFAULT'), 'error');

return false;
}
Expand Down
1 change: 1 addition & 0 deletions administrator/language/en-GB/com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ COM_USERS_MAIL_NO_USERS_COULD_BE_FOUND_IN_THIS_GROUP="No users could be found in
COM_USERS_MAIL_ONLY_YOU_COULD_BE_FOUND_IN_THIS_GROUP="You are the only user in this group."
COM_USERS_MAIL_PASSWORD_RESET_DESC="Sent to a user by the &quot;Forgot your password?&quot; link eg in a login form."
COM_USERS_MAIL_PASSWORD_RESET_TITLE="Users: Password Reset"
COM_USERS_MAIL_PLEASE_FILL_IN_THE_FORM_CORRECTLY="Please fill in the form correctly."
COM_USERS_MAIL_REGISTRATION_ADMIN_NEW_NOTIFICATION_DESC="Notification to the admin that a new, activated account has been created."
COM_USERS_MAIL_REGISTRATION_ADMIN_NEW_NOTIFICATION_TITLE="Users: New account notification to admin"
COM_USERS_MAIL_REGISTRATION_ADMIN_VERIFICATION_REQUEST_DESC="Notification to admins to verify a new, verified account."
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<extension client="administrator" type="language" method="upgrade">
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>5.0.1</version>
<creationDate>2023-10</creationDate>
<version>5.0.2</version>
<creationDate>2023-11</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="administrator">
<name>English (en-GB)</name>
<version>5.0.1</version>
<creationDate>2023-10</creationDate>
<version>5.0.2</version>
<creationDate>2023-11</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/mod_menu.ini
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MOD_MENU_HELP_SECURITY="Security Centre"
MOD_MENU_HELP_SHOP="Joomla! Shop"
MOD_MENU_HELP_SUPPORT_CUSTOM_FORUM="Custom Support Forum" ; Will be used if the localised sample data has a URL for the desired community forum or if the 'Custom Support Forum' field parameter in the Administrator Menu module has a URL
MOD_MENU_HELP_SUPPORT_OFFICIAL_FORUM="Official Support Forum"
MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM="Official Language Forums" ; If you have displayed the specific language forum, use something like "Official French Forum" in your language.
MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM="Official Language Forums" ; If you have displayed the specific language forum, use something like 'Official French Forum' in your language.
MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE="511" ; The # of the specific language forum in https://forum.joomla.org/ (example: 19 for French). Default is '511' which is the section for all languages forums.
MOD_MENU_HELP_TRANSLATIONS="Joomla! Translations"
MOD_MENU_HELP_USER_GROUPS="Joomla User Groups"
Expand Down
2 changes: 2 additions & 0 deletions administrator/language/en-GB/plg_editors_tinymce.ini
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL="Horizontal Resizing"
PLG_TINY_FIELD_RESIZING_LABEL="Resizing"
PLG_TINY_FIELD_SETACCESS_LABEL="Assign this Set to"
PLG_TINY_FIELD_SKIN_ADMIN_LABEL="Administrator Skin"
PLG_TINY_FIELD_SKIN_ADMIN_DARK_LABEL="Administrator Skin (Dark Mode)"
PLG_TINY_FIELD_SKIN_INFO_DESC="Copy your new skins to: /media/vendor/tinymce/skins/ui."
PLG_TINY_FIELD_SKIN_INFO_LABEL="For customised skins go to: <a href=\"https://skin.tiny.cloud/t5/\" target=\"_blank\" rel=\"noopener noreferrer\">Skin Creator</a>"
PLG_TINY_FIELD_SKIN_LABEL="Site Skin"
PLG_TINY_FIELD_SKIN_DARK_LABEL="Site Skin (Dark Mode)"
PLG_TINY_FIELD_SOURCECODE_LABEL="Source Code Highlighting"
PLG_TINY_FIELD_TEXTPATTERN_DESC="Use Markdown syntax to compose content with links, lists, and other styles." ; Do not translate the word Markdown
PLG_TINY_FIELD_TEXTPATTERN_LABEL="Markdown"
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/plg_fields_imagelist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

PLG_FIELDS_IMAGELIST="Fields - Imagelist"
PLG_FIELDS_IMAGELIST_LABEL="List of Images (%s)"
PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC="This directory is relative to \"images\" directory in Joomla! root." ; Don't translate "images"
PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC="This directory is relative to \"images\" directory in Joomla! root." ; Don't translate 'images'
PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL="Directory"
PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL="Image Class"
PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL="Multiple"
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/files/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>5.0.1-dev</version>
<creationDate>2023-10</creationDate>
<version>5.0.2-dev</version>
<creationDate>2023-11</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

<scriptfile>administrator/components/com_admin/script.php</scriptfile>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/packages/pkg_en-GB.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<extension type="package" method="upgrade">
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>5.0.1.1</version>
<creationDate>2023-10</creationDate>
<version>5.0.2.1</version>
<creationDate>2023-11</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/templates/atum/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<jdoc:include type="scripts" />
</head>

<body class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome || $a11y_mono ? ' monochrome' : '') . ($a11y_contrast ? ' a11y_contrast' : '') . ($a11y_highlight ? ' a11y_highlight' : ''); ?>">
<body data-color-scheme-os class="admin <?php echo $option . ' view-' . $view . ' layout-' . $layout . ($task ? ' task-' . $task : '') . ($monochrome || $a11y_mono ? ' monochrome' : '') . ($a11y_contrast ? ' a11y_contrast' : '') . ($a11y_highlight ? ' a11y_highlight' : ''); ?>">
<noscript>
<div class="alert alert-danger" role="alert">
<?php echo Text::_('JGLOBAL_WARNJAVASCRIPT'); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Joomla\Component\Content\Api\Controller;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

Expand Down Expand Up @@ -114,6 +115,10 @@ protected function preprocessSaveData(array $data): array
}
}

$tags = new TagsHelper();
$tags->getTagIds($data['id'], 'com_content.article');
$data['tags'] = explode(',', $tags->tags);

return $data;
}
}
4 changes: 2 additions & 2 deletions api/language/en-GB/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<extension client="api" type="language" method="upgrade">
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>5.0.1</version>
<creationDate>2023-10</creationDate>
<version>5.0.2</version>
<creationDate>2023-11</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions api/language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<metafile client="api">
<name>English (en-GB)</name>
<version>5.0.1</version>
<creationDate>2023-10</creationDate>
<version>5.0.2</version>
<creationDate>2023-11</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion build/build-modules-js/compilecss.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports.stylesheets = async (options, path) => {
} else {
// eslint-disable-next-line no-console
console.error(`Unknown path ${path}`);
process.exit(1);
process.exitCode = 1;
}
} else {
folders = [
Expand Down
2 changes: 1 addition & 1 deletion build/build-modules-js/compilejs.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports.scripts = async (options, path) => {
} else {
// eslint-disable-next-line no-console
console.error(`Unknown path ${path}`);
process.exit(1);
process.exitCode = 1;
}
} else {
folders = [
Expand Down

0 comments on commit fab15ba

Please sign in to comment.