52
0

Compare commits

...

36 Commits
5.x ... 3.x

Author SHA1 Message Date
40a2fdecbe
Update on v1.2.4 (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-23 18:12:51 +02:00
a910d8c448
Update on v1.2.4 (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:34:32 +02:00
7bf3eb22f0
Update on v1.2.4 (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:32:57 +02:00
6f879fb7a9
Update on v1.2.4 (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:20:22 +02:00
3ba62566cb
Release of v1.2.4 2024-08-15 01:37:23 +02:00
27db2531c7
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-27 22:48:41 +02:00
d0c6b11fa7
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-26 15:33:16 +02:00
8b06d00f25
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-20 22:39:19 +02:00
2401bf12e6
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-18 14:57:53 +02:00
1fbf5cb00d
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-17 02:39:35 +02:00
fe66535f92
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-08 22:53:46 +02:00
e620d6e5bb
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-06-28 03:48:57 +02:00
541846c4a3
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-06-21 01:32:05 +02:00
c8c193b356
Update on v1.2.3 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-06-07 22:29:57 +02:00
36b4694d19
Release of v1.2.3 2024-06-05 16:29:28 +02:00
519c691633
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-16 15:13:36 +02:00
91d2728f52
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-13 12:23:57 +02:00
ddd2f3ccf2
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-10 18:07:21 +02:00
4e0a558ac4
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-06 07:40:18 +02:00
b6bc326716
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-03 07:54:09 +02:00
cea50b82c6
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-05-02 16:10:47 +02:00
7403dd1b6e
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-30 10:29:24 +02:00
3917d16655
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-27 15:45:07 +02:00
c3070eab27
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-24 21:10:42 +02:00
89eed794e8
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-22 15:32:19 +02:00
1b2e120c22
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-22 00:59:42 +02:00
659ef1ab64
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-16 19:05:17 +02:00
624cc0685c
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-09 13:07:08 +02:00
f9c5e9500d
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-04-06 19:48:58 +02:00
2533ffb1da
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-27 15:04:19 +02:00
1fd40bf110
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-26 22:30:10 +02:00
7d57be4bb8
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-20 14:19:16 +02:00
9a3e3006e0
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-15 12:00:50 +02:00
8365d6b722
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-12 12:40:25 +02:00
7c97cb9fc1
Update on v1.2.2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-03-11 16:56:07 +02:00
57675da437
Update on v1.2.2 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
2024-03-10 13:40:49 +02:00
7 changed files with 25 additions and 100 deletions

View File

@ -12,27 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Registry\Registry;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
use Joomla\Registry\Registry;
use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
use VDM\Joomla\Utilities\JsonHelper;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Component\ComponentHelper;
/**
* Extension - Componentbuilder Privacy Compiler plugin.
*
* @package ComponentbuilderPrivacyCompiler
* @since 1.2.2
* @since 1.2.4
*/
class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
{
@ -141,7 +141,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
}
else
{
Factory::getApplication()->enqueueMessage(Text::_('PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD'), 'Error');
Factory::getApplication()->enqueueMessage(Text::_('PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD'), 'Warning');
$this->loadPrivacy= false;
}
}
@ -331,7 +331,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
$lang_key = $view->placeholders[Placefix::_("LANG_PREFIX")] . '_PRIVACY_CANT_REMOVE_CONTACT_SUPPORT';
}
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Check if any reasons were found not to allow removal";
$methods .= PHP_EOL . Indent::_(2) . "if (ArrayHelper::check(\$reasons))";
$methods .= PHP_EOL . Indent::_(2) . "if (Super__"."_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$reasons))";
$methods .= PHP_EOL . Indent::_(2) . "{";
$methods .= PHP_EOL . Indent::_(3) . "\$status->canRemove = false;";
// set language string
@ -444,7 +444,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " Get all item details of " . $view->name_list . " that belong to this user";
$methods .= PHP_EOL . Indent::_(2) . "\$items = \$model->getPrivacyExport(\$pks, \$user);";
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " check if we have items since permissions could block the request";
$methods .= PHP_EOL . Indent::_(2) . "if (ArrayHelper::check(\$items))";
$methods .= PHP_EOL . Indent::_(2) . "if (Super__"."_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$items))";
$methods .= PHP_EOL . Indent::_(2) . "{";
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Remove " . $view->name_single . " default columns";
$methods .= PHP_EOL . Indent::_(3) . "foreach (array('params', 'asset_id', 'checked_out', 'checked_out_time', 'created', 'created_by', 'modified', 'modified_by', 'published', 'ordering', 'access', 'version', 'hits') as \$column)";
@ -681,7 +681,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
$methods .= PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__) . " get all items for the " . $view->name_list . " table that belong to this user";
$methods .= PHP_EOL . Indent::_(2) . "\$pks = \$db->setQuery(\$query)->loadColumn();";
$methods .= PHP_EOL .PHP_EOL . Indent::_(2) . "if (ArrayHelper::check(\$pks))";
$methods .= PHP_EOL .PHP_EOL . Indent::_(2) . "if (Super__"."_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$pks))";
$methods .= PHP_EOL . Indent::_(2) . "{";
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " get the " . $viewName_single . " model";
$methods .= PHP_EOL . Indent::_(3) . "\$model = self::getModel('" . $viewName_single . "', JPATH_ADMINISTRATOR . '/components/com_" . Placefix::_("component") . "');";
@ -738,7 +738,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
if ($hasPermissional)
{
$methods .= PHP_EOL . PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " Get global permissional control activation. (default is inactive)";
$methods .= PHP_EOL . Indent::_(3) . "\$strict_permission_per_field = \JComponentHelper::getParams('com_" . Placefix::_("component") . "')->get('strict_permission_per_field', 0);";
$methods .= PHP_EOL . Indent::_(3) . "\$strict_permission_per_field = ComponentHelper::getParams('com_" . Placefix::_("component") . "')->get('strict_permission_per_field', 0);";
$methods .= PHP_EOL . Indent::_(3) . "if(\$strict_permission_per_field)";
$methods .= PHP_EOL . Indent::_(3) . "{";
$methods .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " remove all fields that is not permitted to be changed";
@ -768,7 +768,7 @@ class PlgExtensionComponentbuilderPrivacyCompiler extends CMSPlugin
$methods .= PHP_EOL . Indent::_(3) . "\$table = \$model->getTable();";
$methods .= PHP_EOL . Indent::_(3) . "//" . Line::_(__Line__, __Class__) . " check that we still have pseudoanonymised data for " . $view->name_list . " set";
$methods .= PHP_EOL . Indent::_(3) . "if (!ArrayHelper::check(\$pseudoanonymisedData))";
$methods .= PHP_EOL . Indent::_(3) . "if (!Super__"."_0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check(\$pseudoanonymisedData))";
$methods .= PHP_EOL . Indent::_(3) . "{";
$methods .= PHP_EOL . Indent::_(4) . "//" . Line::_(__Line__, __Class__) . " still archive all items";
$methods .= PHP_EOL . Indent::_(4) . "\$table->publish(\$pks, 2);";

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.10" group="extension" method="upgrade">
<name>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER</name>
<creationDate>9th March, 2024</creationDate>
<creationDate>23rd August, 2024</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl>
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>1.2.2</version>
<version>1.2.4</version>
<description>PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION</description>
<!-- Scripts to run on installation -->
@ -17,6 +17,8 @@
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_extension_componentbuilderprivacycompiler.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_extension_componentbuilderprivacycompiler.sys.ini</language>
<language tag="af-ZA">af-ZA/af-ZA.plg_extension_componentbuilderprivacycompiler.ini</language>
<language tag="af-ZA">af-ZA/af-ZA.plg_extension_componentbuilderprivacycompiler.sys.ini</language>
</languages>
<!-- Plugin files -->

View File

@ -0,0 +1,2 @@
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_YES="Ja"
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NO="Nee"

View File

@ -0,0 +1,2 @@
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_YES="Ja"
PLG_CONTENT_COMPONENTBUILDERLANGUAGETABS_NO="Nee"

View File

@ -1,4 +1,4 @@
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER="Extension - Componentbuilder Privacy Compiler"
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_DESCRIPTION="This plugin is used to build the privacy plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin."
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.1.2.2)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 17th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.1.2.4)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 17th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD="You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."

View File

@ -1,4 +1,4 @@
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER="Extension - Componentbuilder Privacy Compiler"
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_DESCRIPTION="This plugin is used to build the privacy plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin."
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.1.2.2)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 17th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_XML_DESCRIPTION="<h1>Extension - Componentbuilder Privacy Compiler (v.1.2.4)</h1> <div style='clear: both;'></div><p>This plugin is used to build the privacy plugin for your component during compilation. To activate it you must first enable it here. Then open your JCB component global options, and under the Global tab, select this plugin in the Activate Compiler Plugins field.Also be sure to link your admin views to the privacy suite of Joomla via our other Content - Componentbuilder Privacy Tabs plugin.</p><p>Created by <a href='https://dev.vdm.io' target='_blank'>Llewellyn van der Merwe</a><br /><small>Development started 17th August, 2019</small></p>"
PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER_YOU_DO_NOT_HAVE_A_GLOBAL_PRIVACY_PLUGIN_SETUP_SO_THE_INTEGRATION_WITH_JOOMLA_PRIVACY_SUITE_COULD_NOT_BE_BUILD="You do not have a global privacy plugin setup, so the integration with Joomla privacy suite could not be build."

View File

@ -48,87 +48,6 @@ class plgExtensionComponentbuilderPrivacyCompilerInstallerScript
if ('install' === $route)
{
// needs fix
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 3.0.0 or higher installed
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
(
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
$jcbVersion[0] > 3)
)
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// load the helper class
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
// block install
$blockInstall = true;
// check the version of JCB
$manifest = ComponentbuilderHelper::manifest();
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
{
// get the version
$jcbVersion = explode('.', $manifest->version);
// check that we have JCB 2.10.13 or higher installed
if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && $jcbVersion[1] >= 10 && (($jcbVersion[1] == 10 && $jcbVersion[2] >= 13) || ($jcbVersion[1] > 10))) || $jcbVersion[0] >= 3))
{
$blockInstall = false;
}
}
// allow install if all conditions are met
if ($blockInstall)
{
$app->enqueueMessage('Please upgrade to JCB 2.10.13 or higher before installing this plugin.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))
{
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
return false;
}
// check that componentbuilder is installed
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
if (!JFile::exists($pathToCore))