Skip to content

Commit e13df24

Browse files
authored
Merge branch '4.3-dev' into 4.0/charcounter-textfield
2 parents 2ecaec7 + bf18874 commit e13df24

File tree

65 files changed

+1299
-103
lines changed

Some content is hidden

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

65 files changed

+1299
-103
lines changed

.appveyor.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ environment:
1010
matrix:
1111
- php_ver_target: 8.0
1212

13-
1413
init:
1514
- SET PATH=C:\Tools\php;%PATH%
1615
- SET COMPOSER_NO_INTERACTION=1
1716
- SET ANSICON=121x90 (121x90)
18-
services:
19-
- mysql
20-
- iis
2117

2218
## Install PHP and composer, and run the appropriate composer command
2319
install:
@@ -45,12 +41,40 @@ install:
4541
- cd C:\projects\joomla-cms
4642
- refreshenv
4743
- composer install --no-progress --profile --ignore-platform-req=ext-sodium
44+
45+
hosts:
46+
openldap: 127.0.0.1
47+
48+
services:
49+
- mysql
50+
- iis
51+
4852
before_test:
53+
# Run openldap docker image
54+
- ps: docker pull bitnami/openldap:latest
55+
- ps: docker run --rm --name openldap --publish 1389:1389 --publish 1636:1636 -v ${pwd}\tests\Codeception\_data\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:latest
4956
# Database setup for MySQL via PowerShell tools
5057
- >
5158
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
59+
# Wait till slapd has started
60+
- ps: |
61+
$Counter=0
62+
$Found=$false
63+
While ( ! $Found -and $Counter -lt 60 ) {
64+
$Found = ( docker logs openldap 2>&1 | Select-String -Quiet "\*\* Starting slapd \*\*" )
65+
Start-Sleep -Seconds 1
66+
$Counter++
67+
"$Counter Waiting for slapd"
68+
}
69+
if ( ! $Found ) {
70+
Write-Error -Message "`nERROR: slapd not started (in time)!" -ErrorAction Stop
71+
exit 1
72+
}
5273
5374
test_script:
5475
- cd C:\projects\joomla-cms
5576
- libraries/vendor/bin/phpunit --testsuite Unit
5677
- libraries/vendor/bin/phpunit --testsuite Integration --configuration tests/phpunit-appveyor.xml.dist
78+
79+
on_failure:
80+
- ps: docker logs openldap 2>&1

.drone.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,37 @@ name: default
55
clone:
66

77
steps:
8+
- name: setup
9+
image: joomlaprojects/docker-images:php7.4
10+
volumes:
11+
- name: certificates
12+
path: /certificates
13+
commands:
14+
- cp -v tests/Codeception/_data/certs/* /certificates/
15+
16+
- name: openldap
17+
image: bitnami/openldap:latest
18+
detach: true
19+
ports:
20+
- 1389
21+
- 1636
22+
volumes:
23+
- name: certificates
24+
path: /certificates
25+
environment:
26+
LDAP_ADMIN_USERNAME: admin
27+
LDAP_ADMIN_PASSWORD: adminpassword
28+
LDAP_USERS: customuser
29+
LDAP_PASSWORDS: custompassword
30+
LDAP_ENABLE_TLS: yes
31+
LDAP_TLS_CERT_FILE: /certificates/openldap.crt
32+
LDAP_TLS_KEY_FILE: /certificates/openldap.key
33+
LDAP_TLS_CA_FILE: /certificates/CA.crt
34+
BITNAMI_DEBUG: true
35+
LDAP_CONFIG_ADMIN_ENABLED: yes
36+
LDAP_CONFIG_ADMIN_USERNAME: admin
37+
LDAP_CONFIG_ADMIN_PASSWORD: configpassword
38+
839
- name: composer
940
image: joomlaprojects/docker-images:php7.4
1041
volumes:
@@ -361,6 +392,9 @@ volumes:
361392
- name: npm-cache
362393
host:
363394
path: /tmp/npm-cache
395+
- name: certificates
396+
host:
397+
path: /tmp/certificates
364398

365399
services:
366400
- name: mysql
@@ -483,6 +517,6 @@ trigger:
483517

484518
---
485519
kind: signature
486-
hmac: 916fe89f8d920e8471b32aae02bfe192abf24cd035b5f1ea73452662c1c92895
520+
hmac: 62722201dc57c6d193bed2a67860fe4cced46d38ebfdfe12a45a79a15a59e07e
487521

488522
...

.github/workflows/create-translation-pull-request-v4.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
schedule:
1010
# Run daily at 7:26
11-
- cron: '26 7 * * *'
11+
- cron: '27 7 * * *'
1212

1313
permissions:
1414
contents: read
@@ -60,6 +60,7 @@ jobs:
6060
npm ci --ignore-scripts && node build/build.js --build-pages
6161
6262
- name: Create commit
63+
continue-on-error: true
6364
run: |
6465
git config user.name Translation Bot
6566
git config user.email [email protected]
@@ -68,6 +69,7 @@ jobs:
6869
git push --force
6970
7071
- name: Create pull request
72+
if: ${{ success() }}
7173
env:
7274
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
7375
run: |

administrator/components/com_admin/script.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6440,6 +6440,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
64406440
'/plugins/task/checkfiles/checkfiles.php',
64416441
'/plugins/task/demotasks/demotasks.php',
64426442
// From 4.2.0-rc1 to 4.2.0
6443+
'/build/media_source/com_menus/css/admin-item-edit_modules.css',
64436444
'/administrator/language/en-GB/plg_fields_menuitem.ini',
64446445
'/administrator/language/en-GB/plg_fields_menuitem.sys.ini',
64456446
'/plugins/fields/menuitem/menuitem.php',
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Remove the record of any template overrides where the template has already been uninstalled
2+
DELETE FROM `#__template_overrides` WHERE `template` NOT IN (SELECT `name` FROM `#__extensions` WHERE `type`='template');
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Remove the record of any template overrides where the template has already been uninstalled
2+
DELETE FROM "#__template_overrides" WHERE "template" NOT IN (SELECT "name" FROM "#__extensions" WHERE "type"='template');

administrator/components/com_banners/src/Controller/BannersController.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Joomla\CMS\Language\Text;
1515
use Joomla\CMS\MVC\Controller\AdminController;
1616
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
17+
use Joomla\CMS\Response\JsonResponse;
1718
use Joomla\Input\Input;
1819
use Joomla\Utilities\ArrayHelper;
1920

@@ -112,4 +113,28 @@ public function sticky_publish()
112113

113114
$this->setRedirect('index.php?option=com_banners&view=banners');
114115
}
116+
117+
/**
118+
* Method to get the number of published banners for quickicons
119+
*
120+
* @return string The JSON-encoded amount of published banners
121+
*
122+
* @since __DEPLOY_VERSION__
123+
*/
124+
public function getQuickiconContent()
125+
{
126+
$model = $this->getModel('banners');
127+
128+
$model->setState('filter.published', 1);
129+
130+
$amount = (int) $model->getTotal();
131+
132+
$result = [];
133+
134+
$result['amount'] = $amount;
135+
$result['sronly'] = Text::plural('COM_BANNERS_N_QUICKICON_SRONLY', $amount);
136+
$result['name'] = Text::plural('COM_BANNERS_N_QUICKICON', $amount);
137+
138+
echo new JsonResponse($result);
139+
}
115140
}

administrator/components/com_contact/src/Controller/ContactsController.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Joomla\CMS\Language\Text;
1515
use Joomla\CMS\MVC\Controller\AdminController;
1616
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
17+
use Joomla\CMS\Response\JsonResponse;
1718
use Joomla\Input\Input;
1819
use Joomla\Utilities\ArrayHelper;
1920

@@ -121,4 +122,28 @@ public function getModel($name = 'Contact', $prefix = 'Administrator', $config =
121122
{
122123
return parent::getModel($name, $prefix, $config);
123124
}
125+
126+
/**
127+
* Method to get the number of published contacts for quickicons
128+
*
129+
* @return string The JSON-encoded amount of published contacts
130+
*
131+
* @since __DEPLOY_VERSION__
132+
*/
133+
public function getQuickiconContent()
134+
{
135+
$model = $this->getModel('contacts');
136+
137+
$model->setState('filter.published', 1);
138+
139+
$amount = (int) $model->getTotal();
140+
141+
$result = [];
142+
143+
$result['amount'] = $amount;
144+
$result['sronly'] = Text::plural('COM_CONTACT_N_QUICKICON_SRONLY', $amount);
145+
$result['name'] = Text::plural('COM_CONTACT_N_QUICKICON', $amount);
146+
147+
echo new JsonResponse($result);
148+
}
124149
}

administrator/components/com_content/src/Controller/FeaturedController.php

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

1313
use Joomla\CMS\Language\Text;
14+
use Joomla\CMS\Response\JsonResponse;
1415

1516
// phpcs:disable PSR1.Files.SideEffects
1617
\defined('_JEXEC') or die;
@@ -98,4 +99,29 @@ public function getModel($name = 'Feature', $prefix = 'Administrator', $config =
9899
{
99100
return parent::getModel($name, $prefix, $config);
100101
}
102+
103+
/**
104+
* Method to get the number of published featured articles for quickicons
105+
*
106+
* @return string The JSON-encoded amount of published featured articles
107+
*
108+
* @since __DEPLOY_VERSION__
109+
*/
110+
public function getQuickiconContent()
111+
{
112+
$model = $this->getModel('articles');
113+
114+
$model->setState('filter.published', 1);
115+
$model->setState('filter.featured', 1);
116+
117+
$amount = (int) $model->getTotal();
118+
119+
$result = [];
120+
121+
$result['amount'] = $amount;
122+
$result['sronly'] = Text::plural('COM_CONTENT_FEATURED_N_QUICKICON_SRONLY', $amount);
123+
$result['name'] = Text::plural('COM_CONTENT_FEATURED_N_QUICKICON', $amount);
124+
125+
echo new JsonResponse($result);
126+
}
101127
}

administrator/components/com_languages/src/Controller/LanguagesController.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
namespace Joomla\Component\Languages\Administrator\Controller;
1212

13+
use Joomla\CMS\Language\Text;
1314
use Joomla\CMS\MVC\Controller\AdminController;
15+
use Joomla\CMS\Response\JsonResponse;
1416

1517
// phpcs:disable PSR1.Files.SideEffects
1618
\defined('_JEXEC') or die;
@@ -38,4 +40,28 @@ public function getModel($name = 'Language', $prefix = 'Administrator', $config
3840
{
3941
return parent::getModel($name, $prefix, $config);
4042
}
43+
44+
/**
45+
* Method to get the number of published languages for quickicons
46+
*
47+
* @return string The JSON-encoded amount of published languages
48+
*
49+
* @since __DEPLOY_VERSION__
50+
*/
51+
public function getQuickiconContent()
52+
{
53+
$model = $this->getModel('languages');
54+
55+
$model->setState('filter.published', 1);
56+
57+
$amount = (int) $model->getTotal();
58+
59+
$result = [];
60+
61+
$result['amount'] = $amount;
62+
$result['sronly'] = Text::plural('COM_LANGUAGES_N_QUICKICON_SRONLY', $amount);
63+
$result['name'] = Text::plural('COM_LANGUAGES_N_QUICKICON', $amount);
64+
65+
echo new JsonResponse($result);
66+
}
4167
}

0 commit comments

Comments
 (0)