Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
Joomla 5.x compatibility
  • Loading branch information
conseilgouz committed Oct 11, 2023
1 parent 09b6bd1 commit f0c2b18
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 14 deletions.
6 changes: 3 additions & 3 deletions cgindexer.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_CGINDEXER</name>
<author>conseilgouz</author>
<creationDate>2023/04/13</creationDate>
<creationDate>2023/10/11</creationDate>
<copyright>Copyright (C) 2023 ConseilGouz. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<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.4</version>
<version>1.0.5</version>
<description>PLG_TASK_CGINDEXER_DESC</description>
<files>
<folder plugin="cgindexer">services</folder>
Expand Down
12 changes: 12 additions & 0 deletions plg_task_cgindexer_changelog.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<changelogs>
<changelog>
<element>cgindexer</element>
<type>plugin</type>
<group>task</group>
<version>1.0.5</version>
<note>
<item>11/10/2023</item>
</note>
<fix>
<item>Joomla 5.x compatibility</item>
</fix>
</changelog>
<changelog>
<element>cgindexer</element>
<type>plugin</type>
Expand Down
18 changes: 10 additions & 8 deletions script.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<?php
/**
* Task Indexer Plugin - Joomla 4.0.0 Plugin
* Version : 1.0.0
* Task Indexer Plugin - Joomla 4.x/5.x Plugin
* Version : 1.0.5
* copyright : Copyright (C) 2023 ConseilGouz. All rights reserved.
* license : http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* license : http://www.gnu.org/licenses/gpl-3.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 plgtaskCGIndexerInstallerScript
{
private $min_joomla_version = '4.1.0';
private $min_php_version = '7.2';
private $min_php_version = '7.4';
private $name = 'Plugin Task CGIndexer';
private $exttype = 'plugin';
private $extname = 'indexer';
private $previous_version = '';
private $dir = null;
private $lang;
private $installerName = 'plgtaskcgindexerinstaller';
public function __construct()
{
Expand Down Expand Up @@ -81,7 +83,7 @@ private function postinstall_cleanup() {
$db->execute();
}
catch (RuntimeException $e) {
JLog::add('unable to enable plugin cgindexer', JLog::ERROR, 'jerror');
Log::add('unable to enable plugin cgindexer', Log::ERROR, 'jerror');
}
}

Expand Down Expand Up @@ -120,7 +122,7 @@ private function passMinimumPHPVersion()
}
private function uninstallInstaller()
{
if ( ! Folder::exists(JPATH_PLUGINS . '/system/' . $this->installerName)) {
if ( ! is_dir(JPATH_PLUGINS . '/system/' . $this->installerName)) {
return;
}
$this->delete([
Expand Down
7 changes: 4 additions & 3 deletions services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

/**
/** Plugin Task CG Indexer : indexation des contenus à indexer dans la recherche avancée
* Version : 1.0.3
* Version : 1.0.5
* copyright : Copyright (C) 2023 ConseilGouz. All rights reserved.
* license : http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* license : https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/

defined('_JEXEC') or die;
Expand Down Expand Up @@ -33,8 +33,9 @@ public function register(Container $container)
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new CGIndexer(
$container->get(DispatcherInterface::class),
$dispatcher,
(array) PluginHelper::getPlugin('task', 'cgindexer')
);
$plugin->setApplication(Factory::getApplication());
Expand Down

0 comments on commit f0c2b18

Please sign in to comment.