52
0

Compare commits

..

38 Commits
4.x ... 5.x

Author SHA1 Message Date
9f2bd76e7b
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-11-07 10:55:30 +02:00
12f42d5862
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-10-13 22:54:01 +02:00
c2be954cb9
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-10-08 00:33:55 +02:00
a4db1430a3
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-30 01:56:42 +02:00
f3df2e8cae
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-20 03:01:45 +02:00
3400287ea9
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-19 05:50:09 +02:00
2d9a5cbd8c
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-09-18 04:40:33 +02:00
6ae490271f
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-24 14:27:31 +02:00
9be4b8b3d5
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-21 21:38:38 +02:00
e176e70832
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-20 22:34:47 +02:00
214bbd23d1
Update on v3.0.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-08-16 19:22:12 +02:00
aa37b1961e
Release of v3.0.0 2024-08-15 01:35:23 +02:00
052d51263e
Release of v2.0.1 2024-07-27 23:05:12 +02:00
a778d12183
Release of v2.0.1 2024-07-26 15:44:48 +02:00
a396b50bfd
Release of v2.0.1 2024-07-20 22:50:17 +02:00
48280b0053
Release of v2.0.1 2024-07-18 15:07:58 +02:00
e240f1aff5
Release of v2.0.1 2024-07-17 02:40:33 +02:00
a2065c141a
Release of v2.0.1 2024-07-08 23:04:46 +02:00
466897f9a8
Release of v2.0.1 2024-06-28 04:00:28 +02:00
2fd0d4c784
Release of v2.0.1 2024-06-21 03:36:25 +02:00
36b11971d4
Release of v2.0.1 2024-06-07 23:31:21 +02:00
c54d2a1338
Release of v2.0.0 2024-05-16 16:15:38 +02:00
4ae1650844
Release of v2.0.0 2024-05-13 12:29:41 +02:00
ec4143067c
Release of v2.0.0 2024-05-10 18:23:22 +02:00
a17d579ea7
Release of v2.0.0 2024-05-06 07:57:16 +02:00
7647206027
Release of v2.0.0 2024-05-03 07:56:11 +02:00
cc10c12a85
Release of v2.0.0 2024-04-30 12:38:13 +02:00
6f4fa877a4
Release of v2.0.0 2024-04-27 16:09:02 +02:00
b68ab9e1a8
Release of v2.0.0 2024-04-24 21:46:39 +02:00
7766a51e43
Release of v2.0.0 2024-04-22 01:23:28 +02:00
03882d5952
Release of v2.0.0 2024-04-09 14:03:59 +02:00
85c66ba77a
Release of v2.0.0 2024-04-07 12:09:55 +02:00
58d993b319
Release of v2.0.0 2024-04-06 23:50:19 +02:00
52493a408f
Release of v2.0.0 2024-03-26 22:41:08 +02:00
0f3808a8b4
Release of v2.0.0 2024-03-20 14:30:39 +02:00
b58ee63a61
Release of v2.0.0 2024-03-15 12:35:14 +02:00
828acf546a
Release of v2.0.0 2024-03-12 13:05:01 +02:00
fcfea05579
Release of v2.0.0 2024-03-11 18:39:21 +02:00
4 changed files with 117 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4.0" group="extension" method="upgrade">
<extension type="plugin" version="5.0" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER</name>
<creationDate>7th November, 2024</creationDate>
<author>Llewellyn van der Merwe</author>

View File

@ -13,9 +13,11 @@
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Version;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Filesystem\Folder;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
/**
* Extension - Componentbuilder Privacy Compiler script file.
@ -24,4 +26,116 @@ use Joomla\CMS\Filesystem\Folder;
*/
class plgExtensionComponentbuilderPrivacyCompilerInstallerScript
{
/**
* The CMS Application.
*
* @since 4.4.2
*/
protected $app;
/**
* A list of files to be deleted
*
* @var array
* @since 3.6
*/
protected array $deleteFiles = [];
/**
* A list of folders to be deleted
*
* @var array
* @since 3.6
*/
protected array $deleteFolders = [];
/**
* Constructor
*
* @param InstallerAdapter $adapter The object responsible for running this script
*/
public function __construct($adapter)
{
// get application
$this->app = Factory::getApplication();
if (is_file(JPATH_ROOT . '/plugins/extension/componentbuilderprivacycompiler/componentbuilderprivacycompiler.php'))
{
$this->deleteFiles[] = '/plugins/extension/componentbuilderprivacycompiler/componentbuilderprivacycompiler.php';
}
}
/**
* Called before any type of action
*
* @param string $route Which action is happening (install|uninstall|discover_install|update)
* @param InstallerAdapter $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function preflight($route, $adapter)
{
// set application to local method var, just use $this->app in future [we will drop $app in J6]
$app = $this->app;
// the default for both install and update
$jversion = new Version();
if (!$jversion->isCompatible('5.0.0'))
{
$app->enqueueMessage('Please upgrade to at least Joomla! 5.0.0 before continuing!', 'error');
return false;
}
// remove old files and folders
$this->removeFiles();
return true;
}
/**
* Called before any type of action
*
* @param string $route Which action is happening (install|uninstall|discover_install|update)
* @param InstallerAdapter $adapter The object responsible for running this script
*
* @return boolean True on success
*/
public function postflight($route, $adapter)
{
// set application to local method var, just use $this->app in future [we will drop $app in J6]
$app = $this->app;
return true;
}
/**
* Remove the files and folders in the given array from
*
* @return void
* @since 5.0.2
*/
protected function removeFiles()
{
if (!empty($this->deleteFiles))
{
foreach ($this->deleteFiles as $file)
{
if (is_file(JPATH_ROOT . $file) && !File::delete(JPATH_ROOT . $file))
{
echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $file) . '<br>';
}
}
}
if (!empty($this->deleteFolders))
{
foreach ($this->deleteFolders as $folder)
{
if (is_dir(JPATH_ROOT . $folder) && !Folder::delete(JPATH_ROOT . $folder))
{
echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $folder) . '<br>';
}
}
}
}
}

View File

@ -18,7 +18,6 @@ use Joomla\CMS\Extension\PluginInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\DI\ServiceProviderInterface;
use Joomla\DI\Container;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Plugin\Extension\ComponentbuilderPrivacyCompiler\Extension\ComponentbuilderPrivacyCompiler;
return new class () implements ServiceProviderInterface {

View File

@ -10,7 +10,6 @@
*/
namespace VDM\Plugin\Extension\ComponentbuilderPrivacyCompiler\Extension;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Application\CMSApplication;