Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
Joomla 5 compatibility
  • Loading branch information
conseilgouz committed Oct 11, 2023
1 parent b121611 commit 02b2287
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
8 changes: 4 additions & 4 deletions cgautoarchive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension version="4.1" type="plugin" group="task" method="upgrade">
<name>PLG_TASK_CGAUTOARCHIVE</name>
<author>conseilgouz</author>
<creationDate>2022 October</creationDate>
<copyright>Copyright (C) 2022 ConseilGouz. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<creationDate>2023-10-11</creationDate>
<copyright>Copyright (C) 2023 ConseilGouz. All rights reserved.</copyright>
<license>GNU General Public License version 3 or later; see LICENSE.txt</license>
<authorEmail>pascal.leconte@conseilgouz.com</authorEmail>
<authorUrl>www.conseilgouz.com</authorUrl>
<version>1.0.0</version>
<version>1.0.1</version>
<description>PLG_TASK_CGAUTOARCHIVE_DESC</description>
<files>
<filename plugin="cgautoarchive">cgautoarchive.php</filename>
Expand Down
12 changes: 12 additions & 0 deletions cgautoarchive_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<changelogs>
<changelog>
<element>cgautoarchive</element>
<type>plugin</type>
<group>task</group>
<version>1.0.1</version>
<note>
<item>11/10/2023</item>
</note>
<fix>
<item>Joomla 5.x compatibility</item>
</fix>
</changelog>
<changelog>
<element>cgautoarchive</element>
<type>plugin</type>
Expand Down
16 changes: 9 additions & 7 deletions script.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?php
/**
* CG Auto Archive Plugin - Joomla 4.0.0 Module
* Version : 1.0.0
* CG Auto Archive Plugin - Joomla 4.x/5.x plugin
* Version : 1.0.1
* 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
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\Folder;
use Joomla\CMS\Version;
use Joomla\CMS\Filesystem\File;
use Joomla\Filesystem\File;
use Joomla\CMS\Log\Log;

class plgtaskcgautoarchiveInstallerScript
{
private $min_joomla_version = '4.0.0';
private $min_php_version = '7.2';
private $min_php_version = '7.4';
private $name = 'Plugin CG AutoArchive';
private $exttype = 'plugin';
private $extname = 'cgautoarchive';
private $previous_version = '';
private $dir = null;
private $lang;
private $installerName = 'plgtaskcgautoarchiveinstaller';
public function __construct()
{
Expand Down Expand Up @@ -80,7 +82,7 @@ private function postinstall_cleanup() {
$db->execute();
}
catch (RuntimeException $e) {
JLog::add('unable to enable plugin cg autoarchive', JLog::ERROR, 'jerror');
Log::add('unable to enable plugin cg autoarchive', Log::ERROR, 'jerror');
}

}
Expand Down Expand Up @@ -120,7 +122,7 @@ private function passMinimumPHPVersion()
}
private function uninstallInstaller()
{
if ( ! JFolder::exists(JPATH_PLUGINS . '/system/' . $this->installerName)) {
if ( ! is_dir(JPATH_PLUGINS . '/system/' . $this->installerName)) {
return;
}
$this->delete([
Expand Down

0 comments on commit 02b2287

Please sign in to comment.