Closed jgerman-bot closed 6 months ago
New language relevant PR in upstream repo: https://github.com/joomla/joomla-cms/pull/42950 Here are the upstream changes:
The user consented to storing their user information using the IP address %s
The user agent string of the user's browser was:%s
This information was automatically recorded when the user submitted their details on the website and checked the confirm box
This information was automatically recorded when the user submitted their details on the website and checked the confirm box.
New language relevant PR in upstream repo: https://github.com/joomla/joomla-cms/pull/42950 Here are the upstream changes:
Click to expand the diff!
```diff diff --git a/administrator/components/com_cache/tmpl/cache/default.php b/administrator/components/com_cache/tmpl/cache/default.php index fb058db2b61e5..9abca8e95e8ff 100644 --- a/administrator/components/com_cache/tmpl/cache/default.php +++ b/administrator/components/com_cache/tmpl/cache/default.php @@ -58,10 +58,10 @@The user consented to storing their user information using the IP address %s
The user agent string of the user's browser was:
%s
This information was automatically recorded when the user submitted their details on the website and checked the confirm box
" +PLG_SYSTEM_PRIVACYCONSENT_BODY="The user consented to storing their user information using the IP address %s
The user agent string of the user's browser was:
%s
This information was automatically recorded when the user submitted their details on the website and checked the confirm box.
" +PLG_SYSTEM_PRIVACYCONSENT_CACHETIMEOUT_DESC="How often the check is performed." +PLG_SYSTEM_PRIVACYCONSENT_CACHETIMEOUT_LABEL="Periodic check (days)" PLG_SYSTEM_PRIVACYCONSENT_CONSENT="User {username} consented to the privacy policy." PLG_SYSTEM_PRIVACYCONSENT_FIELD_ARTICLE_DESC="Select the article from the list or create a new one." PLG_SYSTEM_PRIVACYCONSENT_FIELD_ARTICLE_LABEL="Privacy Article" diff --git a/components/com_config/src/Controller/ModulesController.php b/components/com_config/src/Controller/ModulesController.php index 97882c670d850..4aeabb544746e 100644 --- a/components/com_config/src/Controller/ModulesController.php +++ b/components/com_config/src/Controller/ModulesController.php @@ -59,8 +59,8 @@ public function __construct($config = [], MVCFactoryInterface $factory = null, $ */ public function cancel() { - // Redirect back to home(base) page - $this->setRedirect(Uri::base()); + // Redirect back to previous page + $this->setRedirect($this->getReturnUrl()); } /** @@ -150,19 +150,29 @@ public function save() case 'save': default: - if (!empty($returnUri)) { - $redirect = base64_decode(urldecode($returnUri)); - - // Don't redirect to an external URL. - if (!Uri::isInternal($redirect)) { - $redirect = Uri::base(); - } - } else { - $redirect = Uri::base(); - } - - $this->setRedirect($redirect); + $this->setRedirect($this->getReturnUrl()); break; } } + + /** + * Method to get redirect URL after saving or cancel editing a module from frontend + * + * @return string + * + * @since __DEPLOY_VERSION__ + */ + private function getReturnUrl(): string + { + if ($return = $this->input->post->get('return', '', 'BASE64')) { + $return = base64_decode(urldecode($return)); + + // Only redirect to if it is an internal URL + if (Uri::isInternal($return)) { + return $return; + } + } + + return Uri::base(); + } } diff --git a/layouts/joomla/form/field/list-fancy-select.php b/layouts/joomla/form/field/list-fancy-select.php index 344303b39d0b7..f117d34a9a96b 100644 --- a/layouts/joomla/form/field/list-fancy-select.php +++ b/layouts/joomla/form/field/list-fancy-select.php @@ -85,7 +85,7 @@ $html[] = ''; } } else { - $html[] = ''; + $html[] = ''; } } else // Create a regular list. { diff --git a/layouts/joomla/form/field/list.php b/layouts/joomla/form/field/list.php index 84114edfc8cb9..224107485943b 100644 --- a/layouts/joomla/form/field/list.php +++ b/layouts/joomla/form/field/list.php @@ -77,7 +77,7 @@ $html[] = ''; } } else { - $html[] = ''; + $html[] = ''; } } else // Create a regular list passing the arguments in an array. { diff --git a/libraries/src/Installer/Adapter/ModuleAdapter.php b/libraries/src/Installer/Adapter/ModuleAdapter.php index 8ab279c3fcbb9..57186cd67ce92 100644 --- a/libraries/src/Installer/Adapter/ModuleAdapter.php +++ b/libraries/src/Installer/Adapter/ModuleAdapter.php @@ -366,7 +366,7 @@ public function loadLanguage($path = null) $source = $path . '/' . $folder; } - $client = (string) $this->getManifest()->attributes()->client; + $client = (string) $this->getManifest()->attributes()->client ?: 'site'; $this->doLoadLanguage($extension, $source, \constant('JPATH_' . strtoupper($client))); } } diff --git a/libraries/src/Mail/MailerFactory.php b/libraries/src/Mail/MailerFactory.php index e9708ac28c7b8..fc91e620b6967 100644 --- a/libraries/src/Mail/MailerFactory.php +++ b/libraries/src/Mail/MailerFactory.php @@ -53,7 +53,7 @@ public function __construct(Registry $defaultConfiguration) */ public function createMailer(?Registry $settings = null): MailerInterface { - $configuration = clone $this->defaultConfiguration; + $configuration = new Registry($this->defaultConfiguration); if ($settings) { $configuration->merge($settings); diff --git a/modules/mod_articles_categories/src/Helper/ArticlesCategoriesHelper.php b/modules/mod_articles_categories/src/Helper/ArticlesCategoriesHelper.php index e1fb507376b62..86db1928bb9cb 100644 --- a/modules/mod_articles_categories/src/Helper/ArticlesCategoriesHelper.php +++ b/modules/mod_articles_categories/src/Helper/ArticlesCategoriesHelper.php @@ -60,7 +60,7 @@ public function getChildrenCategories(Registry $moduleParams, SiteApplication $a } // Get all the children categories of this node - $childrenCategories = $parentCategory->getChildren(true); + $childrenCategories = $parentCategory->getChildren(); $count = $moduleParams->get('count', 0); diff --git a/plugins/system/cache/src/Extension/Cache.php b/plugins/system/cache/src/Extension/Cache.php index 92d980d2d0441..f94a0cb49dc4b 100644 --- a/plugins/system/cache/src/Extension/Cache.php +++ b/plugins/system/cache/src/Extension/Cache.php @@ -333,6 +333,7 @@ private function isExcluded(): bool // Convert the exclusions into a normalised array $exclusions = str_replace(["\r\n", "\r"], "\n", $exclusions); $exclusions = explode("\n", $exclusions); + $exclusions = array_map('trim', $exclusions); $filterExpression = function ($x) { return $x !== ''; }; @@ -343,19 +344,14 @@ private function isExcluded(): bool . Uri::getInstance()->buildQuery($this->router->getVars()); $externalUrl = Uri::getInstance()->toString(); - $reduceCallback - = function (bool $carry, string $exclusion) use ($internalUrl, $externalUrl) { - // Test both external and internal URIs - return $carry && preg_match( - '#' . $exclusion . '#i', - $externalUrl . ' ' . $internalUrl, - $match - ); - }; - $excluded = array_reduce($exclusions, $reduceCallback, false); - - if ($excluded) { - return true; + // Loop through each pattern. + if ($exclusions) { + foreach ($exclusions as $exclusion) { + // Test both external and internal URI + if (preg_match('#' . $exclusion . '#i', $externalUrl . ' ' . $internalUrl, $match)) { + return true; + } + } } } ```