From c64367ed375497f68360c3356c6b6076d69c572c Mon Sep 17 00:00:00 2001 From: Sonny Le Date: Mon, 6 May 2024 09:33:39 +0700 Subject: [PATCH] Fix issue Deprecated in PHP 8.2 --- html/com_users/login/default.php | 15 ++++---- html/com_users/login/default_logout.php | 49 ++++--------------------- 2 files changed, 15 insertions(+), 49 deletions(-) diff --git a/html/com_users/login/default.php b/html/com_users/login/default.php index c59f2b21..d3cfaea4 100644 --- a/html/com_users/login/default.php +++ b/html/com_users/login/default.php @@ -6,11 +6,12 @@ * @copyright Copyright (C) 2023 AstroidFrame.work. * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ - defined('_JEXEC') or die; -$cookieLogin = $this->user->get('cookieLogin'); -if (!empty($cookieLogin) || $this->user->get('guest')) { - echo $this->loadTemplate('login'); // The user is not logged in or needs to provide a password. -} else { - echo $this->loadTemplate('logout'); // The user is already logged in. -} + +/** + * TO OVERRIDE THIS LAYOUT + * 1. Remove line "require Astroid\Helper\Overrides::getHTMLTemplate()"; + * 2. Copy source code from libraries/astroid/framework/html/{find a file that you will override here} + * 3. Paste source code to below and start to edit. + */ +require Astroid\Helper\Overrides::getHTMLTemplate(); \ No newline at end of file diff --git a/html/com_users/login/default_logout.php b/html/com_users/login/default_logout.php index dbe66114..d3cfaea4 100644 --- a/html/com_users/login/default_logout.php +++ b/html/com_users/login/default_logout.php @@ -8,45 +8,10 @@ */ defined('_JEXEC') or die; -use Joomla\CMS\HTML\HTMLHelper; -use Joomla\CMS\Language\Text; -use Joomla\CMS\Router\Route; - -?> -
- params->get('show_page_heading')) : ?> -
-

- escape($this->params->get('page_heading')); ?> -

-
- - params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description')) != '') || $this->params->get('logout_image') != '') : ?> -
- - params->get('logoutdescription_show') == 1) : ?> - params->get('logout_description'); ?> - - params->get('logout_image') != '') : ?> - <?php echo Text::_('COM_USER_LOGOUT_IMAGE_ALT'); ?> - - params->get('logoutdescription_show') == 1 && str_replace(' ', '', $this->params->get('logout_description')) != '') || $this->params->get('logout_image') != '') : ?> -
- -
-
-
- -
-
- params->get('logout_redirect_url')) : ?> - - - - - -
-
\ No newline at end of file +/** + * TO OVERRIDE THIS LAYOUT + * 1. Remove line "require Astroid\Helper\Overrides::getHTMLTemplate()"; + * 2. Copy source code from libraries/astroid/framework/html/{find a file that you will override here} + * 3. Paste source code to below and start to edit. + */ +require Astroid\Helper\Overrides::getHTMLTemplate(); \ No newline at end of file