Added the feature that stops plugins from being exported as part of JCB package

This commit is contained in:
Llewellyn van der Merwe 2019-11-13 05:36:42 +02:00
parent 1a18f5a386
commit 850ee4b7e9
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
5 changed files with 21 additions and 6 deletions

View File

@ -143,11 +143,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 9th November, 2019 + *Last Build*: 13th November, 2019
+ *Version*: 2.10.5 + *Version*: 2.10.5
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **255982** + *Line count*: **255997**
+ *Field count*: **1351** + *Field count*: **1351**
+ *File count*: **1614** + *File count*: **1614**
+ *Folder count*: **256** + *Folder count*: **256**

View File

@ -143,11 +143,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 9th November, 2019 + *Last Build*: 13th November, 2019
+ *Version*: 2.10.5 + *Version*: 2.10.5
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **255982** + *Line count*: **255997**
+ *Field count*: **1351** + *Field count*: **1351**
+ *File count*: **1614** + *File count*: **1614**
+ *Folder count*: **256** + *Folder count*: **256**

View File

@ -6234,7 +6234,7 @@ class Get
$joomla_plugins = array_filter( $joomla_plugins = array_filter(
array_values($addjoomla_plugins), array_values($addjoomla_plugins),
function($array){ function($array){
// only load the plugins whose target association calles for it // only load the plugins whose target association call for it
if (!isset($array['target']) || $array['target'] != 2) if (!isset($array['target']) || $array['target'] != 2)
{ {
return true; return true;

View File

@ -749,6 +749,21 @@ class ComponentbuilderModelJoomla_components extends JModelList
// actions to take if table is component_plugins // actions to take if table is component_plugins
if ('component_plugins' === $table) if ('component_plugins' === $table)
{ {
// we remove those plugins not part of the export
if (isset($item->addjoomla_plugins) && ComponentbuilderHelper::checkJson($item->addjoomla_plugins))
{
$item->addjoomla_plugins = array_filter(
json_decode($item->addjoomla_plugins, true),
function ($plugin) {
// target 2 is only export and target 0 is both (1 is only compile)
if (isset($plugin['target']) && ($plugin['target'] == 2 || $plugin['target'] == 0))
{
return true;
}
return false;
}
);
}
// add custom admin views // add custom admin views
$this->setData('joomla_plugin', $this->getValues($item->addjoomla_plugins, 'subform', 'plugin'), 'id'); $this->setData('joomla_plugin', $this->getValues($item->addjoomla_plugins, 'subform', 'plugin'), 'id');
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>9th November, 2019</creationDate> <creationDate>13th November, 2019</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>