Skip to content

Commit

Permalink
2.0.4
Browse files Browse the repository at this point in the history
J 4 : setTemplate expects an object
  • Loading branch information
conseilgouz committed Sep 8, 2022
1 parent 23c6b7d commit 2c57b6e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 13 deletions.
11 changes: 11 additions & 0 deletions cg_template_switcher_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<changelogs>
<changelog>
<element>pkg_cg_template_switcher</element>
<type>package</type>
<version>2.0.4</version>
<note>
<item>Update : 08/09/2022</item>
</note>
<fix>
<item>SetTemplate expects an object</item>
</fix>
</changelog>
<changelog>
<element>pkg_cg_template_switcher</element>
<type>package</type>
<version>2.0.3</version>
Expand Down
Binary file modified packages/plg_system_cgstyle_j4.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions packages/plg_system_cgstyle_j4/cgstyle.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* @package CG template switcher Module
* @version 2.0.0
* @version 2.0.4
* @subpackage system.cg_style
*
* @copyright Copyright (C) 2021 Conseilgouz. All rights reserved.
* @copyright Copyright (C) 2022 Conseilgouz. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
*/
Expand All @@ -23,14 +23,14 @@ public function onAfterRoute() {
if ($cookieValue) {
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select('template, params');
$query->select('*');
$query->from('#__template_styles');
$query->where('client_id = 0');
$query->where('id = ' . (int)$cookieValue);
$db->setQuery($query);
$style = $db->loadObject();
if ($style != null) {
$app->setTemplate( $style->template, $style->params );
$app->setTemplate( $style); // 4.0 : expect an object
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/plg_system_cgstyle_j4/cgstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension version="4.0" type="plugin" group="system" method="upgrade">
<name>plg_system_cgstyle</name>
<author>ConseilGouz</author>
<creationDate>September 2021</creationDate>
<copyright>(C)2021 ConseilGouz. All rights reserved.</copyright>
<creationDate>September 2022</creationDate>
<copyright>(C)2022 ConseilGouz. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.0.0</version>
<version>2.0.4</version>
<description>PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION</description>
<files>
<filename plugin="cgstyle">cgstyle.php</filename>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.0."
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.4."
PLG_SYSTEM_CGSTYLE="Systeme - Template Style Switcher"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.0."
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.4."
PLG_SYSTEM_CGSTYLE="System - Template Style Switcher"

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.0."
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.4."
PLG_SYSTEM_CGSTYLE="Systeme - Template Style Switcher"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.0."
PLG_SYSTEM_CGSTYLE_XML_DESCRIPTION="Systeme - Template Style Switcher version 2.0.4."
PLG_SYSTEM_CGSTYLE="Systeme - Template Style Switcher"
4 changes: 2 additions & 2 deletions pkg_cgtemplateswitcher.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="3.10" method="upgrade">
<name>CG Template Switcher</name>
<creationDate>August 2022</creationDate>
<creationDate>September 2022</creationDate>
<packagename>cgtemplateswitcher</packagename>
<license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<author>ConseilGouz</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.0.3</version>
<version>2.0.4</version>
<url>https://www.conseilgouz.com/</url>
<packager>ConseilGouz</packager>
<description>Package CG Template Switcher</description>
Expand Down

0 comments on commit 2c57b6e

Please sign in to comment.