Added the option to import JCB packages with GUID mapping. Resolved gh-657 to allow for painless fieldtype change in the field area.

This commit is contained in:
2021-08-11 14:15:35 +02:00
parent 576eac1a5a
commit b64e423f51
51 changed files with 345 additions and 155 deletions

View File

@ -604,7 +604,7 @@ class ComponentbuilderModelAjax extends JModelList
'before' => array('table' => 'admin_view', 'tables' => 'admin_views', 'id' => 'id', 'name' => 'system_name', 'text' => 'Admin View')
);
protected function checkRepeatableConversion(&$fieldsData, $fieldsArrayType, $id, $linked_id_name)
protected function checkRepeatableConversion($type, &$fieldsData, $fieldsArrayType, $id, $linked_id_name)
{
if (ComponentbuilderHelper::checkJson($fieldsData) && isset($this->conversionCheck[$fieldsArrayType]))
{
@ -624,7 +624,7 @@ class ComponentbuilderModelAjax extends JModelList
$objectUpdate = new stdClass();
$objectUpdate->{$linked_id_name} = (int) $id;
$objectUpdate->{$fieldsArrayType} = $fieldsData;
JFactory::getDbo()->updateObject('#__componentbuilder_'.$type, $objectUpdate, 'admin_view');
JFactory::getDbo()->updateObject('#__componentbuilder_' . $type, $objectUpdate, 'admin_view');
}
}
}
@ -1733,7 +1733,7 @@ class ComponentbuilderModelAjax extends JModelList
// check repeatable conversion
if (method_exists(__CLASS__, 'checkRepeatableConversion'))
{
$this->checkRepeatableConversion($fieldsData, $fieldName, $id, $idName);
$this->checkRepeatableConversion($type, $fieldsData, $fieldName, $id, $idName);
}
// get the table
$table = $this->getSubformTable($type, $fieldsData);
@ -2180,8 +2180,8 @@ class ComponentbuilderModelAjax extends JModelList
{
// reset the buttons bucket
$buttons = array();
// some helper for some fields
$helper = array('xml' => 'note_select_field_type');
// some helper for some fields (I am sorry)
$helper = array('xml' => 'note_filter_information');
// get input
$jinput = JFactory::getApplication()->input;
$return_here = $jinput->get('return_here', null, 'base64');
@ -2235,10 +2235,14 @@ class ComponentbuilderModelAjax extends JModelList
// check if field has string length
if (ComponentbuilderHelper::checkString($value))
{
$buttons[$key] = array();
// see if the field needs some help :)
$_key = (isset($helper[$key])) ? $helper[$key] : $key;
// build the buttons
$buttons[$_key] = array();
if (($button = $this->getButton('custom_code', 3)) && ComponentbuilderHelper::checkString($button))
{
$buttons[$key]['_create'] = $button;
$buttons[$_key]['_create'] = $button;
}
}
}
@ -2248,15 +2252,16 @@ class ComponentbuilderModelAjax extends JModelList
{
foreach ($bucket as $field => $customcodes)
{
$edit_icon = '<span class="icon-edit" aria-hidden="true"></span> ';
// see if the field needs some help :)
if (isset($helper[$field]))
{
$field = $helper[$field];
}
$field = (isset($helper[$field])) ? $helper[$field] : $field;
// set the edit icon
$edit_icon = '<span class="icon-edit" aria-hidden="true"></span> ';
// load the buttons found
foreach ($customcodes as $customcode)
{
// get the customcode name
$key = (array) explode('+', $customcode);
// see if we can get the button
if (!isset($buttons[$field][$key[0]]) && ($_id = ComponentbuilderHelper::getVar('custom_code', $key[0], 'function_name')) !== false
&& ($button = ComponentbuilderHelper::getEditTextButton($edit_icon . $key[0], $_id, 'custom_code', 'custom_codes', $return_here, 'com_componentbuilder', false, 'btn btn-small button-edit" style="margin: 0 0 5px 0;'))
&& ComponentbuilderHelper::checkString($button))
@ -3225,15 +3230,23 @@ class ComponentbuilderModelAjax extends JModelList
{
// first check field type
$_fieldType = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'fieldtype');
// only continue if field type is the same
if ($fieldtype == $_fieldType)
$xmlDB = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'xml');
// check if it is a string
if (ComponentbuilderHelper::checkString($xmlDB))
{
$xmlDB = ComponentbuilderHelper::getVar('field', $global['a_id'], 'id', 'xml');
// check if it is a string
if (ComponentbuilderHelper::checkString($xmlDB))
{
$xml = json_decode($xmlDB);
}
$xml = json_decode($xmlDB);
}
// remove the field type if not the same
if ($xml && $fieldtype != $_fieldType)
{
// unset some stuff
$pattern = array();
$pattern[] = '/type=".+?"/i'; // to force the new type to be set
$pattern[] = '/class=".+?"/i'; // to remove all classes
$pattern[] = '/type_php.+?".+?"/i'; // to remove any PHP code stuff
// also add a special switch to force adding all properties of the new type
$xml = preg_replace($pattern, '..__FORCE_LOAD_ALL_PROPERTIES__..', $xml);
}
}
return $xml;

View File

@ -163,6 +163,7 @@ class ComponentbuilderModelClass_extendings extends JModelList
{
$extension_typeArray = array(
0 => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_SELECT_AN_OPTION',
'powers' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_POWERS',
'components' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_COMPONENTS',
'plugins' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_PLUGINS',
'modules' => 'COM_COMPONENTBUILDER_CLASS_EXTENDS_MODULES'

View File

@ -174,7 +174,10 @@ class ComponentbuilderModelClass_methods extends JModelList
$visibilityArray = array(
'public' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC',
'protected' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED',
'private' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE'
'private' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE',
'public static' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC_STATIC',
'protected static' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED_STATIC',
'private static' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE_STATIC'
);
// Now check if value is found in this array
if (isset($visibilityArray[$value]) && ComponentbuilderHelper::checkString($visibilityArray[$value]))
@ -187,6 +190,7 @@ class ComponentbuilderModelClass_methods extends JModelList
{
$extension_typeArray = array(
0 => 'COM_COMPONENTBUILDER_CLASS_METHOD_SELECT_AN_OPTION',
'powers' => 'COM_COMPONENTBUILDER_CLASS_METHOD_POWERS',
'components' => 'COM_COMPONENTBUILDER_CLASS_METHOD_COMPONENTS',
'plugins' => 'COM_COMPONENTBUILDER_CLASS_METHOD_PLUGINS',
'modules' => 'COM_COMPONENTBUILDER_CLASS_METHOD_MODULES'

View File

@ -174,7 +174,10 @@ class ComponentbuilderModelClass_properties extends JModelList
$visibilityArray = array(
'public' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC',
'protected' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED',
'private' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE'
'private' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE',
'public static' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC_STATIC',
'protected static' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED_STATIC',
'private static' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE_STATIC'
);
// Now check if value is found in this array
if (isset($visibilityArray[$value]) && ComponentbuilderHelper::checkString($visibilityArray[$value]))
@ -187,6 +190,7 @@ class ComponentbuilderModelClass_properties extends JModelList
{
$extension_typeArray = array(
0 => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_SELECT_AN_OPTION',
'powers' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_POWERS',
'components' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_COMPONENTS',
'plugins' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_PLUGINS',
'modules' => 'COM_COMPONENTBUILDER_CLASS_PROPERTY_MODULES'

View File

@ -51,7 +51,7 @@ class JFormFieldClassextendingsfilterextensiontype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldClassmethodsfilterextensiontype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
if ($results)
{

View File

@ -51,7 +51,7 @@ class JFormFieldClasspropertiesfilterextensiontype extends JFormFieldList
$results = $db->loadColumn();
$_filter = array();
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_EXTENSION_TYPE') . ' -');
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_TYPE') . ' -');
if ($results)
{

View File

@ -153,8 +153,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_MESSAGE"

View File

@ -608,8 +608,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_MESSAGE"
@ -1788,8 +1786,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_EXTENDS_NAME_MESSAGE"
@ -121,6 +119,8 @@
<!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_CLASS_EXTENDS_SELECT_AN_OPTION</option>
<option value="powers">
COM_COMPONENTBUILDER_CLASS_EXTENDS_POWERS</option>
<option value="components">
COM_COMPONENTBUILDER_CLASS_EXTENDS_COMPONENTS</option>
<option value="plugins">

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CLASS_METHOD_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_METHOD_NAME_MESSAGE"
@ -117,7 +115,7 @@
description="COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_DESCRIPTION"
class="list_class"
multiple="false"
filter="WORD"
filter="STRING"
required="true">
<!-- Option Set. -->
<option value="public">
@ -126,6 +124,12 @@
COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED</option>
<option value="private">
COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE</option>
<option value="public static">
COM_COMPONENTBUILDER_CLASS_METHOD_PUBLIC_STATIC</option>
<option value="protected static">
COM_COMPONENTBUILDER_CLASS_METHOD_PROTECTED_STATIC</option>
<option value="private static">
COM_COMPONENTBUILDER_CLASS_METHOD_PRIVATE_STATIC</option>
</field>
<!-- Extension_type Field. Type: List. (joomla) -->
<field
@ -139,6 +143,8 @@
<!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_CLASS_METHOD_SELECT_AN_OPTION</option>
<option value="powers">
COM_COMPONENTBUILDER_CLASS_METHOD_POWERS</option>
<option value="components">
COM_COMPONENTBUILDER_CLASS_METHOD_COMPONENTS</option>
<option value="plugins">

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_PROPERTY_NAME_MESSAGE"
@ -117,7 +115,7 @@
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_DESCRIPTION"
class="list_class"
multiple="false"
filter="WORD"
filter="STRING"
required="true">
<!-- Option Set. -->
<option value="public">
@ -126,6 +124,12 @@
COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED</option>
<option value="private">
COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE</option>
<option value="public static">
COM_COMPONENTBUILDER_CLASS_PROPERTY_PUBLIC_STATIC</option>
<option value="protected static">
COM_COMPONENTBUILDER_CLASS_PROPERTY_PROTECTED_STATIC</option>
<option value="private static">
COM_COMPONENTBUILDER_CLASS_PROPERTY_PRIVATE_STATIC</option>
</field>
<!-- Extension_type Field. Type: List. (joomla) -->
<field
@ -139,6 +143,8 @@
<!-- Option Set. -->
<option value="">
COM_COMPONENTBUILDER_CLASS_PROPERTY_SELECT_AN_OPTION</option>
<option value="powers">
COM_COMPONENTBUILDER_CLASS_PROPERTY_POWERS</option>
<option value="components">
COM_COMPONENTBUILDER_CLASS_PROPERTY_COMPONENTS</option>
<option value="plugins">
@ -184,17 +190,17 @@
required="true"
button="true"
/>
<!-- Default Field. Type: Text. (joomla) -->
<!-- Default Field. Type: Textarea. (joomla) -->
<field
type="text"
type="textarea"
name="default"
label="COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_LABEL"
size="240"
maxlength="350"
rows="1"
cols="5"
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_DESCRIPTION"
message="COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_MESSAGE"
class="text_area span12"
filter="STRING"
message="COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_MESSAGE"
hint="COM_COMPONENTBUILDER_CLASS_PROPERTY_DEFAULT_HINT"
/>
</fieldset>

View File

@ -125,8 +125,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NAME_MESSAGE"

View File

@ -139,8 +139,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_MESSAGE"

View File

@ -116,8 +116,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_MESSAGE"
@ -1120,8 +1118,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_FIELD_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELD_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_FIELDTYPE_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELDTYPE_NAME_MESSAGE"
@ -324,8 +322,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_FIELDTYPE_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_FIELDTYPE_NAME_MESSAGE"

View File

@ -57,8 +57,8 @@
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">COM_COMPONENTBUILDER_FILTER_NAME_ASCENDING</option>
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="a.extension_type ASC">COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_ASCENDING</option>
<option value="a.extension_type DESC">COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_DESCENDING</option>
<option value="a.extension_type ASC">COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING</option>
<option value="a.extension_type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -66,8 +66,8 @@
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="a.visibility ASC">COM_COMPONENTBUILDER_FILTER_VISIBILITY_ASCENDING</option>
<option value="a.visibility DESC">COM_COMPONENTBUILDER_FILTER_VISIBILITY_DESCENDING</option>
<option value="a.extension_type ASC">COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_ASCENDING</option>
<option value="a.extension_type DESC">COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_DESCENDING</option>
<option value="a.extension_type ASC">COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING</option>
<option value="a.extension_type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -66,8 +66,8 @@
<option value="a.name DESC">COM_COMPONENTBUILDER_FILTER_NAME_DESCENDING</option>
<option value="a.visibility ASC">COM_COMPONENTBUILDER_FILTER_VISIBILITY_ASCENDING</option>
<option value="a.visibility DESC">COM_COMPONENTBUILDER_FILTER_VISIBILITY_DESCENDING</option>
<option value="a.extension_type ASC">COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_ASCENDING</option>
<option value="a.extension_type DESC">COM_COMPONENTBUILDER_FILTER_EXTENSION_TYPE_DESCENDING</option>
<option value="a.extension_type ASC">COM_COMPONENTBUILDER_FILTER_TYPE_ASCENDING</option>
<option value="a.extension_type DESC">COM_COMPONENTBUILDER_FILTER_TYPE_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

View File

@ -1202,8 +1202,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE"

View File

@ -832,8 +832,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE"

View File

@ -799,8 +799,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_GROUP_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_LANGUAGE_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_LANGUAGE_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_LAYOUT_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_LIBRARY_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_LIBRARY_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SERVER_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SERVER_NAME_MESSAGE"

View File

@ -116,8 +116,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SITE_VIEW_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SITE_VIEW_NAME_MESSAGE"
@ -1139,8 +1137,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SITE_VIEW_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SITE_VIEW_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SNIPPET_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SNIPPET_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_SNIPPET_TYPE_NAME_MESSAGE"

View File

@ -102,8 +102,6 @@
maxlength="150"
description="COM_COMPONENTBUILDER_TEMPLATE_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE"

View File

@ -72,6 +72,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
public $canmerge = 1;
public $importGuidOnly = 1;
public $postfix = false;
public $forceUpdate = 0;
public $hasKey = 0;
@ -224,6 +225,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$this->moreInfo = $this->app->input->getInt('more_info', 0);
// allow merge
$this->canmerge = $this->app->input->getInt('canmerge', 1);
// forch GUID only search
$this->importGuidOnly = $this->app->input->getInt('import_guid_only', 0);
// has a key
$this->hasKey = $this->app->input->getInt('haskey', 0);
// die sleutle
@ -2671,6 +2674,20 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$query->from($this->_db->quoteName('#__componentbuilder_' . $type, 'a'));
// only run query if where is set
$runQuery = false;
// we first try to get the item by GUID
if ($get == 1 && isset($item->guid))
{
if (($item = ComponentbuilderHelper::getGUID($item->guid, $type, 'a.*')) !== false)
{
return $item;
}
// check if we should continue the search
elseif ($this->importGuidOnly == 1)
{
return false;
}
}
// continue search
if ($get == 1 && isset($item->created) && isset($item->id) && (isset($item->name) || isset($item->system_name)))
{
// to prefent crazy mismatch with old IDs (I know very weired)

View File

@ -111,7 +111,7 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
// extract the boilerplate class comment
$class['comment'] = ComponentbuilderHelper::extractBoilerplateClassComment($fooClass, $classExtends, 'plugins');
// set the extension type
$class['extension_type'] = 'plugins';
$class['target_type'] = 'plugins';
// store the class
$this->storePluginBoilerplate($tables['e'], $models['e'], $class, $app);
// work around