Skip to content

Commit 4b2a75e

Browse files
committed
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.1-dev
# Conflicts: # libraries/src/Version.php
2 parents 5bffadd + 6900bb9 commit 4b2a75e

File tree

136 files changed

+2113
-501
lines changed

Some content is hidden

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

136 files changed

+2113
-501
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
# We need the full depth to create / update the pull request against the main repo
2222
with:
2323
fetch-depth: 0
24+
- uses: actions/setup-node@v1
25+
with:
26+
node-version: 12
2427

2528
- name: Fetch latest cms changes
2629
run: |
@@ -47,6 +50,10 @@ jobs:
4750
echo ${SYNC_PATH}
4851
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
4952
53+
- name: Update static error pages
54+
run: |
55+
npm ci --ignore-scripts && node build/build.js --build-pages
56+
5057
- name: Create commit
5158
run: |
5259
git config user.name Translation Bot

administrator/components/com_admin/script.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6089,6 +6089,15 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
60896089
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php',
60906090
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php',
60916091
'/libraries/vendor/willdurand/negotiation/tests/bootstrap.php',
6092+
// From 4.0.2 to 4.0.3
6093+
'/templates/cassiopeia/css/global/fonts-web_fira-sans.css',
6094+
'/templates/cassiopeia/css/global/fonts-web_fira-sans.min.css',
6095+
'/templates/cassiopeia/css/global/fonts-web_fira-sans.min.css.gz',
6096+
'/templates/cassiopeia/css/global/fonts-web_roboto+noto-sans.css',
6097+
'/templates/cassiopeia/css/global/fonts-web_roboto+noto-sans.min.css',
6098+
'/templates/cassiopeia/css/global/fonts-web_roboto+noto-sans.min.css.gz',
6099+
'/templates/cassiopeia/scss/global/fonts-web_fira-sans.scss',
6100+
'/templates/cassiopeia/scss/global/fonts-web_roboto+noto-sans.scss',
60926101
);
60936102

60946103
$folders = array(
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--
2+
-- Delete the com_search package extension including its update site if no other
3+
-- com_search extension exists
4+
--
5+
DELETE FROM `#__update_sites_extensions`
6+
WHERE `update_site_id` IN (SELECT `update_site_id` FROM `#__update_sites` WHERE `location` = 'https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml')
7+
AND `extension_id` IN (SELECT `extension_id` FROM `#__extensions` WHERE `element` = 'pkg_search' AND `type` = 'package')
8+
AND (SELECT COUNT(a.`extension_id`)
9+
FROM `#__extensions` a
10+
WHERE (a.`type` = 'component' AND a.`element` = 'com_search')
11+
OR (a.`type` = 'module' AND a.`element` = 'mod_search' AND a.`client_id` = 0)
12+
OR (a.`type` = 'plugin' AND a.`element` IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND a.`folder` = 'search')
13+
) = 0;
14+
15+
DELETE FROM `#__update_sites`
16+
WHERE `location` = 'https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml'
17+
AND (SELECT COUNT(a.`extension_id`)
18+
FROM `#__extensions` a
19+
WHERE (a.`type` = 'component' AND a.`element` = 'com_search')
20+
OR (a.`type` = 'module' AND a.`element` = 'mod_search' AND a.`client_id` = 0)
21+
OR (a.`type` = 'plugin' AND a.`element` IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND a.`folder` = 'search')
22+
) = 0;
23+
24+
DELETE FROM `#__extensions`
25+
WHERE `type` = 'package' AND `element` = 'pkg_search'
26+
AND (SELECT b.`count`
27+
FROM (SELECT COUNT(a.`extension_id`) AS `count`
28+
FROM `#__extensions` a
29+
WHERE (a.`type` = 'component' AND a.`element` = 'com_search')
30+
OR (a.`type` = 'module' AND a.`element` = 'mod_search' AND a.`client_id` = 0)
31+
OR (a.`type` = 'plugin' AND a.`element` IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND a.`folder` = 'search')
32+
) b
33+
) = 0;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
UPDATE `#__workflow_transitions` SET `title` = 'PUBLISH' WHERE `title`= 'Publish';
2+
UPDATE `#__workflow_transitions` SET `title` = 'UNPUBLISH' WHERE `title`= 'Unpublish';
3+
UPDATE `#__workflow_transitions` SET `title` = 'TRASH' WHERE `title`= 'Trash';
4+
UPDATE `#__workflow_transitions` SET `title` = 'ARCHIVE' WHERE `title`= 'Archive';
5+
UPDATE `#__workflow_transitions` SET `title` = 'FEATURE' WHERE `title`= 'Feature';
6+
UPDATE `#__workflow_transitions` SET `title` = 'UNFEATURE' WHERE `title`= 'Unfeature';
7+
UPDATE `#__workflow_transitions` SET `title` = 'PUBLISH_AND_FEATURE' WHERE `title`= 'Publish & Feature';
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--
2+
-- Delete the com_search package extension including its update site if no other
3+
-- com_search extension exists
4+
--
5+
DELETE FROM "#__update_sites_extensions"
6+
WHERE "update_site_id" IN (SELECT "update_site_id" FROM "#__update_sites" WHERE "location" = 'https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml')
7+
AND "extension_id" IN (SELECT "extension_id" FROM "#__extensions" WHERE "element" = 'pkg_search' AND "type" = 'package')
8+
AND (SELECT COUNT(a."extension_id")
9+
FROM "#__extensions" a
10+
WHERE (a."type" = 'component' AND a."element" = 'com_search')
11+
OR (a."type" = 'module' AND a."element" = 'mod_search' AND a."client_id" = 0)
12+
OR (a."type" = 'plugin' AND a."element" IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND a."folder" = 'search')
13+
) = 0;
14+
15+
DELETE FROM "#__update_sites"
16+
WHERE "location" = 'https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml'
17+
AND (SELECT COUNT(a."extension_id")
18+
FROM "#__extensions" a
19+
WHERE (a."type" = 'component' AND a."element" = 'com_search')
20+
OR (a."type" = 'module' AND a."element" = 'mod_search' AND a."client_id" = 0)
21+
OR (a."type" = 'plugin' AND a."element" IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND a."folder" = 'search')
22+
) = 0;
23+
24+
DELETE FROM "#__extensions"
25+
WHERE "type" = 'package' AND "element" = 'pkg_search'
26+
AND (SELECT b."count"
27+
FROM (SELECT COUNT(a."extension_id") AS "count"
28+
FROM "#__extensions" a
29+
WHERE (a."type" = 'component' AND a."element" = 'com_search')
30+
OR (a."type" = 'module' AND a."element" = 'mod_search' AND a."client_id" = 0)
31+
OR (a."type" = 'plugin' AND a."element" IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND a."folder" = 'search')
32+
) b
33+
) = 0;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
UPDATE "#__workflow_transitions" SET "title" = 'PUBLISH' WHERE "title"= 'Publish';
2+
UPDATE "#__workflow_transitions" SET "title" = 'UNPUBLISH' WHERE "title"= 'Unpublish';
3+
UPDATE "#__workflow_transitions" SET "title" = 'TRASH' WHERE "title"= 'Trash';
4+
UPDATE "#__workflow_transitions" SET "title" = 'ARCHIVE' WHERE "title"= 'Archive';
5+
UPDATE "#__workflow_transitions" SET "title" = 'FEATURE' WHERE "title"= 'Feature';
6+
UPDATE "#__workflow_transitions" SET "title" = 'UNFEATURE' WHERE "title"= 'Unfeature';
7+
UPDATE "#__workflow_transitions" SET "title" = 'PUBLISH_AND_FEATURE' WHERE "title"= 'Publish & Feature';

administrator/components/com_content/src/Model/ArticlesModel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Joomla\CMS\Component\ComponentHelper;
1515
use Joomla\CMS\Factory;
1616
use Joomla\CMS\Language\Associations;
17+
use Joomla\CMS\Language\Text;
1718
use Joomla\CMS\MVC\Model\ListModel;
1819
use Joomla\CMS\Plugin\PluginHelper;
1920
use Joomla\CMS\Table\Table;
@@ -664,6 +665,8 @@ public function getTransitions()
664665
{
665666
unset($transitions[$key]);
666667
}
668+
669+
$transitions[$key]['text'] = Text::_($transition['text']);
667670
}
668671

669672
$this->cache[$store] = $transitions;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@
134134
<a class="select-link" href="javascript:void(0)" <?php echo $attribs; ?>>
135135
<?php echo $this->escape($item->title); ?>
136136
</a>
137-
<span class="small break-word">
137+
<div class="small break-word">
138138
<?php if (empty($item->note)) : ?>
139139
<?php echo Text::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
140140
<?php else : ?>
141141
<?php echo Text::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note)); ?>
142142
<?php endif; ?>
143-
</span>
143+
</div>
144144
<div class="small">
145145
<?php echo Text::_('JCATEGORY') . ': ' . $this->escape($item->category_title); ?>
146146
</div>

administrator/components/com_installer/src/Model/UpdateModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public function getDisabledUpdateSites()
282282
* Finds updates for an extension.
283283
*
284284
* @param int $eid Extension identifier to look for
285-
* @param int $cacheTimeout Cache timout
285+
* @param int $cacheTimeout Cache timeout
286286
* @param int $minimumStability Minimum stability for updates {@see Updater} (0=dev, 1=alpha, 2=beta, 3=rc, 4=stable)
287287
*
288288
* @return boolean Result

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

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -487,32 +487,57 @@ public function fetchExtensionCompatibility()
487487
$model = $this->getModel('Update');
488488
$upgradeCompatibilityStatus = $model->fetchCompatibility($extensionID, $joomlaTargetVersion);
489489
$currentCompatibilityStatus = $model->fetchCompatibility($extensionID, $joomlaCurrentVersion);
490+
$upgradeUpdateVersion = false;
491+
$currentUpdateVersion = false;
490492

491493
$upgradeWarning = 0;
492494

493-
if ($upgradeCompatibilityStatus->state == 1 && $upgradeCompatibilityStatus->compatibleVersion !== false)
495+
if ($upgradeCompatibilityStatus->state == 1 && !empty($upgradeCompatibilityStatus->compatibleVersions))
494496
{
495-
if (version_compare($upgradeCompatibilityStatus->compatibleVersion, $extensionVersion, 'gt'))
497+
$upgradeUpdateVersion = end($upgradeCompatibilityStatus->compatibleVersions);
498+
}
499+
500+
if ($currentCompatibilityStatus->state == 1 && !empty($currentCompatibilityStatus->compatibleVersions))
501+
{
502+
$currentUpdateVersion = end($currentCompatibilityStatus->compatibleVersions);
503+
}
504+
505+
if ($upgradeUpdateVersion !== false)
506+
{
507+
$upgradeOldestVersion = $upgradeCompatibilityStatus->compatibleVersions[0];
508+
509+
if ($currentUpdateVersion !== false)
496510
{
497-
// Extension needs upgrade before upgrading Joomla
511+
// If there are updates compatible with both CMS versions use these
512+
$bothCompatibleVersions = array_values(
513+
array_intersect($upgradeCompatibilityStatus->compatibleVersions, $currentCompatibilityStatus->compatibleVersions)
514+
);
515+
516+
if (!empty($bothCompatibleVersions))
517+
{
518+
$upgradeOldestVersion = $bothCompatibleVersions[0];
519+
$upgradeUpdateVersion = end($bothCompatibleVersions);
520+
}
521+
}
522+
523+
if (version_compare($upgradeOldestVersion, $extensionVersion, '>'))
524+
{
525+
// Installed version is empty or older than the oldest compatible update: Update required
498526
$resultGroup = 2;
499527
}
500528
else
501529
{
502-
// Current version is up to date and compatible
530+
// Current version is compatible
503531
$resultGroup = 3;
504532
}
505533

506-
if ($currentCompatibilityStatus->state == 1)
534+
if ($currentUpdateVersion !== false && version_compare($upgradeUpdateVersion, $currentUpdateVersion, '<'))
507535
{
508-
if (version_compare($upgradeCompatibilityStatus->compatibleVersion, $currentCompatibilityStatus->compatibleVersion, 'lt'))
509-
{
510-
// Special case warning when version compatible with target is lower than current
511-
$upgradeWarning = 2;
512-
}
536+
// Special case warning when version compatible with target is lower than current
537+
$upgradeWarning = 2;
513538
}
514539
}
515-
elseif ($currentCompatibilityStatus->state == 1)
540+
elseif ($currentUpdateVersion !== false)
516541
{
517542
// No compatible version for target version but there is a compatible version for current version
518543
$resultGroup = 1;
@@ -525,8 +550,14 @@ public function fetchExtensionCompatibility()
525550

526551
// Do we need to capture
527552
$combinedCompatibilityStatus = array(
528-
'upgradeCompatibilityStatus' => $upgradeCompatibilityStatus,
529-
'currentCompatibilityStatus' => $currentCompatibilityStatus,
553+
'upgradeCompatibilityStatus' => (object) array(
554+
'state' => $upgradeCompatibilityStatus->state,
555+
'compatibleVersion' => $upgradeUpdateVersion
556+
),
557+
'currentCompatibilityStatus' => (object) array(
558+
'state' => $currentCompatibilityStatus->state,
559+
'compatibleVersion' => $currentUpdateVersion
560+
),
530561
'resultGroup' => $resultGroup,
531562
'upgradeWarning' => $upgradeWarning,
532563
);

0 commit comments

Comments
 (0)