forked from joomla/Component-Builder
Resolved gh-511 to ensure that all linked custom fields and rules are indeed moved to the plugins and modules related.
This commit is contained in:
parent
a6cdafb31f
commit
1dd9f75efc
@ -144,7 +144,7 @@ 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*: 12th February, 2020
|
+ *Last Build*: 13th February, 2020
|
||||||
+ *Version*: 2.10.11
|
+ *Version*: 2.10.11
|
||||||
+ *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
|
||||||
|
@ -144,7 +144,7 @@ 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*: 12th February, 2020
|
+ *Last Build*: 13th February, 2020
|
||||||
+ *Version*: 2.10.11
|
+ *Version*: 2.10.11
|
||||||
+ *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
|
||||||
|
@ -235,6 +235,13 @@ class Structure extends Get
|
|||||||
*/
|
*/
|
||||||
public $extentionCustomfields = array();
|
public $extentionCustomfields = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extention Tracking Files Moved
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $extentionTrackingFilesMoved = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The standard folders
|
* The standard folders
|
||||||
*
|
*
|
||||||
@ -1807,6 +1814,9 @@ class Structure extends Get
|
|||||||
{
|
{
|
||||||
// check if this is a custom field that should be moved
|
// check if this is a custom field that should be moved
|
||||||
if (isset($this->extentionCustomfields[$field['type_name']]))
|
if (isset($this->extentionCustomfields[$field['type_name']]))
|
||||||
|
{
|
||||||
|
// lets check if we already moved this
|
||||||
|
if (!isset($this->extentionTrackingFilesMoved[$path . 'type' . $field['type_name']]))
|
||||||
{
|
{
|
||||||
// check files exist
|
// check files exist
|
||||||
if (JFile::exists($this->componentPath . '/admin/models/fields/' . $field['type_name'] . '.php'))
|
if (JFile::exists($this->componentPath . '/admin/models/fields/' . $field['type_name'] . '.php'))
|
||||||
@ -1814,11 +1824,15 @@ class Structure extends Get
|
|||||||
// copy the custom field
|
// copy the custom field
|
||||||
JFile::copy($this->componentPath . '/admin/models/fields/' . $field['type_name'] . '.php', $path . '/fields/' . $field['type_name'] . '.php');
|
JFile::copy($this->componentPath . '/admin/models/fields/' . $field['type_name'] . '.php', $path . '/fields/' . $field['type_name'] . '.php');
|
||||||
}
|
}
|
||||||
// do this just once
|
// stop from doing this again.
|
||||||
unset($this->extentionCustomfields[$field['type_name']]);
|
$this->extentionTrackingFilesMoved[$path . 'type' . $field['type_name']] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// check if this has validation that should be moved
|
// check if this has validation that should be moved
|
||||||
if (isset($this->validationLinkedFields[$field['field']]))
|
if (isset($this->validationLinkedFields[$field['field']]))
|
||||||
|
{
|
||||||
|
// lets check if we already moved this
|
||||||
|
if (!isset($this->extentionTrackingFilesMoved[$path . 'rule' . $this->validationLinkedFields[$field['field']]]))
|
||||||
{
|
{
|
||||||
// check files exist
|
// check files exist
|
||||||
if (JFile::exists($this->componentPath . '/admin/models/rules/' . $this->validationLinkedFields[$field['field']] . '.php'))
|
if (JFile::exists($this->componentPath . '/admin/models/rules/' . $this->validationLinkedFields[$field['field']] . '.php'))
|
||||||
@ -1826,8 +1840,9 @@ class Structure extends Get
|
|||||||
// copy the custom field
|
// copy the custom field
|
||||||
JFile::copy($this->componentPath . '/admin/models/rules/' . $this->validationLinkedFields[$field['field']] . '.php', $path . '/rules/' . $this->validationLinkedFields[$field['field']] . '.php');
|
JFile::copy($this->componentPath . '/admin/models/rules/' . $this->validationLinkedFields[$field['field']] . '.php', $path . '/rules/' . $this->validationLinkedFields[$field['field']] . '.php');
|
||||||
}
|
}
|
||||||
// do this just once
|
// stop from doing this again.
|
||||||
unset($this->validationLinkedFields[$field['field']]);
|
$this->extentionTrackingFilesMoved[$path . 'rule' . $this->validationLinkedFields[$field['field']]] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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>12th February, 2020</creationDate>
|
<creationDate>13th February, 2020</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>
|
||||||
|
Loading…
Reference in New Issue
Block a user