Skip to content

Commit

Permalink
Merge branch '5.1-dev' into patch-18
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Feb 20, 2024
2 parents 16735d4 + bd1f055 commit 273a98d
Show file tree
Hide file tree
Showing 300 changed files with 5,099 additions and 2,609 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ steps:
- mkdir -p transfer
- date +%s > transfer/$MINORVERSION-time.txt
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2 --disable-patch-packages
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --disable-patch-packages
- mv build/tmp/packages/* transfer/

- name: upload
Expand Down Expand Up @@ -403,6 +403,6 @@ trigger:

---
kind: signature
hmac: e8ab45eb1d91c0b0b38c8d25a3a983d112c973dcba0153a982f2afd581dfa458
hmac: c1434b09300896f8627ccb11c92e97878caf7a303772db01a647dca53a92fa3f

...
49 changes: 0 additions & 49 deletions .github/workflows/cacert-update.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/create-translation-pull-request-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Fetch latest cms changes
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
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.3-dev
git merge upstream/4.4-dev
- name: Fetch and extract translations
run: |
Expand Down Expand Up @@ -73,5 +73,5 @@ jobs:
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.3-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[4.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.4-dev
77 changes: 77 additions & 0 deletions .github/workflows/create-translation-pull-request-v5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Create translation pull request

on:
push:
branches: [ translation ]

workflow_dispatch:

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

permissions:
contents: read

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/translation5' }}

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

- 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 translation5 refs/remotes/origin/translation5
git merge upstream/5.0-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="v5"
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
continue-on-error: true
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
if: ${{ success() }}
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 5.0-dev
3 changes: 3 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -2204,6 +2204,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/administrator/components/com_newsfeeds/tmpl/newsfeeds/default_batch_footer.php',
'/administrator/components/com_tags/tmpl/tags/default_batch_footer.php',
'/administrator/components/com_users/tmpl/users/default_batch_footer.php',
// From 5.1.0-alpha3 to 5.1.0-alpha4
'/administrator/components/com_redirect/tmpl/links/default_batch_footer.php',
'/modules/mod_banners/mod_banners.php',
];

$folders = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__fields_values` MODIFY `value` MEDIUMTEXT;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__guidedtour_steps` ADD COLUMN `params` text NULL /** CAN FAIL **/;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "#__guidedtour_steps" ADD COLUMN "params" text NULL /** CAN FAIL **/;
3 changes: 3 additions & 0 deletions administrator/components/com_banners/forms/banner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@
<field
name="imageurl"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_BANNERS_FIELD_IMAGE_LABEL"
directory="banners"
hide_none="1"
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_categories/forms/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@
<field
name="image"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CATEGORIES_FIELD_IMAGE_LABEL"
/>

Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_config/forms/application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,9 @@
<field
name="offline_image"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONFIG_FIELD_OFFLINE_IMAGE_LABEL"
showon="offline:1"
/>
Expand Down
24 changes: 24 additions & 0 deletions administrator/components/com_contact/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@
<field
name="image"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL"
default=""
showon="show_info:1[AND]show_image:1"
Expand Down Expand Up @@ -410,6 +413,9 @@
<field
name="icon_address"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_ADDRESS_LABEL"
hide_none="1"
default=""
Expand All @@ -419,6 +425,9 @@
<field
name="icon_email"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_EMAIL_LABEL"
hide_none="1"
default=""
Expand All @@ -428,6 +437,9 @@
<field
name="icon_telephone"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_TELEPHONE_LABEL"
hide_none="1"
default=""
Expand All @@ -437,6 +449,9 @@
<field
name="icon_mobile"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_MOBILE_LABEL"
hide_none="1"
default=""
Expand All @@ -446,6 +461,9 @@
<field
name="icon_fax"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_FAX_LABEL"
hide_none="1"
default=""
Expand All @@ -455,6 +473,9 @@
<field
name="icon_webpage"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_WEBPAGE_LABEL"
hide_none="1"
default=""
Expand All @@ -464,6 +485,9 @@
<field
name="icon_misc"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_ICONS_MISC_LABEL"
hide_none="1"
default=""
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_contact/forms/contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@
<field
name="image"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTACT_FIELD_PARAMS_IMAGE_LABEL"
hide_none="1"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@ public function display($tpl = null)
throw new GenericDataException(implode("\n", $errors), 500);
}

// Preprocess the list of items to find ordering divisions.
// @todo: Complete the ordering stuff with nested sets
foreach ($this->items as &$item) {
$item->order_up = true;
$item->order_dn = true;
}

// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal') {
$this->addToolbar();
Expand Down
6 changes: 6 additions & 0 deletions administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,9 @@
name="image_intro"
type="media"
label="COM_CONTENT_FIELD_INTRO_LABEL"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
/>

<field
Expand Down Expand Up @@ -759,6 +762,9 @@
<field
name="image_fulltext"
type="media"
schemes="http,https,ftp,ftps,data,file"
validate="url"
relative="true"
label="COM_CONTENT_FIELD_FULL_LABEL"
/>

Expand Down
29 changes: 10 additions & 19 deletions administrator/components/com_cpanel/tmpl/cpanel/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
defined('_JEXEC') or die;

use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Registry\Registry;
Expand All @@ -28,26 +27,16 @@
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_cpanel.admin-cpanel')
->useScript('com_cpanel.admin-addmodule');
->useScript('joomla.dialog-autocreate');

$user = $this->getCurrentUser();

// Set up the bootstrap modal that will be used for all module editors
echo HTMLHelper::_(
'bootstrap.renderModal',
'moduleDashboardAddModal',
[
'title' => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
'backdrop' => 'static',
'url' => Route::_('index.php?option=com_cpanel&task=addModule&function=jSelectModuleType&position=' . $this->escape($this->position)),
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<button type="button" class="button-cancel btn btn-danger" data-bs-dismiss="modal" data-bs-target="#closeBtn">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" id="btnModalSaveAndClose" class="button-save btn btn-success hidden" data-bs-target="#saveBtn">'
. Text::_('JSAVE') . '</button>',
]
);
// Set up the modal options that will be used for module editor
$popupOptions = [
'popupType' => 'iframe',
'src' => Route::_('index.php?option=com_cpanel&task=addModule&position=' . $this->position, false),
'textHeader' => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
];
?>
<div id="cpanel-modules">
<div class="cpanel-modules <?php echo $this->position; ?>">
Expand All @@ -69,7 +58,9 @@
<?php if ($user->authorise('core.create', 'com_modules')) : ?>
<div class="module-wrapper">
<div class="card">
<button type="button" data-bs-toggle="modal" data-bs-target="#moduleDashboardAddModal" class="cpanel-add-module">
<button type="button" class="cpanel-add-module"
data-joomla-dialog="<?php echo htmlspecialchars(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)) ?>"
data-close-on-message data-reload-on-close>
<div class="cpanel-add-module-icon">
<span class="icon-plus-square" aria-hidden="true"></span>
</div>
Expand Down

0 comments on commit 273a98d

Please sign in to comment.