Skip to content

Commit

Permalink
Merge branch '4.3-dev' into add_ldap_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tatankat committed Sep 10, 2022
2 parents 353df05 + 9310179 commit df4d1e8
Show file tree
Hide file tree
Showing 165 changed files with 1,071 additions and 610 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ insert_final_newline = true
indent_style = space
indent_size = 4

[*.{js,json,scss,css,vue}]
[*.{js,json,scss,css,yml,vue}]
indent_style = space
indent_size = 2
9 changes: 5 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ If it is a PR, include what the issue is, what the PR is addressing, testing ins
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.

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

| Branch | Purpose |
| ------ | ------- |
| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will only include compatibility features for 4.x as well as bugfixes and security patches. |
| 4.1-dev | Branch for the current minor Joomla version. Commits to 3.10-dev will be applied to this branch as well. |
| 4.2-dev | Branch for the next minor Joomla version. New features go into this branch. Commits to 4.1-dev will be applied to this branch as well. |
| 3.10-dev | Branch for the Joomla 3.x series. The 3.10 series release will now only include security patches. |
| 4.2-dev | Branch for the current minor Joomla version.|
| 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. |
| 5.0-dev | Branch for the next major Joomla version. |
140 changes: 70 additions & 70 deletions .github/workflows/create-translation-pull-request-v4.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
name: Create translation pull request

on:
push:
branches: [ translation ]

workflow_dispatch:

schedule:
# Run daily at 7:26
- cron: '26 7 * * *'

name: Create translation pull request

on:
push:
branches: [ translation ]

workflow_dispatch:

schedule:
# Run daily at 7:26
- cron: '26 7 * * *'

permissions:
contents: read

jobs:
build:
jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
# Only run this action the translation-bot repository in the translation branch
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation' }}

steps:
- uses: actions/checkout@v2
# We need the full depth to create / update the pull request against the main repo
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 12

- name: Fetch latest cms changes
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.1-dev
- name: Fetch and extract translations
run: |
cd ..
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
unzip main.zip
- name: Syncing directories
# We use a simple copy paste syntax here if needed customization for different directories
run: |
cd ..
SYNC_VERSION="v4"
SYNC_PATH="installation/language/"
echo ${SYNC_PATH}
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
- name: Update static error pages
run: |
npm ci --ignore-scripts && node build/build.js --build-pages
- name: Create commit
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git add .
git commit -m "Language update"
git push --force
- name: Create pull request
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.1-dev
runs-on: ubuntu-latest
# Only run this action the translation-bot repository in the translation branch
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation' }}

steps:
- uses: actions/checkout@v2
# We need the full depth to create / update the pull request against the main repo
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 12

- name: Fetch latest cms changes
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.2-dev
- name: Fetch and extract translations
run: |
cd ..
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
unzip main.zip
- name: Syncing directories
# We use a simple copy paste syntax here if needed customization for different directories
run: |
cd ..
SYNC_VERSION="v4"
SYNC_PATH="installation/language/"
echo ${SYNC_PATH}
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
- name: Update static error pages
run: |
npm ci --ignore-scripts && node build/build.js --build-pages
- name: Create commit
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git add .
git commit -m "Language update"
git push --force
- name: Create pull request
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.2-dev
7 changes: 4 additions & 3 deletions administrator/components/com_banners/tmpl/banners/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,12 @@
<?php echo $this->pagination->getListFooter(); ?>

<?php // Load the batch processing form. ?>
<?php if (
$user->authorise('core.create', 'com_banners')
<?php
if (
$user->authorise('core.create', 'com_banners')
&& $user->authorise('core.edit', 'com_banners')
&& $user->authorise('core.edit.state', 'com_banners')
) : ?>
) : ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'collapseModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,12 @@
<?php echo $this->pagination->getListFooter(); ?>

<?php // Load the batch processing form. ?>
<?php if (
$user->authorise('core.create', $extension)
<?php
if (
$user->authorise('core.create', $extension)
&& $user->authorise('core.edit', $extension)
&& $user->authorise('core.edit.state', $extension)
) : ?>
) : ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'collapseModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,12 @@
<?php echo $this->pagination->getListFooter(); ?>

<?php // Load the batch processing form. ?>
<?php if (
$user->authorise('core.create', 'com_contact')
<?php
if (
$user->authorise('core.create', 'com_contact')
&& $user->authorise('core.edit', 'com_contact')
&& $user->authorise('core.edit.state', 'com_contact')
) : ?>
) : ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'collapseModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,12 @@
<?php echo $this->pagination->getListFooter(); ?>

<?php // Load the batch processing form. ?>
<?php if (
$user->authorise('core.create', 'com_content')
<?php
if (
$user->authorise('core.create', 'com_content')
&& $user->authorise('core.edit', 'com_content')
&& $user->authorise('core.edit.state', 'com_content')
) : ?>
) : ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'collapseModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ public function addModule()
$position = 'cpanel';
}

$this->app->setUserState('com_modules.modules.filter.position', $position);
$this->app->setUserState('com_modules.modules.client_id', '1');
// Administrator
$clientId = (\Joomla\CMS\Application\ApplicationHelper::getClientInfo('administrator', true))->id;

$this->app->setUserState('com_modules.modules.' . $clientId . '.filter.position', $position);
$this->app->setUserState('com_modules.modules.client_id', (string) $clientId);

$this->setRedirect(Route::_('index.php?option=com_modules&view=select&tmpl=component&layout=modal' . $appendLink, false));
}
Expand Down
14 changes: 10 additions & 4 deletions administrator/components/com_fields/src/Model/FieldModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ public function save($data)
$db->execute();

// Inset new assigned categories
$tupel = new \stdClass();
$tupel->field_id = $id;
$tuple = new \stdClass();
$tuple->field_id = $id;

foreach ($assignedCatIds as $catId) {
$tupel->category_id = $catId;
$db->insertObject('#__fields_categories', $tupel);
$tuple->category_id = $catId;
$db->insertObject('#__fields_categories', $tuple);
}

/**
Expand Down Expand Up @@ -1110,6 +1110,12 @@ protected function batchCopy($value, $pks, $contexts)
// Reset the ID because we are making a copy
$table->id = 0;

// Alter the title if necessary
$data = $this->generateNewTitle(0, $table->name, $table->title);
$table->title = $data['0'];
$table->name = $data['1'];
$table->label = $data['0'];

// Unpublish the new field
$table->state = 0;

Expand Down
7 changes: 4 additions & 3 deletions administrator/components/com_fields/tmpl/fields/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,12 @@
<?php echo $this->pagination->getListFooter(); ?>

<?php //Load the batch processing form. ?>
<?php if (
$user->authorise('core.create', $component)
<?php
if (
$user->authorise('core.create', $component)
&& $user->authorise('core.edit', $component)
&& $user->authorise('core.edit.state', $component)
) : ?>
) : ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'collapseModal',
Expand Down
16 changes: 8 additions & 8 deletions administrator/components/com_fields/tmpl/group/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php $this->set('ignore_fieldsets', array('fieldparams')); ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'rules', Text::_('JGLOBAL_ACTION_PERMISSIONS_LABEL', true)); ?>
<fieldset id="fieldset-rules" class="options-form">
Expand Down
7 changes: 4 additions & 3 deletions administrator/components/com_fields/tmpl/groups/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@
<?php echo $this->pagination->getListFooter(); ?>

<?php //Load the batch processing form. ?>
<?php if (
$user->authorise('core.create', $component)
<?php
if (
$user->authorise('core.create', $component)
&& $user->authorise('core.edit', $component)
&& $user->authorise('core.edit.state', $component)
) : ?>
) : ?>
<?php echo HTMLHelper::_(
'bootstrap.renderModal',
'collapseModal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ protected function addToolbar()
$childBar->checkin('filters.checkin')->listCheck(true);
}

ToolbarHelper::divider();
$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350, '', '', '', Text::_('COM_FINDER_STATISTICS_TITLE'));
ToolbarHelper::divider();

if ($canDo->get('core.delete')) {
ToolbarHelper::deleteList('', 'filters.delete');
ToolbarHelper::divider();
}

ToolbarHelper::divider();
$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350, '', '', '', Text::_('COM_FINDER_STATISTICS_TITLE'));
ToolbarHelper::divider();
}

if ($canDo->get('core.admin') || $canDo->get('core.options')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ protected function addToolbar()
$childBar->unpublish('index.unpublish')->listCheck(true);
}

$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350, '', '', '', Text::_('COM_FINDER_STATISTICS_TITLE'));

if ($canDo->get('core.delete')) {
$toolbar->confirmButton('', 'JTOOLBAR_DELETE', 'index.delete')
->icon('icon-delete')
Expand All @@ -227,6 +225,8 @@ protected function addToolbar()
->icon('icon-trash')
->message('COM_FINDER_INDEX_CONFIRM_PURGE_PROMPT');
}

$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350, '', '', '', Text::_('COM_FINDER_STATISTICS_TITLE'));
}

if ($canDo->get('core.admin') || $canDo->get('core.options')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ protected function addToolbar()
$childBar->unpublish('maps.unpublish')->listCheck(true);
}

ToolbarHelper::divider();
$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350, '', '', '', Text::_('COM_FINDER_STATISTICS_TITLE'));
ToolbarHelper::divider();

if ($canDo->get('core.delete')) {
ToolbarHelper::deleteList('', 'maps.delete');
ToolbarHelper::divider();
}

ToolbarHelper::divider();
$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350, '', '', '', Text::_('COM_FINDER_STATISTICS_TITLE'));
ToolbarHelper::divider();
}

if ($canDo->get('core.admin') || $canDo->get('core.options')) {
Expand Down

0 comments on commit df4d1e8

Please sign in to comment.