Skip to content

Commit

Permalink
Joomla! 5.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Dec 21, 2024
1 parent 56c8b84 commit ac793f3
Show file tree
Hide file tree
Showing 19 changed files with 143 additions and 84 deletions.
2 changes: 1 addition & 1 deletion administrator/language/en-GB/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<metafile client="administrator">
<name>English (en-GB)</name>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/files/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2019 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>5.2.3-dev</version>
<creationDate>2024-12</creationDate>
<version>5.2.3</version>
<creationDate>2025-01</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

<scriptfile>administrator/components/com_admin/script.php</scriptfile>
Expand Down
2 changes: 1 addition & 1 deletion administrator/manifests/packages/pkg_en-GB.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>5.2.3.1</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/modules/mod_quickicon/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$html = HTMLHelper::_('icons.buttons', $buttons);
?>
<?php if (!empty($html)) : ?>
<nav class="quick-icons px-3 pb-3" aria-label="<?php echo Text::_('MOD_QUICKICON_NAV_LABEL') . ' ' . $module->title; ?>">
<nav class="quick-icons px-3 pb-3" aria-label="<?php echo Text::_('MOD_QUICKICON_NAV_LABEL') . ' ' . htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?>">
<ul class="nav flex-wrap">
<?php echo $html; ?>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion api/language/en-GB/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion api/language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<metafile client="api">
<name>English (en-GB)</name>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
10 changes: 0 additions & 10 deletions components/com_privacy/src/Controller/DisplayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Joomla\Component\Privacy\Site\Controller;

use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -39,15 +38,6 @@ public function display($cachable = false, $urlparams = [])
{
$view = $this->input->get('view', $this->default_view);

// Submitting information requests and confirmation through the frontend is restricted to authenticated users at this time
if (\in_array($view, ['confirm', 'request']) && $this->app->getIdentity()->guest) {
$this->setRedirect(
Route::_('index.php?option=com_users&view=login&return=' . base64_encode('index.php?option=com_privacy&view=' . $view), false)
);

return $this;
}

// Set a Referrer-Policy header for views which require it
if (\in_array($view, ['confirm', 'remind'])) {
$this->app->setHeader('Referrer-Policy', 'no-referrer', true);
Expand Down
47 changes: 47 additions & 0 deletions components/com_privacy/src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

/**
* @package Joomla.Site
* @subpackage com_privacy
*
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Privacy\Site\Dispatcher;

use Joomla\CMS\Dispatcher\ComponentDispatcher;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_privacy
*
* @since 5.2.3
*/
class Dispatcher extends ComponentDispatcher
{
/**
* Method to check component access permission
*
* @since 5.2.3
*
* @return void
*/
protected function checkAccess()
{
parent::checkAccess();

$view = $this->input->get('view');

// Submitting information requests and confirmation through the frontend is restricted to authenticated users at this time
if (\in_array($view, ['confirm', 'request']) && $this->app->getIdentity()->guest) {
$this->app->redirect(
Route::_('index.php?option=com_users&view=login&return=' . base64_encode('index.php?option=com_privacy&view=' . $view), false)
);
}
}
}
58 changes: 3 additions & 55 deletions components/com_users/src/Controller/DisplayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

namespace Joomla\Component\Users\Site\Controller;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -50,61 +48,11 @@ public function display($cachable = false, $urlparams = false)
if ($view = $this->getView($vName, $vFormat)) {
// Do any specific processing by view.
switch ($vName) {
case 'registration':
// If the user is already logged in, redirect to the profile page.
$user = $this->app->getIdentity();

if ($user->guest != 1) {
// Redirect to profile page.
$this->setRedirect(Route::_('index.php?option=com_users&view=profile', false));

return;
}

// Check if user registration is enabled
if (ComponentHelper::getParams('com_users')->get('allowUserRegistration') == 0) {
// Registration is disabled - Redirect to login page.
$this->setRedirect(Route::_('index.php?option=com_users&view=login', false));

return;
}

// The user is a guest, load the registration model and show the registration page.
$model = $this->getModel('Registration');
break;

case 'profile':
// Handle view specific models.
// If the user is a guest, redirect to the login page.
$user = $this->app->getIdentity();

if ($user->guest == 1) {
// Redirect to login page.
$this->setRedirect(Route::_('index.php?option=com_users&view=login', false));

return;
}

$model = $this->getModel($vName);
break;

case 'login':
// Handle the default views.
$model = $this->getModel($vName);
break;

case 'remind':
case 'reset':
// If the user is already logged in, redirect to the profile page.
$user = $this->app->getIdentity();

if ($user->guest != 1) {
// Redirect to profile page.
$this->setRedirect(Route::_('index.php?option=com_users&view=profile', false));

return;
}

case 'registration':
case 'login':
case 'profile':
$model = $this->getModel($vName);
break;

Expand Down
74 changes: 74 additions & 0 deletions components/com_users/src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?php

/**
* @package Joomla.Site
* @subpackage com_privacy
*
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Users\Site\Dispatcher;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Dispatcher\ComponentDispatcher;
use Joomla\CMS\Router\Route;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_privacy
*
* @since 5.2.3
*/
class Dispatcher extends ComponentDispatcher
{
/**
* Method to check component access permission
*
* @since 5.2.3
*
* @return void
*/
protected function checkAccess()
{
parent::checkAccess();

$view = $this->input->get('view');
$user = $this->app->getIdentity();

// Do any specific processing by view.
switch ($view) {
case 'registration':
// If the user is already logged in, redirect to the profile page.
if ($user->get('guest') != 1) {
// Redirect to profile page.
$this->app->redirect(Route::_('index.php?option=com_users&view=profile', false));
}

// Check if user registration is enabled
if (ComponentHelper::getParams('com_users')->get('allowUserRegistration') == 0) {
// Registration is disabled - Redirect to login page.
$this->app->redirect(Route::_('index.php?option=com_users&view=login', false));
}
break;

// Handle view specific models.
case 'profile':
if ($user->get('guest') == 1) {
// Redirect to login page.
$this->app->redirect(Route::_('index.php?option=com_users&view=login', false));
}
break;

case 'remind':
case 'reset':
if ($user->get('guest') != 1) {
// Redirect to profile page.
$this->app->redirect(Route::_('index.php?option=com_users&view=profile', false));
}
}
}
}
2 changes: 1 addition & 1 deletion installation/language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<metafile client="installation">
<name>English (United Kingdom)</name>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down
2 changes: 1 addition & 1 deletion language/en-GB/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion language/en-GB/langmetadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<metafile client="site">
<name>English (en-GB)</name>
<version>5.2.3</version>
<creationDate>2024-12</creationDate>
<creationDate>2025-01</creationDate>
<author>Joomla! Project</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion layouts/chromes/html5.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
$headerAttribs['id'] = 'mod-' . $module->id;
else :
$moduleAttribs['aria-label'] = $module->title;
$moduleAttribs['aria-label'] = htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8');
endif;
}

Expand Down
8 changes: 4 additions & 4 deletions libraries/src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ final class Version
* @var string
* @since 3.8.0
*/
public const EXTRA_VERSION = 'dev';
public const EXTRA_VERSION = '';

/**
* Development status.
*
* @var string
* @since 3.5
*/
public const DEV_STATUS = 'Development';
public const DEV_STATUS = 'Stable';

/**
* Code name.
Expand All @@ -90,15 +90,15 @@ final class Version
* @var string
* @since 3.5
*/
public const RELDATE = '31-December-2024';
public const RELDATE = '7-January-2025';

/**
* Release time.
*
* @var string
* @since 3.5
*/
public const RELTIME = '16:01';
public const RELTIME = '16:00';

/**
* Release timezone.
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_menu/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$id = '';

if ($tagId = $params->get('tag_id', '')) {
$id = ' id="' . $tagId . '"';
$id = ' id="' . htmlspecialchars($tagId, ENT_QUOTES, 'UTF-8') . '"';
}

// The menu class is deprecated. Use mod-menu instead
Expand Down
2 changes: 1 addition & 1 deletion templates/cassiopeia/html/layouts/chromes/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
$headerAttribs['id'] = 'mod-' . $module->id;
else :
$moduleAttribs['aria-label'] = $module->title;
$moduleAttribs['aria-label'] = htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8');
endif;
}

Expand Down
2 changes: 1 addition & 1 deletion templates/cassiopeia/html/layouts/chromes/noCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
$headerAttribs['id'] = 'mod-' . $module->id;
else :
$moduleAttribs['aria-label'] = $module->title;
$moduleAttribs['aria-label'] = htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8');
endif;
}

Expand Down

0 comments on commit ac793f3

Please sign in to comment.