From 49cb40e45e811a059b93fa04ad1e97d044ef64f0 Mon Sep 17 00:00:00 2001 From: pmleconte Date: Sat, 15 Jul 2023 17:59:00 +0200 Subject: [PATCH] 2.3.0 Joomla 5.x compatibility --- cgsecureinstaller.xml | 4 ++-- com_cgsecure_changelog.xml | 11 +++++++++++ .../com_cgsecure/admin/src/View/Config/JsonView.php | 2 +- packages/com_cgsecure/admin/tmpl/config/default.php | 6 +++--- packages/com_cgsecure/admin/tmpl/logs/default.php | 10 +++++----- packages/com_cgsecure/cgsecure.xml | 4 ++-- packages/com_cgsecure/media/cg_no_robot/index.php | 8 +++++--- packages/plg_system_cgsecure/cgsecure.php | 4 ++-- 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/cgsecureinstaller.xml b/cgsecureinstaller.xml index 877c6df..e0732d5 100644 --- a/cgsecureinstaller.xml +++ b/cgsecureinstaller.xml @@ -2,12 +2,12 @@ plgcgsecureinstaller ConseilGouz - 2023-03-28 + 2023-07-15 (C)2023 ConseilGouz. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt pascal.leconte@conseilgouz.com www.conseilgouz.com - 2.2.8 + 2.3.0 GNU General Public License version 2 or later; see LICENSE.txt CG Secure script.install.php diff --git a/com_cgsecure_changelog.xml b/com_cgsecure_changelog.xml index 8e6f84a..9eaef3b 100644 --- a/com_cgsecure_changelog.xml +++ b/com_cgsecure_changelog.xml @@ -1,4 +1,15 @@ + + com_cgsecure + package + 2.3.0 + + Update : 15/07/2023 + + + Joomla 5.x compatibility + + com_cgsecure package diff --git a/packages/com_cgsecure/admin/src/View/Config/JsonView.php b/packages/com_cgsecure/admin/src/View/Config/JsonView.php index e39345e..3210c39 100644 --- a/packages/com_cgsecure/admin/src/View/Config/JsonView.php +++ b/packages/com_cgsecure/admin/src/View/Config/JsonView.php @@ -64,7 +64,7 @@ function display($tpl = null) { } $arr = []; $arr['retour'] = $msg; - echo new \JResponseJson($arr); + echo new JsonResponse($arr); } // delete CG Secure information in .htaccess file private function delHTAccess() { diff --git a/packages/com_cgsecure/admin/tmpl/config/default.php b/packages/com_cgsecure/admin/tmpl/config/default.php index c6bbcb3..37392f5 100644 --- a/packages/com_cgsecure/admin/tmpl/config/default.php +++ b/packages/com_cgsecure/admin/tmpl/config/default.php @@ -35,8 +35,8 @@
-

-

+

+

@@ -46,7 +46,7 @@ foreach ($this->form->getFieldSets() as $key => $fieldset) { - echo HTMLHelper::_('uitab.addTab', 'tab', $fieldset->name, JText::_($fieldset->label)); + echo HTMLHelper::_('uitab.addTab', 'tab', $fieldset->name, Text::_($fieldset->label)); echo $this->form->renderFieldSet($fieldset->name); echo HTMLHelper::_('uitab.endTab'); } diff --git a/packages/com_cgsecure/admin/tmpl/logs/default.php b/packages/com_cgsecure/admin/tmpl/logs/default.php index 138f0af..3d5202f 100644 --- a/packages/com_cgsecure/admin/tmpl/logs/default.php +++ b/packages/com_cgsecure/admin/tmpl/logs/default.php @@ -47,19 +47,19 @@ - + - + - + - + - + diff --git a/packages/com_cgsecure/cgsecure.xml b/packages/com_cgsecure/cgsecure.xml index 2e615d5..90c49f0 100644 --- a/packages/com_cgsecure/cgsecure.xml +++ b/packages/com_cgsecure/cgsecure.xml @@ -1,13 +1,13 @@ COM_CGSECURE - 2023-03-28 + 2023-07-15 ConseilGouz pascal.leconte@conseilgouz.com www.conseilgouz.com Copyright (C) 2023 ConseilGouz.com. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.2.8 + 2.3.0 ConseilGouz\Component\CGSecure COM_CGSECURE_XML_DESCRIPTION diff --git a/packages/com_cgsecure/media/cg_no_robot/index.php b/packages/com_cgsecure/media/cg_no_robot/index.php index 8502339..4e9928d 100644 --- a/packages/com_cgsecure/media/cg_no_robot/index.php +++ b/packages/com_cgsecure/media/cg_no_robot/index.php @@ -1,7 +1,7 @@ Erreur: CG Secure HtAccess Blocked'; $tmp = ''; $tmp .= '
'; -$tmp .= '

'.JText::_('CGSECURE_MSG_H1').'

'; +$tmp .= '

'.Text::_('CGSECURE_MSG_H1').'

'; $tmp .= '
' ; $prefixe = $_SERVER['SERVER_NAME']; $prefixe = substr(str_replace('www.','',$prefixe),0,2); $ctl = false; $errtype = "e"; // supposed blocking error // init error message -$err = JText::sprintf('CGSECURE_MSG_BAD',$ua); +$err = Text::sprintf('CGSECURE_MSG_BAD',$ua); $tmp .= $err.'
'; echo $tmp; $err = $prefixe.$errtype.'-'.$err; diff --git a/packages/plg_system_cgsecure/cgsecure.php b/packages/plg_system_cgsecure/cgsecure.php index 430aadc..1d40009 100644 --- a/packages/plg_system_cgsecure/cgsecure.php +++ b/packages/plg_system_cgsecure/cgsecure.php @@ -2,7 +2,7 @@ /** * @package CGSecure * from karebu secure (kSesure) - * Version : 2.2.6 + * Version : 2.3.0 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL * @copyright (C) 2023 ConseilGouz. All Rights Reserved. * @author ConseilGouz @@ -66,7 +66,7 @@ function onAfterDispatch() { if (substr(php_sapi_name(), 0, 3) == 'cgi') { - Factory::getApplication()->enqueueMessage(JText::_('CG_SECURE_NOT_APACHE_HANDLER'),'error'); + Factory::getApplication()->enqueueMessage(Text::_('CG_SECURE_NOT_APACHE_HANDLER'),'error'); return true; }