Skip to content

Commit

Permalink
2.0.3
Browse files Browse the repository at this point in the history
J 3.10 : uppercase pacjakge manifest file name
  • Loading branch information
conseilgouz committed Aug 31, 2022
1 parent a9b6132 commit 23c6b7d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
12 changes: 12 additions & 0 deletions cg_template_switcher_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<changelogs>
<changelog>
<element>pkg_cg_template_switcher</element>
<type>package</type>
<version>2.0.3</version>
<note>
<item>Update : 31/08/2022</item>
</note>
<fix>
<item>uninstall : handel uppercase manifest file names</item>
<item>uninstall : remove unnecessary files</item>
</fix>
</changelog>
<changelog>
<element>pkg_cg_template_switcher</element>
<type>package</type>
Expand Down
2 changes: 1 addition & 1 deletion pkg_cgtemplateswitcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<author>ConseilGouz</author>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>2.0.2</version>
<version>2.0.3</version>
<url>https://www.conseilgouz.com/</url>
<packager>ConseilGouz</packager>
<description>Package CG Template Switcher</description>
Expand Down
20 changes: 14 additions & 6 deletions script.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* CG Template Switcher package - Joomla 4 Module
* Version : 2.0.2
* Version : 2.0.3
* Package : CG Template Switcher
* copyright : Copyright (C) 2022 ConseilGouz. All rights reserved.
* license : http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
Expand Down Expand Up @@ -29,17 +29,21 @@ public function __construct()
* @return void
*/
public function uninstall($parent) {
// remove old package xml
$f = JPATH_MANIFESTS . '/packages/pkg_cg_template_switcher.xml';
if (@is_file($f)) {
File::delete($f);
}
$f = JPATH_MANIFESTS . '/packages/pkg_cgtemplateswitcher.xml';
if (@is_file($f)) {
File::delete($f);
}
// 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 Expand Up @@ -110,6 +114,10 @@ private function postinstall_cleanup() {
}
}
}
// Joomla 3.10 : uppercas manifest file name
$f = JPATH_MANIFESTS . '/packages/pkg_cgtemplateswitcher.xml';
$u = JPATH_MANIFESTS . '/packages/pkg_CGTemplateSwitcher.xml';
File::copy($f,$u);
}
// enable CGStyle plugin
private function postinstall_enable_plugin() {
Expand Down

0 comments on commit 23c6b7d

Please sign in to comment.