Skip to content

Commit 9ba3be9

Browse files
authored
Merge branch '4.4-dev' into atum-logout
2 parents 411ece7 + cfcf8b6 commit 9ba3be9

File tree

42 files changed

+2296
-2490
lines changed

Some content is hidden

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

42 files changed

+2296
-2490
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ hosts:
4646
openldap: 127.0.0.1
4747

4848
services:
49-
- mysql
5049
- iis
5150

5251
before_test:
5352
# Run openldap docker image
5453
- ps: docker pull bitnami/openldap:2.6.3
5554
- 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
5655
# Database setup for MySQL via PowerShell tools
56+
- ps: Start-Service MySQL80
5757
- >
58-
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
58+
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
5959
# Wait till slapd has started
6060
- ps: |
6161
$Counter=0

.drone.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ steps:
3939
- ./libraries/vendor/bin/phan
4040

4141
- name: npm
42-
image: node:18-bullseye-slim
42+
image: node:20-bullseye-slim
4343
depends_on: [ phpcs ]
4444
volumes:
4545
- name: npm-cache
@@ -380,7 +380,7 @@ steps:
380380
DRONE_PULL_REQUEST: DRONE_PULL_REQUEST
381381
DRONE_COMMIT: DRONE_COMMIT
382382
commands:
383-
- /bin/drone_build.sh
383+
- /bin/drone_prepare_package.sh
384384

385385
- name: upload
386386
image: joomlaprojects/docker-images:packager
@@ -471,6 +471,6 @@ trigger:
471471

472472
---
473473
kind: signature
474-
hmac: aba8f50a67f4c8a11e5e179dd2313fdd9a884111f594e21a6b921daa60133534
474+
hmac: 668e2a3bfab925caf4bc0062eaf622d2527f3b8d805e21b663ff1dd89897a431
475475

476476
...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Build Status
55
---------------------
66
| Drone-CI | AppVeyor | PHP | Node | npm |
77
| ------------- | ------------- | ------------- | ------------- | ------------- |
8-
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.4-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.4-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-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/) |
8+
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.4-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.4-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-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/) |
99

1010
Overview
1111
---------------------

administrator/components/com_admin/script.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8151,6 +8151,10 @@ public function updateAssets($installer)
81518151
// List all components added since 4.0
81528152
$newComponents = [
81538153
// Components to be added here
8154+
'com_guidedtours',
8155+
'com_mails',
8156+
'com_scheduler',
8157+
'com_workflow',
81548158
];
81558159

81568160
foreach ($newComponents as $component) {

administrator/components/com_content/src/View/Articles/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected function addToolbar()
190190

191191
$childBar = $dropdown->getChildToolbar();
192192

193-
if (\count($this->transitions)) {
193+
if ($canDo->get('core.execute.transition') && \count($this->transitions)) {
194194
$childBar->separatorButton('transition-headline')
195195
->text('COM_CONTENT_RUN_TRANSITIONS')
196196
->buttonClass('text-center py-2 h3');

administrator/components/com_content/tmpl/articles/default.php

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,39 @@
152152
endif; ?>>
153153
<?php foreach ($this->items as $i => $item) :
154154
$item->max_ordering = 0;
155-
$canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id);
156-
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out);
157-
$canEditOwn = $user->authorise('core.edit.own', 'com_content.article.' . $item->id) && $item->created_by == $userId;
158-
$canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin;
159-
$canEditCat = $user->authorise('core.edit', 'com_content.category.' . $item->catid);
160-
$canEditOwnCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->catid) && $item->category_uid == $userId;
161-
$canEditParCat = $user->authorise('core.edit', 'com_content.category.' . $item->parent_category_id);
162-
$canEditOwnParCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->parent_category_id) && $item->parent_category_uid == $userId;
155+
$canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id);
156+
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out);
157+
$canEditOwn = $user->authorise('core.edit.own', 'com_content.article.' . $item->id) && $item->created_by == $userId;
158+
$canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin;
159+
$canExecuteTransition = $user->authorise('core.execute.transition', 'com_content.article.' . $item->id);
160+
$canEditCat = $user->authorise('core.edit', 'com_content.category.' . $item->catid);
161+
$canEditOwnCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->catid) && $item->category_uid == $userId;
162+
$canEditParCat = $user->authorise('core.edit', 'com_content.category.' . $item->parent_category_id);
163+
$canEditOwnParCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->parent_category_id) && $item->parent_category_uid == $userId;
163164

164-
$transitions = ContentHelper::filterTransitions($this->transitions, (int) $item->stage_id, (int) $item->workflow_id);
165+
// Transition button options
166+
$options = [
167+
'title' => Text::_($item->stage_title),
168+
'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)),
169+
'id' => 'workflow-' . $item->id,
170+
'task' => 'articles.runTransition',
171+
'disabled' => !$canExecuteTransition,
172+
];
165173

166-
$transition_ids = ArrayHelper::getColumn($transitions, 'value');
167-
$transition_ids = ArrayHelper::toInteger($transition_ids);
174+
if ($canExecuteTransition) {
175+
$transitions = ContentHelper::filterTransitions($this->transitions, (int) $item->stage_id, (int) $item->workflow_id);
176+
177+
$transition_ids = ArrayHelper::getColumn($transitions, 'value');
178+
$transition_ids = ArrayHelper::toInteger($transition_ids);
179+
180+
$dataTransitionsAttribute = 'data-transitions="' . implode(',', $transition_ids) . '"';
181+
182+
$options = array_merge($options, ['transitions' => $transitions]);
183+
}
168184

169185
?>
170186
<tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->catid; ?>"
171-
data-transitions="<?php echo implode(',', $transition_ids); ?>"
187+
<?php echo $dataTransitionsAttribute ?? '' ?>
172188
>
173189
<td class="text-center">
174190
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?>
@@ -192,14 +208,6 @@
192208
<?php if ($workflow_enabled) : ?>
193209
<td class="article-stage text-center">
194210
<?php
195-
$options = [
196-
'transitions' => $transitions,
197-
'title' => Text::_($item->stage_title),
198-
'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)),
199-
'id' => 'workflow-' . $item->id,
200-
'task' => 'articles.runTransition'
201-
];
202-
203211
echo (new TransitionButton($options))
204212
->render(0, $i);
205213
?>

administrator/components/com_content/tmpl/articles/modal.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
-2 => 'icon-trash',
9393
0 => 'icon-times',
9494
1 => 'icon-check',
95+
2 => 'icon-archive',
9596
];
9697
?>
9798
<?php foreach ($this->items as $i => $item) : ?>

administrator/components/com_finder/src/Indexer/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ public function parse($input)
9797
// Find the last space character if we aren't at the end.
9898
$ls = (($start + $chunk) < $end ? strrpos($string, ' ') : false);
9999

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

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

108108
// Parse the chunk.
109109
$return .= $this->process($string);

administrator/components/com_installer/src/Controller/UpdateController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function update()
6161
$redirect_url = $app->getUserState('com_installer.redirect_url');
6262

6363
// Don't redirect to an external URL.
64-
if (!Uri::isInternal($redirect_url)) {
64+
if ($redirect_url && !Uri::isInternal($redirect_url)) {
6565
$redirect_url = '';
6666
}
6767

api/components/com_content/src/Controller/ArticlesController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace Joomla\Component\Content\Api\Controller;
1212

1313
use Joomla\CMS\Filter\InputFilter;
14+
use Joomla\CMS\Helper\TagsHelper;
1415
use Joomla\CMS\MVC\Controller\ApiController;
1516
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
1617

@@ -114,6 +115,10 @@ protected function preprocessSaveData(array $data): array
114115
}
115116
}
116117

118+
$tags = new TagsHelper();
119+
$tags->getTagIds($data['id'], 'com_content.article');
120+
$data['tags'] = explode(',', $tags->tags);
121+
117122
return $data;
118123
}
119124
}

0 commit comments

Comments
 (0)