diff --git a/.drone.yml b/.drone.yml index 076b5064f8977..954b3df2b709c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -415,11 +415,11 @@ steps: path: /reference when: branch: - - 4.1-dev + - 4.2-dev --- kind: signature -hmac: daa8e5588cc88058bc57aadf35e3d9dd55eefaa9419c457ce374a0dd19eb7cda +hmac: d9707d261edba35bc6b70f09a1babee119cb0a88cebda40171248e5c0a8b135e ... diff --git a/README.md b/README.md index 54e3d085974dd..6ca05e6ba09cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Joomla! CMS™ +Joomla! CMS™ ==================== Build Status @@ -11,8 +11,8 @@ Overview --------------------- * This is the source of Joomla! 4.x. * Joomla's [Official website](https://www.joomla.org). -* Joomla! 4.1 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_4.1_version_history). -* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/4.0-dev). +* Joomla! 4.2 [version history](https://docs.joomla.org/Special:MyLanguage/Joomla_4.2_version_history). +* Detailed changes are in the [changelog](https://github.com/joomla/joomla-cms/commits/4.2-dev). What is Joomla? --------------------- @@ -47,7 +47,7 @@ cd joomla-cms ``` - Go to the 4.0-dev branch: ```bash -git checkout 4.0-dev +git checkout 4.2-dev ``` - Install all the needed composer packages: ```bash diff --git a/README.txt b/README.txt index a4539409f9872..d36d3afafc030 100644 --- a/README.txt +++ b/README.txt @@ -3,8 +3,8 @@ Joomla! CMS™ 1- Overview * This is a Joomla! 4.x installation/upgrade package. * Joomla! Official site: https://www.joomla.org - * Joomla! 4.1 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_4.1_version_history - * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.0-dev + * Joomla! 4.2 version history - https://docs.joomla.org/Special:MyLanguage/Joomla_4.2_version_history + * Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.2-dev 2- What is Joomla? * Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications. diff --git a/administrator/components/com_associations/src/Helper/AssociationsHelper.php b/administrator/components/com_associations/src/Helper/AssociationsHelper.php index c5042cb8bb432..6ffe26d80aa48 100644 --- a/administrator/components/com_associations/src/Helper/AssociationsHelper.php +++ b/administrator/components/com_associations/src/Helper/AssociationsHelper.php @@ -106,7 +106,7 @@ public static function getItem($extensionName, $typeName, $itemId) { if (!self::hasSupport($extensionName)) { - return array(); + return null; } // Get the extension specific helper method @@ -176,7 +176,7 @@ private static function loadHelper($extensionName) * * @param string $extensionName The extension name with com_ * - * @return boolean + * @return string * * @since 3.7.0 */ diff --git a/administrator/components/com_categories/src/Model/CategoryModel.php b/administrator/components/com_categories/src/Model/CategoryModel.php index cdff9e7b88b5b..1d01605d19817 100644 --- a/administrator/components/com_categories/src/Model/CategoryModel.php +++ b/administrator/components/com_categories/src/Model/CategoryModel.php @@ -345,7 +345,7 @@ protected function loadFormData() if (!$data->id) { // Check for which extension the Category Manager is used and get selected fields - $extension = substr($app->getUserState('com_categories.categories.filter.extension'), 4); + $extension = substr($app->getUserState('com_categories.categories.filter.extension', ''), 4); $filters = (array) $app->getUserState('com_categories.categories.' . $extension . '.filter'); $data->set( diff --git a/administrator/components/com_config/src/View/Component/HtmlView.php b/administrator/components/com_config/src/View/Component/HtmlView.php index 7cab257502611..2da29fe74f0de 100644 --- a/administrator/components/com_config/src/View/Component/HtmlView.php +++ b/administrator/components/com_config/src/View/Component/HtmlView.php @@ -66,7 +66,7 @@ public function display($tpl = null) if (!$component->enabled) { - return false; + return; } $form = $this->get('form'); @@ -76,7 +76,7 @@ public function display($tpl = null) { Factory::getApplication()->enqueueMessage($e->getMessage(), 'error'); - return false; + return; } $this->fieldsets = $form ? $form->getFieldsets() : null; diff --git a/administrator/components/com_contact/src/Service/HTML/AdministratorService.php b/administrator/components/com_contact/src/Service/HTML/AdministratorService.php index 9bb656da8064c..7255f69339d97 100644 --- a/administrator/components/com_contact/src/Service/HTML/AdministratorService.php +++ b/administrator/components/com_contact/src/Service/HTML/AdministratorService.php @@ -34,7 +34,7 @@ class AdministratorService * * @return string The language HTML * - * @throws Exception + * @throws \Exception */ public function association($contactid) { diff --git a/administrator/components/com_content/forms/article.xml b/administrator/components/com_content/forms/article.xml index 88cefa8d3d71a..0a37b2d41aebb 100644 --- a/administrator/components/com_content/forms/article.xml +++ b/administrator/components/com_content/forms/article.xml @@ -920,11 +920,13 @@ diff --git a/administrator/components/com_content/src/Model/ArticleModel.php b/administrator/components/com_content/src/Model/ArticleModel.php index 60a1273f26c36..8163148b54d78 100644 --- a/administrator/components/com_content/src/Model/ArticleModel.php +++ b/administrator/components/com_content/src/Model/ArticleModel.php @@ -11,6 +11,7 @@ \defined('_JEXEC') or die; +use Joomla\CMS\Date\Date; use Joomla\CMS\Event\AbstractEvent; use Joomla\CMS\Factory; use Joomla\CMS\Filter\InputFilter; diff --git a/administrator/components/com_content/src/Model/ArticlesModel.php b/administrator/components/com_content/src/Model/ArticlesModel.php index 963f489807665..a8f20368bebb6 100644 --- a/administrator/components/com_content/src/Model/ArticlesModel.php +++ b/administrator/components/com_content/src/Model/ArticlesModel.php @@ -88,7 +88,7 @@ public function __construct($config = array()) * @param array $data data * @param boolean $loadData load current data * - * @return Form|null The \JForm object or null if the form can't be found + * @return \Joomla\CMS\Form\Form|null The Form object or null if the form can't be found * * @since 3.2 */ diff --git a/administrator/components/com_fields/src/Plugin/FieldsPlugin.php b/administrator/components/com_fields/src/Plugin/FieldsPlugin.php index a77e45fda7172..5d2554d0f171e 100644 --- a/administrator/components/com_fields/src/Plugin/FieldsPlugin.php +++ b/administrator/components/com_fields/src/Plugin/FieldsPlugin.php @@ -148,11 +148,6 @@ public function onCustomFieldsPrepareField($context, $item, $field) // Get the path for the layout file $path = PluginHelper::getLayoutPath('fields', $this->_name, $field->type); - if (!file_exists($path)) - { - $path = PluginHelper::getLayoutPath('fields', $this->_name, $field->type); - } - // Render the layout ob_start(); include $path; @@ -269,8 +264,8 @@ public function onContentPrepareForm(Form $form, $data) /** * Returns the path of the XML definition file for the field parameters * - * @param Form $form The form - * @param stdClass $data The data + * @param Form $form The form + * @param \stdClass $data The data * * @return string * diff --git a/administrator/components/com_finder/src/Field/ContentmapField.php b/administrator/components/com_finder/src/Field/ContentmapField.php index 44dcc933c9b26..2f72812f33b11 100644 --- a/administrator/components/com_finder/src/Field/ContentmapField.php +++ b/administrator/components/com_finder/src/Field/ContentmapField.php @@ -79,7 +79,7 @@ protected function getGroups() } catch (\RuntimeException $e) { - return; + return []; } // Build the grouped list array. diff --git a/administrator/components/com_finder/src/Indexer/Query.php b/administrator/components/com_finder/src/Indexer/Query.php index 08cbcc97f114b..d78e007485c17 100644 --- a/administrator/components/com_finder/src/Indexer/Query.php +++ b/administrator/components/com_finder/src/Indexer/Query.php @@ -1065,7 +1065,6 @@ protected function processString($input, $lang, $mode) // Adjust the loop. $i += 2; - continue; } // Handle the OR operator. elseif ($op === 'OR' && isset($terms[$i + 2])) @@ -1135,7 +1134,6 @@ protected function processString($input, $lang, $mode) // Adjust the loop. $i += 2; - continue; } } // Handle an orphaned OR operator. @@ -1183,7 +1181,6 @@ protected function processString($input, $lang, $mode) // Adjust the loop. $i++; - continue; } // Handle the NOT operator. elseif (isset($terms[$i + 1]) && array_search($terms[$i], $operators, true) === 'NOT') diff --git a/administrator/components/com_installer/src/Controller/UpdateController.php b/administrator/components/com_installer/src/Controller/UpdateController.php index a8e9d4d98803d..c13ddad972e44 100644 --- a/administrator/components/com_installer/src/Controller/UpdateController.php +++ b/administrator/components/com_installer/src/Controller/UpdateController.php @@ -108,14 +108,14 @@ public function find() if ($disabledUpdateSites) { $updateSitesUrl = Route::_('index.php?option=com_installer&view=updatesites'); - $this->setMessage(Text::sprintf('COM_INSTALLER_MSG_UPDATE_SITES_COUNT_CHECK', $updateSitesUrl), 'warning'); + $this->app->enqueueMessage(Text::sprintf('COM_INSTALLER_MSG_UPDATE_SITES_COUNT_CHECK', $updateSitesUrl), 'warning'); } $model->findUpdates(0, $cache_timeout, $minimum_stability); if (0 === $model->getTotal()) { - $this->setMessage(Text::_('COM_INSTALLER_MSG_UPDATE_NOUPDATES'), 'info'); + $this->app->enqueueMessage(Text::_('COM_INSTALLER_MSG_UPDATE_NOUPDATES'), 'info'); } $this->setRedirect(Route::_('index.php?option=com_installer&view=update', false)); diff --git a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php index 5f33eaed2141d..1053188f2fb4f 100644 --- a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php +++ b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php @@ -1073,7 +1073,7 @@ public function removePackageFiles() foreach ($files as $file) { - if (File::exists($file)) + if ($file !== null && File::exists($file)) { File::delete($file); } diff --git a/administrator/components/com_languages/src/Model/InstalledModel.php b/administrator/components/com_languages/src/Model/InstalledModel.php index 0b2eb497dc942..0660c31dba961 100644 --- a/administrator/components/com_languages/src/Model/InstalledModel.php +++ b/administrator/components/com_languages/src/Model/InstalledModel.php @@ -239,7 +239,6 @@ public function getData() && stripos($installedLanguage->language, $search) === false) { unset($installedLanguages[$key]); - continue; } } } diff --git a/administrator/components/com_mails/forms/template.xml b/administrator/components/com_mails/forms/template.xml index bcc515cfbe1f3..b8676c8f77513 100644 --- a/administrator/components/com_mails/forms/template.xml +++ b/administrator/components/com_mails/forms/template.xml @@ -28,7 +28,8 @@ name="htmlbody" type="editor" label="COM_MAILS_FIELD_HTMLBODY_LABEL" - buttons="false" + buttons="true" + hide="fields,pagebreak,readmore,module" class="inputbox" filter="JComponentHelper::filterText" /> diff --git a/administrator/components/com_media/resources/scripts/components/browser/items/image.vue b/administrator/components/com_media/resources/scripts/components/browser/items/image.vue index ad117dc1ade50..1ec2fd16a6a04 100644 --- a/administrator/components/com_media/resources/scripts/components/browser/items/image.vue +++ b/administrator/components/com_media/resources/scripts/components/browser/items/image.vue @@ -4,7 +4,8 @@ @dblclick="openPreview()" @mouseleave="hideActions()" > -
+
-
+
{{ item.name }} {{ item.filetype }}

- +

diff --git a/administrator/components/com_templates/src/Model/TemplateModel.php b/administrator/components/com_templates/src/Model/TemplateModel.php index 36afddbf29757..bd5f3fd1c3544 100644 --- a/administrator/components/com_templates/src/Model/TemplateModel.php +++ b/administrator/components/com_templates/src/Model/TemplateModel.php @@ -273,9 +273,9 @@ function ($a, $b) /** * Prepare core files. * - * @param string $dir The path of the directory to scan. - * @param string $element The path of the template element. - * @param stdClass $template The stdClass object of template. + * @param string $dir The path of the directory to scan. + * @param string $element The path of the template element. + * @param \stdClass $template The stdClass object of template. * * @return array * diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml index c8659ad484aeb..dacc5f79ed5bd 100644 --- a/administrator/language/en-GB/install.xml +++ b/administrator/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (en-GB) en-GB - 4.1.0 + 4.2.0 January 2022 Joomla! Project admin@joomla.org diff --git a/administrator/language/en-GB/langmetadata.xml b/administrator/language/en-GB/langmetadata.xml index 2e8da753bf0a5..a7be25c6c1d8c 100644 --- a/administrator/language/en-GB/langmetadata.xml +++ b/administrator/language/en-GB/langmetadata.xml @@ -1,7 +1,7 @@ English (en-GB) - 4.1.0 + 4.2.0 January 2022 Joomla! Project admin@joomla.org diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml index 77e57ae86ed26..84402f72b2c08 100644 --- a/administrator/manifests/files/joomla.xml +++ b/administrator/manifests/files/joomla.xml @@ -6,7 +6,7 @@ www.joomla.org (C) 2019 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt - 4.1.0-dev + 4.2.0-dev January 2022 FILES_JOOMLA_XML_DESCRIPTION diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index a2d47e858cbda..5703987769047 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -2,7 +2,7 @@ English (en-GB) Language Pack en-GB - 4.1.0.1 + 4.2.0.1 January 2022 Joomla! Project admin@joomla.org diff --git a/administrator/modules/mod_sampledata/tmpl/default.php b/administrator/modules/mod_sampledata/tmpl/default.php index b7a9123b807b0..6effa8da33976 100644 --- a/administrator/modules/mod_sampledata/tmpl/default.php +++ b/administrator/modules/mod_sampledata/tmpl/default.php @@ -32,7 +32,7 @@ $item) : ?>
  • -
    +
    title, ENT_QUOTES, 'UTF-8'); ?>
    diff --git a/api/language/en-GB/install.xml b/api/language/en-GB/install.xml index 7a97416e4d1e9..73660740293cf 100644 --- a/api/language/en-GB/install.xml +++ b/api/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (en-GB) en-GB - 4.1.0 + 4.2.0 January 2022 Joomla! Project admin@joomla.org diff --git a/api/language/en-GB/langmetadata.xml b/api/language/en-GB/langmetadata.xml index c71909c412579..cdbc39cfb98d6 100644 --- a/api/language/en-GB/langmetadata.xml +++ b/api/language/en-GB/langmetadata.xml @@ -1,7 +1,7 @@ English (en-GB) - 4.1.0 + 4.2.0 January 2022 Joomla! Project admin@joomla.org diff --git a/build.xml b/build.xml index eca54ed52ef28..02218eaf40946 100644 --- a/build.xml +++ b/build.xml @@ -85,7 +85,7 @@ - + diff --git a/build/media_source/plg_installer_webinstaller/scss/client.scss b/build/media_source/plg_installer_webinstaller/scss/client.scss index bb4197bc89879..a4122639f36f3 100644 --- a/build/media_source/plg_installer_webinstaller/scss/client.scss +++ b/build/media_source/plg_installer_webinstaller/scss/client.scss @@ -20,6 +20,19 @@ $extension-types: ( // Extension type badges .badge { margin: 1px; + // BS5 Dropped all .badge-* color classes + &.badge-success { + background-color: var(--success); + } + &.badge-secondary { + background-color: var(--secondary); + } + &.badge-danger { + background-color: var(--danger); + } + &.badge-warning { + background-color: var(--warning); + } } .fader { @@ -57,7 +70,7 @@ $extension-types: ( margin-bottom: 2rem; &:hover { - background-color: $white; + background-color: var(--gray-200); } } @@ -111,58 +124,23 @@ $extension-types: ( .form-row { display: flex; .col-md:first-child { - margin-right: .8rem; + margin-inline-end: .8rem; } .input-group { - > input#com-apps-searchbox { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; - } - .input-group-append { button#search-extensions { - color: var(--template-text-light); - background-color: var(--template-link-color); - border-color: var(--template-link-color); - border-top-left-radius: 0; - border-bottom-left-radius: 0; + border-start-start-radius: 0; + border-end-start-radius: 0; } button#search-reset { margin-inline-start: .8rem; - background-color: var(--template-bg-dark); - border-radius: .25rem; - } - } - } - } -} - -/* stylelint-disable selector-max-compound-selectors */ -html[dir=rtl] .com-apps-container { - .form-row { - .col-md:first-child { - margin-left: .8rem; - } - .input-group { - > input#com-apps-searchbox { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; - } - - .input-group-append { - button#search-extensions { - border-top-left-radius: .25rem; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: .25rem; } } } } } -/* stylelint-enable selector-max-compound-selectors */ // Disallow scrolling when overlay is active .ifw-busy { diff --git a/components/com_content/src/View/Category/HtmlView.php b/components/com_content/src/View/Category/HtmlView.php index cf1129a7dba96..90e31bf226918 100644 --- a/components/com_content/src/View/Category/HtmlView.php +++ b/components/com_content/src/View/Category/HtmlView.php @@ -140,10 +140,6 @@ public function display($tpl = null) { $this->link_items[] = $item; } - else - { - continue; - } } } diff --git a/components/com_users/src/Controller/DisplayController.php b/components/com_users/src/Controller/DisplayController.php index a86ce49d3c295..0d29349d28cde 100644 --- a/components/com_users/src/Controller/DisplayController.php +++ b/components/com_users/src/Controller/DisplayController.php @@ -29,7 +29,7 @@ class DisplayController extends BaseController * @param array|boolean $urlparams An array of safe URL parameters and their variable types, * for valid values see {@link \Joomla\CMS\Filter\InputFilter::clean()}. * - * @return static This object to support chaining. + * @return void * * @since 1.5 * @throws \Exception diff --git a/components/com_users/src/Controller/ProfileController.php b/components/com_users/src/Controller/ProfileController.php index 6c67fbc33f0e1..e53fd9ef1d5c8 100644 --- a/components/com_users/src/Controller/ProfileController.php +++ b/components/com_users/src/Controller/ProfileController.php @@ -72,7 +72,7 @@ public function edit() /** * Method to save a user's profile data. * - * @return void + * @return void|boolean * * @since 1.6 * @throws \Exception diff --git a/composer.lock b/composer.lock index 530979ca39c03..445b8b0e8ce7f 100644 --- a/composer.lock +++ b/composer.lock @@ -1135,16 +1135,16 @@ }, { "name": "joomla/database", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/joomla-framework/database.git", - "reference": "98709eec31d9a3432611adc3c87a4c9a506279d9" + "reference": "142a624df2f48858467de67a4542d77807cc968b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/database/zipball/98709eec31d9a3432611adc3c87a4c9a506279d9", - "reference": "98709eec31d9a3432611adc3c87a4c9a506279d9", + "url": "https://api.github.com/repos/joomla-framework/database/zipball/142a624df2f48858467de67a4542d77807cc968b", + "reference": "142a624df2f48858467de67a4542d77807cc968b", "shasum": "" }, "require": { @@ -1199,7 +1199,7 @@ ], "support": { "issues": "https://github.com/joomla-framework/database/issues", - "source": "https://github.com/joomla-framework/database/tree/2.0.1" + "source": "https://github.com/joomla-framework/database/tree/2.0.2" }, "funding": [ { @@ -1211,7 +1211,7 @@ "type": "github" } ], - "time": "2021-12-10T11:53:59+00:00" + "time": "2022-01-10T02:28:52+00:00" }, { "name": "joomla/di", @@ -4819,7 +4819,7 @@ "TYPO3\\PharStreamWrapper\\": "src/" } }, - "autoload-dev": { + "autoload-dev": { "psr-4": { "Tobscure\\Tests\\JsonApi\\": "tests/" } @@ -10608,5 +10608,5 @@ "platform-overrides": { "php": "7.2.5" }, - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } diff --git a/installation/language/ar-AA/langmetadata.xml b/installation/language/ar-AA/langmetadata.xml index c59e7c1681123..67b01c15ec249 100644 --- a/installation/language/ar-AA/langmetadata.xml +++ b/installation/language/ar-AA/langmetadata.xml @@ -1,7 +1,7 @@ Arabic (اللغة العربية) - 4.0.6 + 4.0.7 January 2022 Dr. Ashraf Damra (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/cs-CZ/langmetadata.xml b/installation/language/cs-CZ/langmetadata.xml index 806b8bc9d3559..a945f4f90b27b 100644 --- a/installation/language/cs-CZ/langmetadata.xml +++ b/installation/language/cs-CZ/langmetadata.xml @@ -1,7 +1,7 @@ Czech (Čeština) - 4.0.6 + 4.0.7 January 2022 Czech Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/cy-GB/langmetadata.xml b/installation/language/cy-GB/langmetadata.xml index 6ec905b77a194..6e62d3d082fa2 100644 --- a/installation/language/cy-GB/langmetadata.xml +++ b/installation/language/cy-GB/langmetadata.xml @@ -1,7 +1,7 @@ Welsh (United Kingdom) - 4.0.6 + 4.0.7 January 2022 Joomla! Project - Welsh Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/da-DK/langmetadata.xml b/installation/language/da-DK/langmetadata.xml index 42e614c5f6287..509e8cd27b9bd 100644 --- a/installation/language/da-DK/langmetadata.xml +++ b/installation/language/da-DK/langmetadata.xml @@ -1,7 +1,7 @@ Danish (Danmark) - 4.0.6 + 4.0.7 January 2022 Danish Translation Team (Transl.: Ronny Buelund) (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/de-AT/joomla.ini b/installation/language/de-AT/joomla.ini index c9c846c10ab07..bbbc075562623 100644 --- a/installation/language/de-AT/joomla.ini +++ b/installation/language/de-AT/joomla.ini @@ -1,6 +1,6 @@ ; Author J!German (Joomla! German Translation Team) ; (C) 2005 Open Source Matters, Inc. -; (C) Translation 2008 - 2021 J!German +; (C) Translation 2008 - 2022 J!German ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 diff --git a/installation/language/de-AT/langmetadata.xml b/installation/language/de-AT/langmetadata.xml index ac99e45b86d75..fb8ba1ee32cfe 100644 --- a/installation/language/de-AT/langmetadata.xml +++ b/installation/language/de-AT/langmetadata.xml @@ -1,8 +1,8 @@ German (Austria) - 4.0.4 - October 2021 + 4.0.6 + January 2022 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-CH/joomla.ini b/installation/language/de-CH/joomla.ini index 334d4287cb80b..e62af8c4e568a 100644 --- a/installation/language/de-CH/joomla.ini +++ b/installation/language/de-CH/joomla.ini @@ -1,6 +1,6 @@ ; Author J!German (Joomla! German Translation Team) ; (C) 2005 Open Source Matters, Inc. -; (C) Translation 2008 - 2021 J!German +; (C) Translation 2008 - 2022 J!German ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 diff --git a/installation/language/de-CH/langmetadata.xml b/installation/language/de-CH/langmetadata.xml index 560c714bb0617..e016d43865607 100644 --- a/installation/language/de-CH/langmetadata.xml +++ b/installation/language/de-CH/langmetadata.xml @@ -1,8 +1,8 @@ German (Switzerland) - 4.0.4 - October 2021 + 4.0.6 + January 2022 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-DE/joomla.ini b/installation/language/de-DE/joomla.ini index c7c33c2acbddf..0956a36e3c357 100644 --- a/installation/language/de-DE/joomla.ini +++ b/installation/language/de-DE/joomla.ini @@ -1,6 +1,6 @@ ; Author J!German (Joomla! German Translation Team) ; (C) 2005 Open Source Matters, Inc. -; (C) Translation 2008 - 2021 J!German +; (C) Translation 2008 - 2022 J!German ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 diff --git a/installation/language/de-DE/langmetadata.xml b/installation/language/de-DE/langmetadata.xml index 201c8c7a96253..45f164c05ff69 100644 --- a/installation/language/de-DE/langmetadata.xml +++ b/installation/language/de-DE/langmetadata.xml @@ -1,8 +1,8 @@ German (Germany) - 4.0.4 - October 2021 + 4.0.6 + January 2022 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-LI/joomla.ini b/installation/language/de-LI/joomla.ini index 9b6226cb28df7..ae6db3753c7d3 100644 --- a/installation/language/de-LI/joomla.ini +++ b/installation/language/de-LI/joomla.ini @@ -1,6 +1,6 @@ ; Author J!German (Joomla! German Translation Team) ; (C) 2005 Open Source Matters, Inc. -; (C) Translation 2008 - 2021 J!German +; (C) Translation 2008 - 2022 J!German ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 diff --git a/installation/language/de-LI/langmetadata.xml b/installation/language/de-LI/langmetadata.xml index cb72185ce08ee..a1febd675753b 100644 --- a/installation/language/de-LI/langmetadata.xml +++ b/installation/language/de-LI/langmetadata.xml @@ -1,8 +1,8 @@ German (Lichtenstein) - 4.0.4 - October 2021 + 4.0.6 + January 2022 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/de-LU/joomla.ini b/installation/language/de-LU/joomla.ini index 9e4c4d749de8f..fbf8aff45cbf8 100644 --- a/installation/language/de-LU/joomla.ini +++ b/installation/language/de-LU/joomla.ini @@ -1,6 +1,6 @@ ; Author J!German (Joomla! German Translation Team) ; (C) 2005 Open Source Matters, Inc. -; (C) Translation 2008 - 2021 J!German +; (C) Translation 2008 - 2022 J!German ; License GNU General Public License version 2 or later; see LICENSE.txt ; Note : All ini files need to be saved as UTF-8 diff --git a/installation/language/de-LU/langmetadata.xml b/installation/language/de-LU/langmetadata.xml index 8fa6309579982..f3bcc0c805c4b 100644 --- a/installation/language/de-LU/langmetadata.xml +++ b/installation/language/de-LU/langmetadata.xml @@ -1,8 +1,8 @@ German (Luxembourg) - 4.0.4 - October 2021 + 4.0.6 + January 2022 J!German (C) 2005 Open Source Matters, Inc. GNU General Public License version 2 or later; see LICENSE.txt diff --git a/installation/language/el-GR/langmetadata.xml b/installation/language/el-GR/langmetadata.xml index 8104504dfaaa8..924b249e56754 100644 --- a/installation/language/el-GR/langmetadata.xml +++ b/installation/language/el-GR/langmetadata.xml @@ -1,7 +1,7 @@ Greek (el-GR) - 4.0.6 + 4.0.7 January 2022 Ομάδα Μετάφρασης στα Ελληνικά: joomla. gr (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-AU/langmetadata.xml b/installation/language/en-AU/langmetadata.xml index 87f8a9362c834..eb3e58fe43b14 100644 --- a/installation/language/en-AU/langmetadata.xml +++ b/installation/language/en-AU/langmetadata.xml @@ -1,7 +1,7 @@ English (Australia) - 4.0.6 + 4.0.7 January 2022 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-GB/langmetadata.xml b/installation/language/en-GB/langmetadata.xml index 21e07f4bcc97b..7c4b9ace040ca 100644 --- a/installation/language/en-GB/langmetadata.xml +++ b/installation/language/en-GB/langmetadata.xml @@ -1,7 +1,7 @@ English (United Kingdom) - 4.1.0 + 4.2.0 January 2022 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/en-US/langmetadata.xml b/installation/language/en-US/langmetadata.xml index 005111acd9af4..716594f7f4bb4 100644 --- a/installation/language/en-US/langmetadata.xml +++ b/installation/language/en-US/langmetadata.xml @@ -1,7 +1,7 @@ English (United States) - 4.0.6 + 4.0.7 January 2022 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/es-ES/langmetadata.xml b/installation/language/es-ES/langmetadata.xml index 57185c069f88a..0d0fbd4d0771a 100644 --- a/installation/language/es-ES/langmetadata.xml +++ b/installation/language/es-ES/langmetadata.xml @@ -1,7 +1,7 @@ Spanish (Spain) - 4.0.6 + 4.0.7 January 2022 Spanish [es-ES] Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/et-EE/langmetadata.xml b/installation/language/et-EE/langmetadata.xml index fda2d388c21b9..c8ced05276f9c 100644 --- a/installation/language/et-EE/langmetadata.xml +++ b/installation/language/et-EE/langmetadata.xml @@ -1,7 +1,7 @@ Estonian - 4.0.6 + 4.0.7 January 2022 Joomla! Project (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/eu-ES/langmetadata.xml b/installation/language/eu-ES/langmetadata.xml index 06a36f61a32db..13a96362036fa 100644 --- a/installation/language/eu-ES/langmetadata.xml +++ b/installation/language/eu-ES/langmetadata.xml @@ -1,7 +1,7 @@ Basque - 4.0.6 + 4.0.7 January 2022 Joomla! Basque Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fa-IR/langmetadata.xml b/installation/language/fa-IR/langmetadata.xml index 292498a3cb19c..2e1a04e7d3fed 100644 --- a/installation/language/fa-IR/langmetadata.xml +++ b/installation/language/fa-IR/langmetadata.xml @@ -1,7 +1,7 @@ Persian (پارسی) - 4.0.6 + 4.0.7 January 2022 JoomlaFarsi.Com Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/fr-FR/langmetadata.xml b/installation/language/fr-FR/langmetadata.xml index ce760f28dd38a..03d0947d4e276 100644 --- a/installation/language/fr-FR/langmetadata.xml +++ b/installation/language/fr-FR/langmetadata.xml @@ -1,7 +1,7 @@ French (fr-FR) - 4.0.6 + 4.0.7 January 2022 Joomla! Project - French translation team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/hu-HU/langmetadata.xml b/installation/language/hu-HU/langmetadata.xml index 6245654d1ba45..44e324f3f2c42 100644 --- a/installation/language/hu-HU/langmetadata.xml +++ b/installation/language/hu-HU/langmetadata.xml @@ -1,7 +1,7 @@ Hungarian (Magyar) - 4.0.6 + 4.0.7 January 2022 Joomla! Magyarország (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/it-IT/joomla.ini b/installation/language/it-IT/joomla.ini index df5a3a9ebe65c..fdae133658ce6 100644 --- a/installation/language/it-IT/joomla.ini +++ b/installation/language/it-IT/joomla.ini @@ -63,7 +63,7 @@ INSTL_DATABASE_ENCRYPTION_MODE_VALUE_NONE="Predefinito (Controllato da server)" INSTL_DATABASE_ENCRYPTION_MODE_VALUE_ONE_WAY="Autenticazione a un fattore" INSTL_DATABASE_ENCRYPTION_MODE_VALUE_TWO_WAY="Autenticazione a due fattori" INSTL_DATABASE_ENCRYPTION_MSG_CONN_NOT_ENCRYPT="Hai selezionato una connessione al database cifrata ma è stata stabilita una connessione non cifrata. Il motivo potrebbe essere dovuto da una settaggio del database impostato per restituire una connessione non cifrata in caso di errata configurazione dei parametri. Controlla e correggi i parametri di crittografia del database, o cambia l'impostazione da \"Connessione cifrata\" a \"Predefinita\"." -INSTL_DATABASE_ENCRYPTION_MSG_FILE_FIELD_BAD="Il file inserito nel campo \“%s\” non esiste o non è accessibile." +INSTL_DATABASE_ENCRYPTION_MSG_FILE_FIELD_BAD="Il file inserito nel campo \“%d\” non esiste o non è accessibile." INSTL_DATABASE_ENCRYPTION_MSG_FILE_FIELD_EMPTY="Il campo \"%s\" è vuoto o non contiene un percorso valido." INSTL_DATABASE_ENCRYPTION_MSG_LOCALHOST="Hai inserito \"localhost\" come nome host. Una connessione cifrata verso il database potrebbe non andare a buon fine. Cambia \"localhost\" in \"127.0.0.1\" o \"::1\" o usa un nome host differente. Altrimenti, cambia il parametro \"Connessione cifrata\" in \"Predefinito\"." INSTL_DATABASE_ENCRYPTION_MSG_SRV_NOT_SUPPORTS="Il server del database non supporta la connessione cifrata. Abilita il supporto TLS (altrimenti chiamato SSL nelle documentazioni) sul server del tuo database, oppure cambia nuovamente il parametro \"Connessione cifrata\" a \"Predefinito\"." @@ -217,8 +217,8 @@ JYES="Sì" ; Framework strings necessary when no lang pack is available JLIB_DATABASE_ERROR_CONNECT_MYSQL="Non è stato possibile connettersi a MySQL." JLIB_DATABASE_ERROR_DATABASE="Si è verificato un errore del database." -JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Non è stato possibile caricare il Database Driver: %s" -JLIB_DATABASE_ERROR_VALID_MAIL="L'indirizzo email inserito non è valido. Inserisci un indirizzo email alternativo." +JLIB_DATABASE_ERROR_LOAD_DATABASE_DRIVER="Non è stato possibile caricare il Database Driver: %s." +JLIB_DATABASE_ERROR_VALID_MAIL="L'indirizzo email inserito non è valido. Inserisci un altro indirizzo email." JLIB_ENVIRONMENT_SESSION_EXPIRED="La tua sessione è scaduta, ricarica la pagina." JLIB_FILESYSTEM_ERROR_PATH_IS_NOT_A_FOLDER="JFolder: :delete: Il percorso non è una cartella. Percorso: %s" JLIB_FORM_FIELD_INVALID="Campo non valido: " diff --git a/installation/language/it-IT/langmetadata.xml b/installation/language/it-IT/langmetadata.xml index cfa089b47e79c..1c83d5675455b 100644 --- a/installation/language/it-IT/langmetadata.xml +++ b/installation/language/it-IT/langmetadata.xml @@ -1,7 +1,7 @@ Italiano (it-IT) - 4.0.6 + 4.0.7 January 2022 Italian Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ja-JP/langmetadata.xml b/installation/language/ja-JP/langmetadata.xml index 782d8f9a365e7..d6c766ea005e6 100644 --- a/installation/language/ja-JP/langmetadata.xml +++ b/installation/language/ja-JP/langmetadata.xml @@ -1,7 +1,7 @@ Japanese (ja-JP) - 4.0.6 + 4.0.7 January 2022 Joomla!じゃぱん (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ka-GE/langmetadata.xml b/installation/language/ka-GE/langmetadata.xml index 57ed637d8621b..57e2dd5822b26 100644 --- a/installation/language/ka-GE/langmetadata.xml +++ b/installation/language/ka-GE/langmetadata.xml @@ -1,7 +1,7 @@ Georgian (Georgia) - 4.0.6 + 4.0.7 January 2022 Georgian Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/lv-LV/langmetadata.xml b/installation/language/lv-LV/langmetadata.xml index c1d4f401f91c0..b9101fe5466fc 100644 --- a/installation/language/lv-LV/langmetadata.xml +++ b/installation/language/lv-LV/langmetadata.xml @@ -1,7 +1,7 @@ Latvian (Latvia) - 4.0.6 + 4.0.7 January 2022 Joomla! Projekts (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/nl-BE/langmetadata.xml b/installation/language/nl-BE/langmetadata.xml index b8395c60db5a7..c1b2173c7097e 100644 --- a/installation/language/nl-BE/langmetadata.xml +++ b/installation/language/nl-BE/langmetadata.xml @@ -1,7 +1,7 @@ Dutch (Belgium) - 4.0.6 + 4.0.7 January 2022 Dutch (BE) translation team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/nl-NL/langmetadata.xml b/installation/language/nl-NL/langmetadata.xml index 49ab0dd1a6d68..bbdd2e7349abe 100644 --- a/installation/language/nl-NL/langmetadata.xml +++ b/installation/language/nl-NL/langmetadata.xml @@ -1,7 +1,7 @@ Dutch (nl-NL) - 4.0.6 + 4.0.7 January 2022 Dutch Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/pl-PL/langmetadata.xml b/installation/language/pl-PL/langmetadata.xml index 5fa04e536a90b..69455de25bcec 100644 --- a/installation/language/pl-PL/langmetadata.xml +++ b/installation/language/pl-PL/langmetadata.xml @@ -1,7 +1,7 @@ Polish (Poland) - 4.0.6 + 4.0.7 January 2022 Projekt Joomla! (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/pt-BR/langmetadata.xml b/installation/language/pt-BR/langmetadata.xml index 897d9ffe52b17..2a860febaae33 100644 --- a/installation/language/pt-BR/langmetadata.xml +++ b/installation/language/pt-BR/langmetadata.xml @@ -1,7 +1,7 @@ Português Brasil (pt-BR) - 4.0.6 + 4.0.7 January 2022 Projeto Joomla! (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/pt-PT/langmetadata.xml b/installation/language/pt-PT/langmetadata.xml index 4e9ad3efb2f63..e84f123cf6a2b 100644 --- a/installation/language/pt-PT/langmetadata.xml +++ b/installation/language/pt-PT/langmetadata.xml @@ -1,7 +1,7 @@ Português (Portugal) - 4.0.6 + 4.0.7 January 2022 Comunidade JoomlaPortugal (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ro-RO/langmetadata.xml b/installation/language/ro-RO/langmetadata.xml index 55129599b9a66..87a5754ab379c 100644 --- a/installation/language/ro-RO/langmetadata.xml +++ b/installation/language/ro-RO/langmetadata.xml @@ -1,7 +1,7 @@ Română (România) - 4.0.6 + 4.0.7 January 2022 Horia Negura - Quanta (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ru-RU/langmetadata.xml b/installation/language/ru-RU/langmetadata.xml index 5e8d2da38c886..d4de3210a498f 100644 --- a/installation/language/ru-RU/langmetadata.xml +++ b/installation/language/ru-RU/langmetadata.xml @@ -1,7 +1,7 @@ Russian (Russia) - 4.0.6 + 4.0.7 January 2022 Russian Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sk-SK/langmetadata.xml b/installation/language/sk-SK/langmetadata.xml index 90f7dd1d83e2a..6444c47527a78 100644 --- a/installation/language/sk-SK/langmetadata.xml +++ b/installation/language/sk-SK/langmetadata.xml @@ -1,7 +1,7 @@ Slovak (Slovakia) - 4.0.6 + 4.0.7 January 2022 Slovak translation team : Peter Michnica (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sl-SI/langmetadata.xml b/installation/language/sl-SI/langmetadata.xml index 6d70f4ac56d01..ce9b9d593d5a7 100644 --- a/installation/language/sl-SI/langmetadata.xml +++ b/installation/language/sl-SI/langmetadata.xml @@ -1,7 +1,7 @@ Slovenščina (Slovenija) - 4.0.6 + 4.0.7 January 2022 Slovenska prevajalska ekipa (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/sv-SE/langmetadata.xml b/installation/language/sv-SE/langmetadata.xml index 111b97b966f6e..82bacb58aaad3 100644 --- a/installation/language/sv-SE/langmetadata.xml +++ b/installation/language/sv-SE/langmetadata.xml @@ -1,7 +1,7 @@ Swedish (Sweden) - 4.0.6 + 4.0.7 January 2022 Swedish Translation Team - SvenskJoomla (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/ta-IN/langmetadata.xml b/installation/language/ta-IN/langmetadata.xml index 7b76553057502..185b7e3c5d71e 100644 --- a/installation/language/ta-IN/langmetadata.xml +++ b/installation/language/ta-IN/langmetadata.xml @@ -1,7 +1,7 @@ Tamil (India) - 4.0.6 + 4.0.7 January 2022 Ilagnayeru 'MIG' Manickam, Elango Samy Manim (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/th-TH/langmetadata.xml b/installation/language/th-TH/langmetadata.xml index 4c6778468dc22..990a62aeb7049 100644 --- a/installation/language/th-TH/langmetadata.xml +++ b/installation/language/th-TH/langmetadata.xml @@ -1,7 +1,7 @@ Thai (ภาษาไทย) - 4.0.6 + 4.0.7 January 2022 Thai Translation Team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/tr-TR/langmetadata.xml b/installation/language/tr-TR/langmetadata.xml index 5aef3b656758a..e925bc2147c4b 100644 --- a/installation/language/tr-TR/langmetadata.xml +++ b/installation/language/tr-TR/langmetadata.xml @@ -1,7 +1,7 @@ Turkish (Turkey) - 4.0.6 + 4.0.7 January 2022 Joomla! Turkey (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/uk-UA/langmetadata.xml b/installation/language/uk-UA/langmetadata.xml index 5c417207be595..3d6a3ace7f1c4 100644 --- a/installation/language/uk-UA/langmetadata.xml +++ b/installation/language/uk-UA/langmetadata.xml @@ -1,7 +1,7 @@ Ukrainian (uk-UA) - 4.0.6 + 4.0.7 January 2022 Joomla! Project - Ukrainian translation team (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/zh-CN/langmetadata.xml b/installation/language/zh-CN/langmetadata.xml index 43159fdcea7ac..6d149a93a1643 100644 --- a/installation/language/zh-CN/langmetadata.xml +++ b/installation/language/zh-CN/langmetadata.xml @@ -1,7 +1,7 @@ 简体中文(中国) - 4.0.6 + 4.0.7 January 2022 逐浪中文网 joomlachina.org.cn 周永建 (C) 2005 Open Source Matters, Inc. diff --git a/installation/language/zh-TW/joomla.ini b/installation/language/zh-TW/joomla.ini index 0b0795aa9958e..9a2d662bd6321 100644 --- a/installation/language/zh-TW/joomla.ini +++ b/installation/language/zh-TW/joomla.ini @@ -105,6 +105,8 @@ INSTL_COMPLETE_ERROR_FOLDER_DELETE="無法刪除資料夾 \"%s\" ,請手動刪 INSTL_COMPLETE_REMOVE_FOLDER="移除 \"%s\" 資料夾" INSTL_COMPLETE_CONGRAT="恭喜!" INSTL_COMPLETE_TITLE="恭喜!你的Joomla網站已經準備好了" +INSTL_COMPLETE_SITE_BTN="網站安裝完成 & 開啟網站首頁" +INSTL_COMPLETE_ADMIN_BTN="網站安裝完成 & 開啟網站後台" INSTL_COMPLETE_FINAL="安裝完成" INSTL_COMPLETE_FINAL_DESC="您的Joomla安裝完成已準備好使用" INSTL_COMPLETE_ADD_EXTRA_LANGUAGE="安裝其他語言" diff --git a/installation/language/zh-TW/langmetadata.xml b/installation/language/zh-TW/langmetadata.xml index a6899d2df9ad4..b17539b52a9e1 100644 --- a/installation/language/zh-TW/langmetadata.xml +++ b/installation/language/zh-TW/langmetadata.xml @@ -1,7 +1,7 @@ 正體中文 (臺灣) - 4.0.6 + 4.0.7 January 2022 Joomla! 專案 (C) 2005 Open Source Matters, Inc. diff --git a/language/en-GB/install.xml b/language/en-GB/install.xml index 27af1b35c807d..b5c586eec48ec 100644 --- a/language/en-GB/install.xml +++ b/language/en-GB/install.xml @@ -2,7 +2,7 @@ English (en-GB) en-GB - 4.1.0 + 4.2.0 January 2022 Joomla! Project admin@joomla.org diff --git a/language/en-GB/langmetadata.xml b/language/en-GB/langmetadata.xml index 8e7544db658db..1239b6afccc1a 100644 --- a/language/en-GB/langmetadata.xml +++ b/language/en-GB/langmetadata.xml @@ -1,7 +1,7 @@ English (en-GB) - 4.1.0 + 4.2.0 January 2022 Joomla! Project admin@joomla.org diff --git a/layouts/plugins/system/privacyconsent/label.php b/layouts/plugins/system/privacyconsent/label.php index 7a0acc2323595..655f11905ca5f 100644 --- a/layouts/plugins/system/privacyconsent/label.php +++ b/layouts/plugins/system/privacyconsent/label.php @@ -91,6 +91,6 @@ } // Add the label text and star. -$label = $link . ' *'; +$label = $link . ''; echo $label; diff --git a/layouts/plugins/user/terms/label.php b/layouts/plugins/user/terms/label.php index 1fea2c1cd5746..1b4d3278a5b58 100644 --- a/layouts/plugins/user/terms/label.php +++ b/layouts/plugins/user/terms/label.php @@ -90,6 +90,6 @@ } // Add the label text and star. -$label = $link . ' *'; +$label = $link . ''; echo $label; diff --git a/libraries/src/Access/Access.php b/libraries/src/Access/Access.php index cb3cfb3d20ae0..c0d63b579988a 100644 --- a/libraries/src/Access/Access.php +++ b/libraries/src/Access/Access.php @@ -1045,7 +1045,7 @@ public static function getAuthorisedViewLevels($userId) } } - return $authorised; + return array_unique($authorised); } // Get all groups that the user is mapped to recursively. @@ -1070,7 +1070,7 @@ public static function getAuthorisedViewLevels($userId) } } - return $authorised; + return array_unique($authorised); } /** diff --git a/libraries/src/Adapter/Adapter.php b/libraries/src/Adapter/Adapter.php index b315888544cdf..738777623b824 100644 --- a/libraries/src/Adapter/Adapter.php +++ b/libraries/src/Adapter/Adapter.php @@ -75,8 +75,8 @@ class Adapter extends CMSObject public function __construct($basepath, $classprefix = null, $adapterfolder = null) { $this->_basepath = $basepath; - $this->_classprefix = $classprefix ? $classprefix : 'J'; - $this->_adapterfolder = $adapterfolder ? $adapterfolder : 'adapters'; + $this->_classprefix = $classprefix ?: 'J'; + $this->_adapterfolder = $adapterfolder ?: 'adapters'; $this->_db = Factory::getDbo(); } diff --git a/libraries/src/Application/ApplicationHelper.php b/libraries/src/Application/ApplicationHelper.php index b244388d5f325..454e5978659d7 100644 --- a/libraries/src/Application/ApplicationHelper.php +++ b/libraries/src/Application/ApplicationHelper.php @@ -182,8 +182,6 @@ public static function getClientInfo($id = null, $byName = false) } } } - - return; } /** diff --git a/libraries/src/Application/CMSApplication.php b/libraries/src/Application/CMSApplication.php index 4b70a394fd06c..93a741f8c272a 100644 --- a/libraries/src/Application/CMSApplication.php +++ b/libraries/src/Application/CMSApplication.php @@ -1137,8 +1137,6 @@ public function setUserState($key, $value) { return $registry->set($key, $value); } - - return; } /** diff --git a/libraries/src/Document/FeedDocument.php b/libraries/src/Document/FeedDocument.php index 1c580a0a4f370..e90261af9cd72 100644 --- a/libraries/src/Document/FeedDocument.php +++ b/libraries/src/Document/FeedDocument.php @@ -203,7 +203,7 @@ public function render($cache = false, $params = array()) $type = CmsFactory::getApplication()->input->get('type', 'rss'); // Instantiate feed renderer and set the mime encoding - $renderer = $this->loadRenderer(($type) ? $type : 'rss'); + $renderer = $this->loadRenderer($type ?: 'rss'); if (!($renderer instanceof DocumentRenderer)) { diff --git a/libraries/src/Document/HtmlDocument.php b/libraries/src/Document/HtmlDocument.php index 1e07878b7e4b1..b097b459c3277 100644 --- a/libraries/src/Document/HtmlDocument.php +++ b/libraries/src/Document/HtmlDocument.php @@ -326,7 +326,7 @@ public function setHeadData($data) * * @param array $data The document head data in array form * - * @return HtmlDocument|null instance of $this to allow chaining or null for empty input data + * @return HtmlDocument|void instance of $this to allow chaining or void for empty input data * * @since 1.7.0 */ diff --git a/libraries/src/Document/Renderer/Html/MetasRenderer.php b/libraries/src/Document/Renderer/Html/MetasRenderer.php index 063028fb1d6f3..371437c0cde93 100644 --- a/libraries/src/Document/Renderer/Html/MetasRenderer.php +++ b/libraries/src/Document/Renderer/Html/MetasRenderer.php @@ -67,7 +67,7 @@ public function render($head, $params = array(), $content = null) { $prettyPrint = (JDEBUG && \defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : false); $jsonOptions = json_encode($scriptOptions, $prettyPrint); - $jsonOptions = $jsonOptions ? $jsonOptions : '{}'; + $jsonOptions = $jsonOptions ?: '{}'; $wa->addInlineScript( $jsonOptions, diff --git a/libraries/src/Environment/Browser.php b/libraries/src/Environment/Browser.php index b9164d05d90bc..0a3acdd115b61 100644 --- a/libraries/src/Environment/Browser.php +++ b/libraries/src/Environment/Browser.php @@ -902,8 +902,6 @@ public function getHTTPProtocol() return substr($_SERVER['SERVER_PROTOCOL'], $pos + 1); } } - - return; } /** diff --git a/libraries/src/Feed/FeedParser.php b/libraries/src/Feed/FeedParser.php index 19a41df4a9027..9e727ddbf8441 100644 --- a/libraries/src/Feed/FeedParser.php +++ b/libraries/src/Feed/FeedParser.php @@ -63,7 +63,7 @@ abstract class FeedParser public function __construct(\XMLReader $stream, InputFilter $inputFilter = null) { $this->stream = $stream; - $this->inputFilter = $inputFilter ? $inputFilter : InputFilter::getInstance(array(), array(), 1, 1); + $this->inputFilter = $inputFilter ?: InputFilter::getInstance([], [], 1, 1); } /** diff --git a/libraries/src/Filesystem/Folder.php b/libraries/src/Filesystem/Folder.php index 3b2c4766e6bbf..f2ccf1340d6a1 100644 --- a/libraries/src/Filesystem/Folder.php +++ b/libraries/src/Filesystem/Folder.php @@ -489,7 +489,7 @@ public static function exists($path) * @param array $excludeFilter Array of filter to exclude * @param boolean $naturalSort False for asort, true for natsort * - * @return array Files in the given folder. + * @return array|boolean Files in the given folder. * * @since 1.7.0 */ diff --git a/libraries/src/Filesystem/Stream.php b/libraries/src/Filesystem/Stream.php index ac459fa1c8548..7c4629a8b81cd 100644 --- a/libraries/src/Filesystem/Stream.php +++ b/libraries/src/Filesystem/Stream.php @@ -894,7 +894,7 @@ public function chmod($filename = '', $mode = 0) /** * Get the stream metadata * - * @return array header/metadata + * @return array|boolean header/metadata * * @link https://www.php.net/manual/en/function.stream-get-meta-data.php * @since 1.7.0 diff --git a/libraries/src/Form/Field/UserField.php b/libraries/src/Form/Field/UserField.php index 0bf7e5a9ae2e6..e7574a08e77de 100644 --- a/libraries/src/Form/Field/UserField.php +++ b/libraries/src/Form/Field/UserField.php @@ -160,8 +160,6 @@ protected function getGroups() { return explode(',', $this->element['groups']); } - - return; } /** @@ -177,7 +175,5 @@ protected function getExcluded() { return explode(',', $this->element['exclude']); } - - return; } } diff --git a/libraries/src/Form/Form.php b/libraries/src/Form/Form.php index e2959094070de..3a1cac1210f54 100644 --- a/libraries/src/Form/Form.php +++ b/libraries/src/Form/Form.php @@ -44,7 +44,7 @@ class Form * @var array * @since 1.7.0 */ - protected $errors = array(); + protected $errors = []; /** * The name of the form instance. @@ -60,7 +60,7 @@ class Form * @var array * @since 1.7.0 */ - protected $options = array(); + protected $options = []; /** * The form XML definition. @@ -76,7 +76,7 @@ class Form * @var Form[] * @since 1.7.0 */ - protected static $forms = array(); + protected static $forms = []; /** * Allows extensions to implement repeating elements @@ -94,7 +94,7 @@ class Form * * @since 1.7.0 */ - public function __construct($name, array $options = array()) + public function __construct($name, array $options = []) { // Set the name for the form. $this->name = $name; @@ -277,7 +277,7 @@ public function getFieldAttribute($name, $attribute, $default = null, $group = n */ public function getFieldset($set = null) { - $fields = array(); + $fields = []; // Get all of the field elements in the fieldset. if ($set) @@ -302,7 +302,7 @@ public function getFieldset($set = null) { // Get the field groups for the element. $attrs = $element->xpath('ancestor::fields[@name]/@name'); - $groups = array_map('strval', $attrs ? $attrs : array()); + $groups = array_map('strval', $attrs ?: []); $group = implode('.', $groups); // If the field is successfully loaded add it to the result array. @@ -326,8 +326,8 @@ public function getFieldset($set = null) */ public function getFieldsets($group = null) { - $fieldsets = array(); - $sets = array(); + $fieldsets = []; + $sets = []; // Make sure there is a valid Form XML document. if (!($this->xml instanceof \SimpleXMLElement)) @@ -452,7 +452,7 @@ public function getFormControl() */ public function getGroup($group, $nested = false) { - $fields = array(); + $fields = []; // Get all of the field elements in the field group. $elements = $this->findFieldsByGroup($group, $nested); @@ -468,7 +468,7 @@ public function getGroup($group, $nested = false) { // Get the field groups for the element. $attrs = $element->xpath('ancestor::fields[@name]/@name'); - $groups = array_map('strval', $attrs ? $attrs : array()); + $groups = array_map('strval', $attrs ?: []); $group = implode('.', $groups); // If the field is successfully loaded add it to the result array. @@ -574,7 +574,7 @@ public function getValue($name, $group = null, $default = null) * * @since 3.2.3 */ - public function renderField($name, $group = null, $default = null, $options = array()) + public function renderField($name, $group = null, $default = null, $options = []) { $field = $this->getField($name, $group, $default); @@ -596,10 +596,10 @@ public function renderField($name, $group = null, $default = null, $options = ar * * @since 3.2.3 */ - public function renderFieldset($name, $options = array()) + public function renderFieldset($name, $options = []) { $fields = $this->getFieldset($name); - $html = array(); + $html = []; foreach ($fields as $field) { @@ -670,7 +670,7 @@ public function load($data, $replace = true, $xpath = null) } // Get the XML elements to load. - $elements = array(); + $elements = []; if ($xpath) { @@ -697,7 +697,7 @@ public function load($data, $replace = true, $xpath = null) { // Get the group names as strings for ancestor fields elements. $attrs = $field->xpath('ancestor::fields[@name]/@name'); - $groups = array_map('strval', $attrs ? $attrs : array()); + $groups = array_map('strval', $attrs ?: []); // Check to see if the field exists in the current form. if ($current = $this->findField((string) $field['name'], implode('.', $groups))) @@ -1133,7 +1133,7 @@ public function filter($data, $group = null) // Get the field groups for the element. $attrs = $field->xpath('ancestor::fields[@name]/@name'); - $groups = array_map('strval', $attrs ? $attrs : array()); + $groups = array_map('strval', $attrs ?: []); $attrGroup = implode('.', $groups); $key = $attrGroup ? $attrGroup . '.' . $name : $name; @@ -1225,7 +1225,7 @@ public function validate($data, $group = null) // Get the field groups for the element. $attrs = $field->xpath('ancestor::fields[@name]/@name'); - $groups = array_map('strval', $attrs ? $attrs : array()); + $groups = array_map('strval', $attrs ?: []); $attrGroup = implode('.', $groups); $key = $attrGroup ? $attrGroup . '.' . $name : $name; @@ -1292,7 +1292,7 @@ public function postProcess($data, $group = null) // Get the field groups for the element. $attrs = $field->xpath('ancestor::fields[@name]/@name'); - $groups = array_map('strval', $attrs ? $attrs : array()); + $groups = array_map('strval', $attrs ?: []); $attrGroup = implode('.', $groups); $key = $attrGroup ? $attrGroup . '.' . $name : $name; @@ -1321,7 +1321,7 @@ public function postProcess($data, $group = null) protected function findField($name, $group = null) { $element = false; - $fields = array(); + $fields = []; // Make sure there is a valid Form XML document. if (!($this->xml instanceof \SimpleXMLElement)) @@ -1358,7 +1358,7 @@ protected function findField($name, $group = null) { // Get the group names as strings for ancestor fields elements. $attrs = $field->xpath('ancestor::fields[@name]/@name'); - $names = array_map('strval', $attrs ? $attrs : array()); + $names = array_map('strval', $attrs ?: []); // If the field is in the exact group use it and break out of the loop. if ($names == (array) $groupNames) @@ -1445,7 +1445,7 @@ protected function &findFieldsByFieldset($name) protected function &findFieldsByGroup($group = null, $nested = false) { $false = false; - $fields = array(); + $fields = []; // Make sure there is a valid Form XML document. if (!($this->xml instanceof \SimpleXMLElement)) @@ -1480,7 +1480,7 @@ protected function &findFieldsByGroup($group = null, $nested = false) { // Get the names of the groups that the field is in. $attrs = $field->xpath('ancestor::fields[@name]/@name'); - $names = array_map('strval', $attrs ? $attrs : array()); + $names = array_map('strval', $attrs ?: []); // If the field is in the specific group then add it to the return list. if ($names == (array) $groupNames) @@ -1518,8 +1518,8 @@ protected function &findFieldsByGroup($group = null, $nested = false) protected function &findGroup($group) { $false = false; - $groups = array(); - $tmp = array(); + $groups = []; + $tmp = []; // Make sure there is a valid Form XML document. if (!($this->xml instanceof \SimpleXMLElement)) @@ -1550,7 +1550,7 @@ protected function &findGroup($group) // Initialise some loop variables. $validNames = \array_slice($group, 0, $i + 1); $current = $tmp; - $tmp = array(); + $tmp = []; // Check to make sure that there are no parent groups for each element. foreach ($current as $element) @@ -1563,7 +1563,7 @@ protected function &findGroup($group) { // Get the group names as strings for ancestor fields elements. $attrs = $fields->xpath('ancestor-or-self::fields[@name]/@name'); - $names = array_map('strval', $attrs ? $attrs : array()); + $names = array_map('strval', $attrs ?: []); // If the group names for the fields element match the valid names at this // level add the fields element. @@ -1679,7 +1679,7 @@ protected function syncPaths() // Get any addfieldpath attributes from the form definition. $paths = $this->xml->xpath('//*[@addfieldpath]/@addfieldpath'); - $paths = array_map('strval', $paths ? $paths : array()); + $paths = array_map('strval', $paths ?: []); // Add the field paths. foreach ($paths as $path) @@ -1690,7 +1690,7 @@ protected function syncPaths() // Get any addformpath attributes from the form definition. $paths = $this->xml->xpath('//*[@addformpath]/@addformpath'); - $paths = array_map('strval', $paths ? $paths : array()); + $paths = array_map('strval', $paths ?: []); // Add the form paths. foreach ($paths as $path) @@ -1701,7 +1701,7 @@ protected function syncPaths() // Get any addrulepath attributes from the form definition. $paths = $this->xml->xpath('//*[@addrulepath]/@addrulepath'); - $paths = array_map('strval', $paths ? $paths : array()); + $paths = array_map('strval', $paths ?: []); // Add the rule paths. foreach ($paths as $path) @@ -1712,7 +1712,7 @@ protected function syncPaths() // Get any addrulepath attributes from the form definition. $paths = $this->xml->xpath('//*[@addfilterpath]/@addfilterpath'); - $paths = array_map('strval', $paths ? $paths : array()); + $paths = array_map('strval', $paths ?: []); // Add the rule paths. foreach ($paths as $path) @@ -1723,7 +1723,7 @@ protected function syncPaths() // Get any addfieldprefix attributes from the form definition. $prefixes = $this->xml->xpath('//*[@addfieldprefix]/@addfieldprefix'); - $prefixes = array_map('strval', $prefixes ? $prefixes : array()); + $prefixes = array_map('strval', $prefixes ?: []); // Add the field prefixes. foreach ($prefixes as $prefix) @@ -1733,7 +1733,7 @@ protected function syncPaths() // Get any addformprefix attributes from the form definition. $prefixes = $this->xml->xpath('//*[@addformprefix]/@addformprefix'); - $prefixes = array_map('strval', $prefixes ? $prefixes : array()); + $prefixes = array_map('strval', $prefixes ?: []); // Add the field prefixes. foreach ($prefixes as $prefix) @@ -1743,7 +1743,7 @@ protected function syncPaths() // Get any addruleprefix attributes from the form definition. $prefixes = $this->xml->xpath('//*[@addruleprefix]/@addruleprefix'); - $prefixes = array_map('strval', $prefixes ? $prefixes : array()); + $prefixes = array_map('strval', $prefixes ?: []); // Add the field prefixes. foreach ($prefixes as $prefix) @@ -1753,7 +1753,7 @@ protected function syncPaths() // Get any addruleprefix attributes from the form definition. $prefixes = $this->xml->xpath('//*[@addfilterprefix]/@addfilterprefix'); - $prefixes = array_map('strval', $prefixes ? $prefixes : array()); + $prefixes = array_map('strval', $prefixes ?: []); // Add the field prefixes. foreach ($prefixes as $prefix) @@ -1840,7 +1840,7 @@ public static function addFilterPath($new = null) * @throws \InvalidArgumentException if no data provided. * @throws \RuntimeException if the form could not be loaded. */ - public static function getInstance($name, $data = null, $options = array(), $replace = true, $xpath = false) + public static function getInstance($name, $data = null, $options = [], $replace = true, $xpath = false) { // Reference to array with form instances $forms = &self::$forms; diff --git a/libraries/src/Form/FormField.php b/libraries/src/Form/FormField.php index 456bf6c5dee90..d328421e3bf69 100644 --- a/libraries/src/Form/FormField.php +++ b/libraries/src/Form/FormField.php @@ -489,8 +489,6 @@ public function __get($name) return $this->dataAttributes[$name]; } } - - return; } /** @@ -749,11 +747,11 @@ protected function getId($fieldId, $fieldName) // If we already have an id segment add the field id/name as another level. if ($id) { - $id .= '_' . ($fieldId ? $fieldId : $fieldName); + $id .= '_' . ($fieldId ?: $fieldName); } else { - $id .= ($fieldId ? $fieldId : $fieldName); + $id .= ($fieldId ?: $fieldName); } // Clean up any invalid characters. diff --git a/libraries/src/Helper/LibraryHelper.php b/libraries/src/Helper/LibraryHelper.php index cc584f4d7c4b9..639e6a4958e6e 100644 --- a/libraries/src/Helper/LibraryHelper.php +++ b/libraries/src/Helper/LibraryHelper.php @@ -102,7 +102,7 @@ public static function getParams($element, $strict = false) * @param string $element Element of the library in the extensions table. * @param Registry $params Params to save * - * @return Registry A Registry object. + * @return Registry|boolean A Registry object. * * @see Registry * @since 3.2 diff --git a/libraries/src/Installer/Adapter/LibraryAdapter.php b/libraries/src/Installer/Adapter/LibraryAdapter.php index 498e9b393f014..8600e7d3e50c5 100644 --- a/libraries/src/Installer/Adapter/LibraryAdapter.php +++ b/libraries/src/Installer/Adapter/LibraryAdapter.php @@ -372,8 +372,8 @@ protected function setupUninstall() // Set the library root path $this->parent->setPath('extension_root', JPATH_PLATFORM . '/' . $manifest->libraryname); - // Set the source path to the manifests directory so the manifest script may be found - $this->parent->setPath('source', JPATH_MANIFESTS . '/libraries/' . $manifest->libraryname); + // Set the source path to the library root, the manifest script may be found + $this->parent->setPath('source', $this->parent->getPath('extension_root')); $xml = simplexml_load_file($manifestFile); diff --git a/libraries/src/Language/Language.php b/libraries/src/Language/Language.php index abf4ba635bcc6..e44a4c859f80c 100644 --- a/libraries/src/Language/Language.php +++ b/libraries/src/Language/Language.php @@ -1022,12 +1022,10 @@ public function getPaths($extension = null) return $this->paths[$extension]; } - return; - } - else - { - return $this->paths; + return []; } + + return $this->paths; } /** diff --git a/libraries/src/Log/LogEntry.php b/libraries/src/Log/LogEntry.php index dc15a627b700e..ae08cc215e085 100644 --- a/libraries/src/Log/LogEntry.php +++ b/libraries/src/Log/LogEntry.php @@ -121,6 +121,6 @@ public function __construct($message, $priority = Log::INFO, $category = '', $da $this->callStack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); // Get the date as a Date object. - $this->date = new Date($date ? $date : 'now'); + $this->date = new Date($date ?: 'now'); } } diff --git a/libraries/src/MVC/Controller/BaseController.php b/libraries/src/MVC/Controller/BaseController.php index 6b0a2a715f353..b7766baabad6c 100644 --- a/libraries/src/MVC/Controller/BaseController.php +++ b/libraries/src/MVC/Controller/BaseController.php @@ -380,8 +380,8 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu $this->redirect = null; $this->taskMap = array(); - $this->app = $app ? $app : Factory::getApplication(); - $this->input = $input ? $input : $this->app->input; + $this->app = $app ?: Factory::getApplication(); + $this->input = $input ?: $this->app->input; if (\defined('JDEBUG') && JDEBUG) { diff --git a/libraries/src/MVC/Model/AdminModel.php b/libraries/src/MVC/Model/AdminModel.php index 73373178010bd..23c5d049ecd94 100644 --- a/libraries/src/MVC/Model/AdminModel.php +++ b/libraries/src/MVC/Model/AdminModel.php @@ -1214,8 +1214,6 @@ public function publish(&$pks, $value = 1) if (property_exists($table, $publishedColumnName) && $table->get($publishedColumnName, $value) == $value) { unset($pks[$i]); - - continue; } } } diff --git a/libraries/src/MVC/Model/ListModel.php b/libraries/src/MVC/Model/ListModel.php index 11017826aa5b0..5d62f206ebd5b 100644 --- a/libraries/src/MVC/Model/ListModel.php +++ b/libraries/src/MVC/Model/ListModel.php @@ -14,6 +14,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Filter\InputFilter; use Joomla\CMS\Form\Form; +use Joomla\CMS\Form\FormFactoryAwareInterface; use Joomla\CMS\Form\FormFactoryAwareTrait; use Joomla\CMS\MVC\Factory\MVCFactoryInterface; use Joomla\CMS\Pagination\Pagination; @@ -24,7 +25,7 @@ * * @since 1.6 */ -class ListModel extends BaseDatabaseModel implements ListModelInterface +class ListModel extends BaseDatabaseModel implements FormFactoryAwareInterface, ListModelInterface { use FormBehaviorTrait; use FormFactoryAwareTrait; diff --git a/libraries/src/Mail/MailHelper.php b/libraries/src/Mail/MailHelper.php index a830380a5a2af..dc6b824b927a2 100644 --- a/libraries/src/Mail/MailHelper.php +++ b/libraries/src/Mail/MailHelper.php @@ -10,7 +10,9 @@ \defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Router\Route; use Joomla\CMS\String\PunycodeHelper; +use Joomla\CMS\Uri\Uri; /** * Email helper class, provides static methods to perform various tasks relevant @@ -192,4 +194,88 @@ public static function isEmailAddress($email) return true; } + + /** + * Convert relative (links, images sources) to absolute urls so that content is accessible in email + * + * @param string $content The content need to convert + * + * @return string The converted content which the relative urls are converted to absolute urls + * + * @since __DEPLOY_VERSION__ + */ + public static function convertRelativeToAbsoluteUrls($content) + { + $siteUrl = Uri::root(); + + // Replace none SEF URLs by absolute SEF URLs + if (strpos($content, 'href="index.php?') !== false) + { + preg_match_all('#href="index.php\?([^"]+)"#m', $content, $matches); + + foreach ($matches[1] as $urlQueryString) + { + $content = str_replace( + 'href="index.php?' . $urlQueryString . '"', + 'href="' . Route::link('site', 'index.php?' . $urlQueryString, Route::TLS_IGNORE, true) . '"', + $content + ); + } + + self::checkContent($content); + } + + // Replace relative links, image sources with absolute Urls + $protocols = '[a-zA-Z0-9\-]+:'; + $attributes = array('href=', 'src=', 'poster='); + + foreach ($attributes as $attribute) + { + if (strpos($content, $attribute) !== false) + { + $regex = '#\s' . $attribute . '"(?!/|' . $protocols . '|\#|\')([^"]*)"#m'; + + $content = preg_replace($regex, ' ' . $attribute . '"' . $siteUrl . '$1"', $content); + + self::checkContent($content); + } + } + + return $content; + } + + /** + * Check the content after regular expression function call. + * + * @param string $content Content to be checked. + * + * @return void + * + * @throws \RuntimeException If there is an error in previous regular expression function call. + * @since __DEPLOY_VERSION__ + */ + private static function checkContent($content) + { + if ($content !== null) + { + return; + } + + switch (preg_last_error()) + { + case PREG_BACKTRACK_LIMIT_ERROR: + $message = 'PHP regular expression limit reached (pcre.backtrack_limit)'; + break; + case PREG_RECURSION_LIMIT_ERROR: + $message = 'PHP regular expression limit reached (pcre.recursion_limit)'; + break; + case PREG_BAD_UTF8_ERROR: + $message = 'Bad UTF8 passed to PCRE function'; + break; + default: + $message = 'Unknown PCRE error calling PCRE function'; + } + + throw new \RuntimeException($message); + } } diff --git a/libraries/src/Mail/MailTemplate.php b/libraries/src/Mail/MailTemplate.php index 994fc90f1adb8..59d314d0c8b5a 100644 --- a/libraries/src/Mail/MailTemplate.php +++ b/libraries/src/Mail/MailTemplate.php @@ -263,6 +263,8 @@ public function send() $htmlBody = nl2br($plainBody, false); } + $htmlBody = MailHelper::convertRelativeToAbsoluteUrls($htmlBody); + $this->mailer->setBody($htmlBody); } diff --git a/libraries/src/Table/Nested.php b/libraries/src/Table/Nested.php index 783392b5de38c..e96ce51563243 100644 --- a/libraries/src/Table/Nested.php +++ b/libraries/src/Table/Nested.php @@ -547,13 +547,6 @@ public function delete($pk = null, $children = true) ); $this->getDispatcher()->dispatch('onBeforeDelete', $event); - // Lock the table for writing. - if (!$this->_lock()) - { - // Error message set in lock method. - return false; - } - // If tracking assets, remove the asset first. if ($this->_trackAssets) { @@ -562,35 +555,31 @@ public function delete($pk = null, $children = true) /** @var Asset $asset */ $asset = Table::getInstance('Asset', 'JTable', array('dbo' => $this->getDbo())); - // Lock the table for writing. - if (!$asset->_lock()) - { - // Error message set in lock method. - return false; - } - if ($asset->loadByName($name)) { // Delete the node in assets table. if (!$asset->delete(null, $children)) { $this->setError($asset->getError()); - $asset->_unlock(); return false; } - - $asset->_unlock(); } else { $this->setError($asset->getError()); - $asset->_unlock(); return false; } } + // Lock the table for writing. + if (!$this->_lock()) + { + // Error message set in lock method. + return false; + } + // Get the node by id. $node = $this->_getNode($pk); diff --git a/libraries/src/Table/User.php b/libraries/src/Table/User.php index 42b97eea88319..8847c34e19ea7 100644 --- a/libraries/src/Table/User.php +++ b/libraries/src/Table/User.php @@ -542,7 +542,7 @@ public function setLastVisit($timeStamp = null, $userId = null) } } - // If no timestamp value is passed to function, than current time is used. + // If no timestamp value is passed to function, then current time is used. if ($timeStamp === null) { $timeStamp = 'now'; diff --git a/libraries/src/Version.php b/libraries/src/Version.php index e8aef5a029ef4..1564e8a077973 100644 --- a/libraries/src/Version.php +++ b/libraries/src/Version.php @@ -42,7 +42,7 @@ final class Version * @var integer * @since 3.8.0 */ - const MINOR_VERSION = 1; + const MINOR_VERSION = 2; /** * Patch release version. @@ -85,7 +85,7 @@ final class Version * @var string * @since 3.5 */ - const RELDATE = '18-January-2022'; + const RELDATE = '23-January-2022'; /** * Release time. @@ -93,7 +93,7 @@ final class Version * @var string * @since 3.5 */ - const RELTIME = '18:00'; + const RELTIME = '11:04'; /** * Release timezone. diff --git a/libraries/src/WebAsset/WebAssetManager.php b/libraries/src/WebAsset/WebAssetManager.php index aced4c4e7ce38..b50e24c89784d 100644 --- a/libraries/src/WebAsset/WebAssetManager.php +++ b/libraries/src/WebAsset/WebAssetManager.php @@ -363,7 +363,7 @@ protected function usePresetItems($name): WebAssetManagerInterface $depName = substr($dependency, 0, $pos); } - $depType = $depType ? $depType : 'preset'; + $depType = $depType ?: 'preset'; // Make sure dependency exists if (!$this->registry->exists($depType, $depName)) @@ -409,7 +409,7 @@ protected function disablePresetItems($name): WebAssetManagerInterface $depName = substr($dependency, 0, $pos); } - $depType = $depType ? $depType : 'preset'; + $depType = $depType ?: 'preset'; // Make sure dependency exists if (!$this->registry->exists($depType, $depName)) diff --git a/libraries/src/Workflow/Workflow.php b/libraries/src/Workflow/Workflow.php index c4583f84a9fb4..488f7d8ce5f09 100644 --- a/libraries/src/Workflow/Workflow.php +++ b/libraries/src/Workflow/Workflow.php @@ -179,8 +179,6 @@ public function getDefaultStageByCategory($catId = 0) if ($workflow_id == 'inherit') { $workflow_id = 0; - - continue; } elseif ($workflow_id == 'use_default') { diff --git a/modules/mod_tags_popular/mod_tags_popular.xml b/modules/mod_tags_popular/mod_tags_popular.xml index f0fe555d4f120..3e0d17d1cda89 100644 --- a/modules/mod_tags_popular/mod_tags_popular.xml +++ b/modules/mod_tags_popular/mod_tags_popular.xml @@ -35,13 +35,12 @@ getAuthorisedViewLevels(); $timeframe = $params->get('timeframe', 'alltime'); - $maximum = $params->get('maximum', 5); + $maximum = (int) $params->get('maximum', 5); $order_value = $params->get('order_value', 'title'); $nowDate = Factory::getDate()->toSql(); $nullDate = $db->getNullDate(); @@ -127,7 +127,11 @@ public static function getList(&$params) // Backup bound parameters array of the original query $bounded = $query->getBounded(); - $query->setLimit($maximum); + if ($maximum > 0) + { + $query->setLimit($maximum); + } + $query->order($db->quoteName('count') . ' DESC'); $equery = $db->getQuery(true) ->select( @@ -158,7 +162,11 @@ public static function getList(&$params) } } - $query->setLimit($maximum, 0); + if ($maximum > 0) + { + $query->setLimit($maximum); + } + $db->setQuery($query); try diff --git a/modules/mod_tags_similar/mod_tags_similar.xml b/modules/mod_tags_similar/mod_tags_similar.xml index 3551db24ece7b..119a6c49cea39 100644 --- a/modules/mod_tags_similar/mod_tags_similar.xml +++ b/modules/mod_tags_similar/mod_tags_similar.xml @@ -25,13 +25,12 @@
    order($query->rand()); } - $query->setLimit((int) $params->get('maximum', 5)); + $maximum = (int) $params->get('maximum', 5); + + if ($maximum > 0) + { + $query->setLimit($maximum); + } + $db->setQuery($query); try diff --git a/plugins/editors/tinymce/forms/setoptions.xml b/plugins/editors/tinymce/forms/setoptions.xml index 0fb4089e45789..173057a45c543 100644 --- a/plugins/editors/tinymce/forms/setoptions.xml +++ b/plugins/editors/tinymce/forms/setoptions.xml @@ -113,6 +113,7 @@ default="en" hide_default="1" fileFilter="\.js$" + exclude="\.min\.js$" showon="lang_mode:0" validate="options" /> diff --git a/plugins/editors/tinymce/src/Field/TinymcebuilderField.php b/plugins/editors/tinymce/src/Field/TinymcebuilderField.php index 3ba3433caabac..e2dd9b9e48053 100644 --- a/plugins/editors/tinymce/src/Field/TinymcebuilderField.php +++ b/plugins/editors/tinymce/src/Field/TinymcebuilderField.php @@ -166,8 +166,8 @@ protected function getLayoutData() // Check for TinyMCE language file $language = Factory::getLanguage(); - $languageFile1 = 'media/vendor/tinymce/langs/' . $language->getTag() . '.js'; - $languageFile2 = 'media/vendor/tinymce/langs/' . substr($language->getTag(), 0, strpos($language->getTag(), '-')) . '.js'; + $languageFile1 = 'media/vendor/tinymce/langs/' . $language->getTag() . (JDEBUG ? '.js' : '.min.js'); + $languageFile2 = 'media/vendor/tinymce/langs/' . substr($language->getTag(), 0, strpos($language->getTag(), '-')) . (JDEBUG ? '.js' : '.min.js'); $data['languageFile'] = ''; diff --git a/plugins/filesystem/local/src/Adapter/LocalAdapter.php b/plugins/filesystem/local/src/Adapter/LocalAdapter.php index 495a89a24d832..a47c16a4d8e1a 100644 --- a/plugins/filesystem/local/src/Adapter/LocalAdapter.php +++ b/plugins/filesystem/local/src/Adapter/LocalAdapter.php @@ -215,7 +215,7 @@ public function createFolder(string $name, string $path): string * * @param string $name The name * @param string $path The folder - * @param binary $data The data + * @param string $data The data * * @return string * @@ -240,7 +240,7 @@ public function createFile(string $name, string $path, $data): string * * @param string $name The name * @param string $path The folder - * @param binary $data The data + * @param string $data The data * * @return void * diff --git a/plugins/sampledata/multilang/multilang.php b/plugins/sampledata/multilang/multilang.php index c05112eb9841b..e432adcbb2126 100644 --- a/plugins/sampledata/multilang/multilang.php +++ b/plugins/sampledata/multilang/multilang.php @@ -1183,8 +1183,6 @@ private function publishContentLanguages() if ($tableLanguage->load(array('lang_code' => $siteLang->language, 'published' => 0)) && !$tableLanguage->publish()) { $this->app->enqueueMessage(Text::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_CONTENT_LANGUAGE', $siteLang->name), 'warning'); - - continue; } } diff --git a/plugins/system/debug/src/DataFormatter.php b/plugins/system/debug/src/DataFormatter.php index 3ba543fd79c87..878c10cce0a10 100644 --- a/plugins/system/debug/src/DataFormatter.php +++ b/plugins/system/debug/src/DataFormatter.php @@ -51,7 +51,7 @@ public function formatCallerInfo(array $call): string // If entry has Class/Method print it. $string .= htmlspecialchars($call['class'] . $call['type'] . $call['function']) . '()'; } - elseif (isset($call['args']) && \is_array($call['args'][0])) + elseif (isset($call['args'][0]) && \is_array($call['args'][0])) { $string .= htmlspecialchars($call['function']) . ' ('; @@ -74,7 +74,7 @@ public function formatCallerInfo(array $call): string $string = rtrim($string, ', ') . ')'; } - elseif (isset($call['args'])) + elseif (isset($call['args'][0])) { $string .= htmlspecialchars($call['function']) . ' ' . $call['args'][0]; } diff --git a/plugins/user/profile/src/Field/TosField.php b/plugins/user/profile/src/Field/TosField.php index aa01a286ec0b0..c9decbbcdb1ad 100644 --- a/plugins/user/profile/src/Field/TosField.php +++ b/plugins/user/profile/src/Field/TosField.php @@ -144,7 +144,7 @@ protected function getLabel() } // Add the label text and closing tag. - $label .= '>' . $link . ' *'; + $label .= '>' . $link . ''; return $label; }