Skip to content

Commit

Permalink
Merge branch '5.1-dev' into feature/5.1-dev/replace-img-by-jlayout
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed Feb 28, 2024
2 parents 3007f35 + 82ff6b5 commit b68ea65
Show file tree
Hide file tree
Showing 229 changed files with 4,971 additions and 548 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-translation-pull-request-v5.yml
Original file line number Diff line number Diff line change
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 5.0-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[5.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[5.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.0-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--
-- Table structure for table `#__tuf_metadata`
--

CREATE TABLE IF NOT EXISTS `#__tuf_metadata` (
`id` int NOT NULL AUTO_INCREMENT,
`update_site_id` int DEFAULT 0,
`root` text DEFAULT NULL,
`targets` text DEFAULT NULL,
`snapshot` text DEFAULT NULL,
`timestamp` text DEFAULT NULL,
`mirrors` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci COMMENT='Secure TUF Updates';

-- --------------------------------------------------------
INSERT INTO `#__tuf_metadata` (`update_site_id`, `root`)
VALUES ((SELECT ue.`update_site_id` FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) WHERE e.`type`='file' AND e.`element`='joomla'), '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}');

-----------------------------------------------------------
UPDATE `#__update_sites`
SET `type` = 'tuf', `location` = 'https://update.joomla.org/cms/'
WHERE `update_site_id` = (SELECT ue.`update_site_id` FROM `#__update_sites_extensions` AS ue JOIN `#__extensions` AS e ON (e.`extension_id` = ue.`extension_id`) WHERE e.`type`='file' AND e.`element`='joomla');
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--
-- Table structure for table "#__tuf_metadata"
--

CREATE TABLE IF NOT EXISTS "#__tuf_metadata" (
"id" serial NOT NULL,
"update_site_id" bigint DEFAULT 0 NOT NULL,
"root" text DEFAULT NULL,
"targets" text DEFAULT NULL,
"snapshot" text DEFAULT NULL,
"timestamp" text DEFAULT NULL,
"mirrors" text DEFAULT NULL,
PRIMARY KEY ("id")
);

COMMENT ON TABLE "#__tuf_metadata" IS 'Secure TUF Updates';

INSERT INTO "#__tuf_metadata" ("update_site_id", "root")
VALUES ((SELECT ue."update_site_id" FROM "#__update_sites_extensions" AS ue JOIN "#__extensions" AS e ON (e."extension_id" = ue."extension_id") WHERE e."type"='file' AND e."element"='joomla'), '{"signed":{"_type":"root","spec_version":"1.0","version":2,"expires":"2025-03-02T11:22:17Z","keys":{"07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"9b2af2d9b9727227735253d795bd27ea8f0e294a5f3603e822dc5052b44802b9"}},"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"a18e5ebabc19d5d5984b601a292ece61ba3662ab2d071dc520da5bd4f8948799"}},"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"cb0a7a131961a20edea051d6dc2b091fb650bd399bd8514adb67b3c60db9f8f9"}},"31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"589d029a68b470deff1ca16dbf3eea6b5b3fcba0ae7bb52c468abc7fb058b2a2"}},"9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc":{"keytype":"ed25519","scheme":"ed25519","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"6043c8bacc76ac5c9750f45454dd865c6ca1fc57d69e14cc192cfd420f6a66a9"}}},"roles":{"root":{"keyids":["1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"snapshot":{"keyids":["07eb082f367c034a95878687f6648aa76d93652b6ee73e58817053d89af6c44f","2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e"],"threshold":1},"targets":{"keyids":["31dd7c7290d664c9b88c0dead2697175293ea7df81b7f24153a37370fd3901c3"],"threshold":1},"timestamp":{"keyids":["9e41a9d62d94c6a1c8a304f62c5bd72d84a9f286f27e8327cedeacb09e5156cc"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"2dcaf3d0e552f150792f7c636d45429246dcfa34ac35b46a44f5c87cd17d457e","sig":"2a225a560ec0837b721d4c5e379fedbd3c7c9079a94e6b31e47e0184c8b95421b6036b4286c5d90f29ab4c468d79a712fdb65e96511394ceb3aa8e2b3983a501"},{"keyid":"1b1b1dd55b2c1c7258714cf1c1ae06f23e4607b28c762d016a9d81c48ffe5669","sig":"8ce0b2a7bdc1e6dcba12081f440510df0a593c072dcf591631c2dd0f456844a7da63be8e8ac31ffbddf42641fde84dc733a336031d182c2163b4c1eaf2117005"}]}');

UPDATE "#__update_sites"
SET "type" = 'tuf', "location" = 'https://update.joomla.org/cms/'
WHERE "update_site_id" = (SELECT ue."update_site_id" FROM "#__update_sites_extensions" AS ue JOIN "#__extensions" AS e ON (e."extension_id" = ue."extension_id") WHERE e."type"='file' AND e."element"='joomla');

Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class BannersHelper extends ContentHelper
*/
public static function updateReset()
{
$db = Factory::getDbo();
$date = Factory::getDate();
$app = Factory::getApplication();
$user = $app->getIdentity();
$db = Factory::getDbo();
$nowDate = Factory::getDate()->toSql();
$app = Factory::getApplication();
$user = $app->getIdentity();

$query = $db->getQuery(true)
->select('*')
Expand All @@ -52,7 +52,7 @@ public static function updateReset()
$db->quoteName('reset') . ' IS NOT NULL',
]
)
->bind(':date', $date)
->bind(':date', $nowDate)
->extendWhere(
'AND',
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_CACHE_SETTINGS');
$this->description = '';
$this->fieldsname = 'cache';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_COOKIE_SETTINGS');
$this->description = '';
$this->fieldsname = 'cookie';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_DATABASE_SETTINGS');
$this->description = '';
$this->fieldsname = 'database';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_DEBUG_SETTINGS');
$this->description = '';
$this->fieldsname = 'debug';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_TEXT_FILTER_SETTINGS');
$this->description = '';
$this->fieldsname = 'filters';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_LOCATION_SETTINGS');
$this->description = '';
$this->fieldsname = 'locale';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_LOGGING_SETTINGS');
$this->description = '';
$this->fieldsname = 'logging';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_LOGGING_CUSTOM_SETTINGS');
$this->description = '';
$this->fieldsname = 'logging_custom';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
$ajaxUri = Route::_('index.php?option=com_config&task=application.sendtestmail&format=json');

$this->name = Text::_('COM_CONFIG_MAIL_SETTINGS');
$this->description = '';
$this->fieldsname = 'mail';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_METADATA_SETTINGS');
$this->description = '';
$this->fieldsname = 'metadata';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_PROXY_SETTINGS');
$this->description = '';
$this->fieldsname = 'proxy';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_SEO_SETTINGS');
$this->description = Text::_('COM_CONFIG_SEO_SETTINGS_DESC');
$this->fieldsname = 'seo';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_SERVER_SETTINGS');
$this->description = '';
$this->fieldsname = 'server';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_SESSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'session';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_SITE_SETTINGS');
$this->description = '';
$this->fieldsname = 'site';
$this->formclass = 'options-form';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
defined('_JEXEC') or die;

$this->name = Text::_('COM_CONFIG_WEBSERVICES_SETTINGS');
$this->description = '';
$this->fieldsname = 'webservices';
$this->formclass = 'options-form';

Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_finder/src/Indexer/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ public function __construct($term, $lang, $spacer = ' ')
// Tokens can be a single word or an array of words representing a phrase.
if (\is_array($term)) {
// Populate the token instance.
$langs = array_fill(0, \count($term), $lang);
$this->term = implode($spacer, $term);
$this->stem = implode($spacer, array_map([Helper::class, 'stem'], $term, [$lang]));
$this->stem = implode($spacer, array_map([Helper::class, 'stem'], $term, $langs));
$this->numeric = false;
$this->common = false;
$this->phrase = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Table\Table;
use Joomla\Component\Guidedtours\Administrator\Helper\GuidedtoursHelper;

Expand Down Expand Up @@ -232,7 +231,7 @@ protected function loadFormData()
*
* @param integer $pk The id of the primary key.
*
* @return CMSObject|boolean Object on success, false on failure.
* @return \stdClass|boolean Object on success, false on failure.
*
* @since 4.3.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected function loadFormData()
*
* @param integer|string $pk The id or uid of the tour.
*
* @return CMSObject|boolean Object on success, false on failure.
* @return \stdClass|boolean Object on success, false on failure.
*
* @since 4.3.0
*/
Expand Down
17 changes: 17 additions & 0 deletions administrator/components/com_installer/src/Model/UpdateModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,23 @@ public function update($uids, $minimumStability = Updater::STABILITY_STABLE)
continue;
}

$app = Factory::getApplication();
$db = $this->getDatabase();
$query = $db->getQuery(true)
->select('type')
->from('#__update_sites')
->where($db->quoteName('update_site_id') . ' = :id')
->bind(':id', $instance->update_site_id, ParameterType::INTEGER);

$updateSiteType = (string) $db->setQuery($query)->loadResult();

// TUF is currently only supported for Joomla core
if ($updateSiteType === 'tuf') {
$app->enqueueMessage(Text::_('JLIB_INSTALLER_TUF_NOT_AVAILABLE'), 'error');

return;
}

$update->loadFromXml($instance->detailsurl, $minimumStability);

// Find and use extra_query from update_site if available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function loadFormData()
*
* @param integer $pk The id of the primary key.
*
* @return CMSObject|boolean Object on success, false on failure.
* @return \stdClass|boolean Object on success, false on failure.
*
* @since 4.0.0
*/
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_joomlaupdate/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
validate="options"
>
<!-- Note: Changed the values lts to default and sts to next with 3.4.0 -->
<!-- Eliminated the 'nochange' option with 3.4.0 -->
<!-- All invalid/unsupported/obsolete options equated to default in code with 3.4.0 -->
<option value="default">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DEFAULT</option>
<option value="next">COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NEXT</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ public function download()
$message = null;
$messageType = null;

// The versions mismatch
if ($result['version'] !== $this->input->get('targetVersion')) {
$message = Text::_('COM_JOOMLAUPDATE_VIEW_UPDATE_VERSION_WRONG');
$messageType = 'error';
$url = 'index.php?option=com_joomlaupdate';

$this->app->setUserState('com_joomlaupdate.file', null);
$this->setRedirect($url, $message, $messageType);

Log::add($message, Log::ERROR, 'Update');

return;
}

// The validation was not successful so stop.
if ($result['check'] === false) {
$message = Text::_('COM_JOOMLAUPDATE_VIEW_UPDATE_CHECKSUM_WRONG');
Expand All @@ -71,11 +85,7 @@ public function download()
$this->app->setUserState('com_joomlaupdate.file', null);
$this->setRedirect($url, $message, $messageType);

try {
Log::add($message, Log::ERROR, 'Update');
} catch (\RuntimeException $exception) {
// Informational log only
}
Log::add($message, Log::ERROR, 'Update');

return;
}
Expand Down

0 comments on commit b68ea65

Please sign in to comment.