Skip to content

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
Uninstall package not working
  • Loading branch information
pmleconte committed Aug 29, 2022
1 parent 2306503 commit 957a93a
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 19 deletions.
11 changes: 11 additions & 0 deletions cg_template_switcher_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>pkg_cg_template_switcher</element>
<type>package</type>
<version>2.0.2</version>
<note>
<item>Update : 29/08/2022</item>
</note>
<fix>
<item>Uninstall error</item>
</fix>
</changelog>
<changelog>
<element>pkg_cg_template_switcher</element>
<type>package</type>
Expand Down
Binary file modified packages/mod_cg_template_switcher_j4.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2</license>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.0.1</version>
<version>2.0.2</version>
<description>CG_XML_DESCRIPTION</description>
<namespace path="src">ConseilGouz\Module\CGTemplateSwitcher</namespace>
<scriptfile>script.php</scriptfile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
<changelogs>
<changelog>
<element>mod_cg_template_switcher</element>
<type>Module</type>
<version>2.0.2</version>
<note>
<item>Update : 29/08/2022</item>
</note>
<fix>
<item>Uninstall package</item>
</fix>
</changelog>
<changelog>
<element>mod_cg_template_switcher</element>
<type>Module</type>
Expand Down
18 changes: 8 additions & 10 deletions packages/mod_cg_template_switcher_j4/script.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* CG Scroll Module - Joomla 4.0.0 Module
* Version : 4.1.0
* Package : CG Scroll
* copyright : Copyright (C) 2021 ConseilGouz. All rights reserved.
* CG Template Switcher package - Joomla 4 Module
* Version : 2.0.2
* Package : CG Template Switcher
* copyright : Copyright (C) 2022 ConseilGouz. All rights reserved.
* license : http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// No direct access to this file
Expand All @@ -14,13 +14,11 @@
use Joomla\CMS\Version;
use Joomla\CMS\Filesystem\File;

class mod_cg_scrollInstallerScript
class mod_cg_template_switcherInstallerScript
{
private $min_joomla_version = '3.9.0';
private $min_php_version = '7.2';
private $name = 'CG Scroll';
private $exttype = 'module';
private $extname = 'cg_scroll';
private $min_joomla_version = '3.10.0';
private $min_php_version = '7.4';
private $extname = 'cg_template_switcher';
private $previous_version = '';
private $dir = null;
private $installerName = 'cg_flipinstaller';
Expand Down
6 changes: 3 additions & 3 deletions pkg_cg_template_switcher.xml → 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>October 2021</creationDate>
<packagename>CG Template Switcher</packagename>
<creationDate>August 2022</creationDate>
<packagename>cgtemplateswitcher</packagename>
<license>https://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<author>ConseilGouz</author>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.0.1</version>
<version>2.0.2</version>
<url>https://www.conseilgouz.com/</url>
<packager>ConseilGouz</packager>
<description>Package CG Template Switcher</description>
Expand Down
26 changes: 21 additions & 5 deletions script.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* CG Template Switcher Module - Joomla 4.0.0 Module
* Version : 2.0.0
* CG Template Switcher package - Joomla 4 Module
* Version : 2.0.2
* Package : CG Template Switcher
* copyright : Copyright (C) 2021 ConseilGouz. All rights reserved.
* copyright : Copyright (C) 2022 ConseilGouz. All rights reserved.
* license : http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
// No direct access to this file
Expand All @@ -17,14 +17,30 @@ class pkg_CGTemplateSwitcherInstallerScript
{
private $min_joomla_version = '3.10.0';
private $min_php_version = '7.4';
private $name = 'CG Template Switcher';
private $exttype = 'module';
private $extname = 'cg_template_switcher';
private $dir = null;
public function __construct()
{
$this->dir = __DIR__;
}
/**
*
* Function to run when un-installing the component
* @return void
*/
public function uninstall($parent) {
// remove old package path
$f = JPATH_MANIFESTS . '/packages/CG Template Switcher';
if (!@file_exists($f) || !is_dir($f) || is_link($f)) {
return;
}
Folder::delete($f);
// remove old package xml
$f = JPATH_MANIFESTS . '/packages/pkg_cg_template_switcher.xml';
if (@is_file($f)) {
File::delete($f);
}
}

function preflight($type, $parent)
{
Expand Down

0 comments on commit 957a93a

Please sign in to comment.