Resolves gh-59 the repeatable field id problem. Also improved the export and import to insure snippets and linked admin views are re-mapped on import of the component. Also fixed the target and match field conditions in admin views to re-map the ids correctly.

This commit is contained in:
Llewellyn van der Merwe 2017-03-31 23:28:16 +02:00
parent 5dc3f97f15
commit 82fd08cf57
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
46 changed files with 557 additions and 156 deletions

View File

@ -109,7 +109,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.3.10
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **96064**
+ *Line count*: **96465**
+ *File count*: **578**
+ *Folder count*: **107**

View File

@ -109,7 +109,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.3.10
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **96064**
+ *Line count*: **96465**
+ *File count*: **578**
+ *Folder count*: **107**

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.css

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_components.css

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_components.php

View File

@ -957,12 +957,12 @@ class Fields extends Structure
if (strpos($fieldAttributes['fields'], ',') !== false)
{
// mulitpal fields
$fieldsSets = explode(',', $fieldAttributes['fields']);
$fieldsSets = (array) explode(',', $fieldAttributes['fields']);
}
else
elseif (is_numeric($fieldAttributes['fields']))
{
// single field
$fieldsSets[] = $fieldAttributes['fields'];
$fieldsSets[] = (int) $fieldAttributes['fields'];
}
// only continue if we have a field set
if (ComponentbuilderHelper::checkArray($fieldsSets))

View File

@ -713,15 +713,19 @@ COM_COMPONENTBUILDER_BDYNAMIC_GETB_IDS_MISMATCH_IN_BSB="<b>Dynamic get</b> id:%s
COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!"
COM_COMPONENTBUILDER_BFIELD_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED="<b>Field in %s</b> has id mismatch of selected <b>field</b>. So the id:%s was removed!"
COM_COMPONENTBUILDER_BFIELD_TYPEB_IDS_MISMATCH_IN_BSB="<b>Field type</b> id:%s mismatch in <b>%s</b>."
COM_COMPONENTBUILDER_BFIELD_TYPEB_NOT_SET_FOR_BSB="<b>Field type</b> not set for <b>%s</b>."
COM_COMPONENTBUILDER_BGET_THE_KEY_FROMB_A_CLASSBTN_BTNPRIMARY_HREFS_TARGET_BLANK_TITLEGET_A_KEY_FROM_SSA="<b>Get the key from</b> <a class="btn btn-primary" href="%s" target="_blank" title="get a key from %s">%s</a>"
COM_COMPONENTBUILDER_BIMAGESB_NOT_MOVE_TO_CORRECT_LOCATION="<b>Images</b> not move to correct location!"
COM_COMPONENTBUILDER_BJOIN_VIEW_TABLE_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BVIEW_TABLEB_SO_THE_IDS_WAS_REMOVED="<b>Join view table in %s</b> has id mismatch of selected <b>view table</b>. So the id:%s was removed!"
COM_COMPONENTBUILDER_BLINKED_ADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_NOT_UPDATED="<b>Linked admin view in %s</b> has id mismatch of selected <b>admin view</b>. So the id:%s was not updated!"
COM_COMPONENTBUILDER_BLINKED_VIEWB_IDS_MISMATCH_IN_BADMIN_VIEWSB_AND_WAS_EMREMOVEDEM_FROM_THE_LINKED_VIEWS="<b>Linked view</b> id:%s mismatch in <b>admin view:%s</b>, and was <em>removed</em> from the linked views."
COM_COMPONENTBUILDER_BMAIN_GETB_IDS_MISMATCH_IN_BSB="<b>Main get</b> id:%s mismatch in <b>%s</b>."
COM_COMPONENTBUILDER_BMAIN_GETB_NOT_SET_FOR_BSB="<b>Main get</b> not set for <b>%s</b>."
COM_COMPONENTBUILDER_BREPEATABLEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD="<b>Repeatable</b> id:%s mismatch in <b>field:%s</b>, and was <em>removed</em> from the field."
COM_COMPONENTBUILDER_BSB_COULD_NOT_BE_IMPORTEDS="<b>%s</b> could not be imported%s"
COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="<b>%s</b> <em>component details</em>"
COM_COMPONENTBUILDER_BSB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED="<b>%s</b> has id mismatch of selected <b>field</b>. So the id:%s was removed!"
COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED="<b>Site view in %s</b> has id mismatch of selected <b>site view</b>. So the id:%s was removed!"
COM_COMPONENTBUILDER_BSNIPPETB_IDS_MISMATCH_IN_BSB="<b>Snippet</b> id:%s mismatch in <b>%s</b>."
COM_COMPONENTBUILDER_BVIEW_TABLE_MAINB_IDS_MISMATCH_IN_BSB="<b>View table main</b> id:%s mismatch in <b>%s</b>."
COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp"
COM_COMPONENTBUILDER_COMPANY="Company"

View File

@ -31,8 +31,8 @@ $form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'php_controller',
'php_controller_list',
'php_model',
'php_controller_list',
'php_model_list'
);

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php
@ -245,18 +245,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->php_controller_list))
{
// base64 Decode php_controller_list.
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->php_model))
{
// base64 Decode php_model.
$item->php_model = base64_decode($item->php_model);
}
if (!empty($item->php_controller_list))
{
// base64 Decode php_controller_list.
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->php_model_list))
{
// base64 Decode php_model_list.
@ -1428,18 +1428,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_controller'] = base64_encode($data['php_controller']);
}
// Set the php_controller_list string to base64 string.
if (isset($data['php_controller_list']))
{
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
}
// Set the php_model string to base64 string.
if (isset($data['php_model']))
{
$data['php_model'] = base64_encode($data['php_model']);
}
// Set the php_controller_list string to base64 string.
if (isset($data['php_controller_list']))
{
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
}
// Set the php_model_list string to base64 string.
if (isset($data['php_model_list']))
{

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_views.php
@ -312,10 +312,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list);
// decode html_import_view

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.js

View File

@ -1917,17 +1917,17 @@
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Php_controller_list Field. Type: Textarea. (joomla) -->
<!-- Php_model Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_controller_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
name="php_model"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT"
required="false"
/>
<!-- Addtables Field. Type: Repeatable. (joomla) -->
@ -1969,17 +1969,17 @@
</fieldset>
</fields>
</field>
<!-- Php_model Field. Type: Textarea. (joomla) -->
<!-- Php_controller_list Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_model"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
name="php_controller_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_HINT"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_HINT"
required="false"
/>
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.js

View File

@ -86,6 +86,9 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
protected $forceUpdate = 0;
protected $hasKey = 0;
protected $sleutle = null;
protected $updateAfter = array('field' => array(), 'adminview' => array());
protected $fieldTypes = array();
protected $isRepeatable = array();
/**
* Import an spreadsheet from either folder, url or upload.
@ -652,6 +655,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
return false;
}
// we then store the snippet
if (!$this->saveSmartItems($data, 'snippet', $db, $user, $today))
{
return false;
}
// we then store the dynamic_get
if (!$this->saveSmartItems($data, 'dynamic_get', $db, $user, $today))
{
@ -687,6 +695,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
return false;
}
// do a after all run on all items that need it
$this->updateAfter($db);
// lets move all the files to its correct location
if (!$this->moveSmartStuff($dir))
{
@ -756,6 +766,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$canEdit = $canDo->get('core.edit');
$canState = $canDo->get('core.edit.state');
$canCreate = $canDo->get('core.create');
// set id keeper
if (!isset($this->newID[$type]))
{
$this->newID[$type] = array();
}
foreach ($items[$type] as $item)
{
$oldID = $item->id;
@ -769,7 +784,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
// make sure we have the correct ID set
$item->id = $local->id;
// yes it is newer, lets update
// yes it is newer, lets update (or is being forced)
if ($canEdit && $id = $this->updateLocalItem($item, $type, $db, $user, $today, $canState))
{
$this->newID[$type][$oldID] = $id;
@ -808,6 +823,120 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
return $success;
}
/**
* Update some items after all
*
* @param object $db The database object
*
* @return void
*
**/
protected function updateAfter($db)
{
if (ComponentbuilderHelper::checkArray($this->updateAfter['field']))
{
// update repeatable
foreach ($this->updateAfter['field'] as $field)
{
if (isset($this->newID['field'][$field]))
{
$field = $this->newID['field'][$field];
}
// get the field from db
if ($xml = ComponentbuilderHelper::getVar('field', $field, 'id', 'xml'))
{
if (ComponentbuilderHelper::checkJson($xml))
{
$xml = json_decode($xml);
$fields = ComponentbuilderHelper::getBetween($xml, 'fields="', '"');
$fieldsSets = array();
if (strpos($fields, ',') !== false)
{
// multiple fields
$fieldsSets = array_map('trim', (array) explode(',', $fields));
}
elseif (is_numeric($fields))
{
// single field
$fieldsSets[] = (int) $fields;
}
// update the fields
if (ComponentbuilderHelper::checkArray($fieldsSets))
{
$bucket = array();
foreach ($fieldsSets as $id)
{
if (isset($this->newID['field'][$id]))
{
$bucket[] = $this->newID['field'][$id];
}
else
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BREPEATABLEB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_EMREMOVEDEM_FROM_THE_FIELD', $id, $field), 'warning');
}
}
if (ComponentbuilderHelper::checkArray($bucket))
{
$string = implode(',', $bucket);
$xml = json_encode(str_replace('fields="' . $fields . '"', 'fields="' . $string . '"', $xml));
}
else
{
$xml = '';
}
$object = new stdClass;
$object->id = $field;
$object->xml = $xml;
// update the field
$db->updateObject('#__componentbuilder_field', $object, 'id');
}
}
}
}
}
// do a after all run on admin views that need it
if (ComponentbuilderHelper::checkArray($this->updateAfter['adminview']))
{
// update the addlinked_views
foreach ($this->updateAfter['adminview'] as $adminview)
{
if (isset($this->newID['admin_view'][$adminview]))
{
$adminview = $this->newID['admin_view'][$adminview];
}
// get the field from db
if ($addlinked_views = ComponentbuilderHelper::getVar('admin_view', $adminview, 'id', 'addlinked_views'))
{
if (ComponentbuilderHelper::checkJson($addlinked_views))
{
$addlinked_views = json_decode($addlinked_views, true);
if (ComponentbuilderHelper::checkArray($addlinked_views['adminview']))
{
foreach ($addlinked_views['adminview'] as $nr => $admin)
{
if (isset($this->newID['admin_view'][$admin]))
{
$addlinked_views['adminview'][$nr] = $this->newID['admin_view'][$admin];
}
else
{
$addlinked_views['adminview'][$nr] = '';
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BLINKED_VIEWB_IDS_MISMATCH_IN_BADMIN_VIEWSB_AND_WAS_EMREMOVEDEM_FROM_THE_LINKED_VIEWS', $admin, $adminview), 'warning');
}
}
// update the fields
$object = new stdClass;
$object->id = $adminview;
$object->addlinked_views = json_encode($addlinked_views);
// update the admin view
$db->updateObject('#__componentbuilder_admin_view', $object, 'id');
}
}
}
}
}
}
/**
* Prep the item
*
@ -822,7 +951,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
**/
protected function prepItem($item, &$type, $action, &$user, &$today)
{
$this->updateAfter = false;
// actions to effect both
if (isset($item->asset_id))
{
@ -841,9 +969,19 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
case 'field':
// update the fieldtype
if (isset($item->fieldtype) && isset($this->newID['fieldtype'][$item->fieldtype]))
if (isset($item->fieldtype) && is_numeric($item->fieldtype) && $item->fieldtype > 0 && isset($this->newID['fieldtype'][$item->fieldtype]))
{
$item->fieldtype = $this->newID['fieldtype'][$item->fieldtype];
// update repeatable field values
if ($this->checkRepeatable($item->fieldtype))
{
$this->updateAfter['field'][$item->id] = $item->id; // repeatable
}
}
elseif (!is_numeric($item->fieldtype) || $item->fieldtype == 0)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BFIELD_TYPEB_NOT_SET_FOR_BSB', ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning');
unset($item->fieldtype);
}
else
{
@ -853,7 +991,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
break;
case 'dynamic_get':
// update the view_table_main ID
if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_table_main) && is_numeric($item->view_table_main))
if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_table_main) && is_numeric($item->view_table_main) && $item->view_table_main > 0)
{
if (isset($this->newID['admin_view'][$item->view_table_main]))
{
@ -897,33 +1035,60 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
case 'layout':
case 'template':
// update the dynamic_get
if (isset($item->dynamic_get) && isset($this->newID['dynamic_get'][$item->dynamic_get]))
if (isset($item->dynamic_get) && is_numeric($item->dynamic_get) && $item->dynamic_get > 0 && isset($this->newID['dynamic_get'][$item->dynamic_get]))
{
$item->dynamic_get = $this->newID['dynamic_get'][$item->dynamic_get];
}
elseif (!is_numeric($item->dynamic_get) || $item->dynamic_get == 0)
{
unset($item->dynamic_get);
}
else
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BDYNAMIC_GETB_IDS_MISMATCH_IN_BSB', $item->dynamic_get, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning');
unset($item->dynamic_get);
}
// update the snippet
if (isset($item->snippet) && is_numeric($item->snippet) && $item->snippet > 0 && isset($this->newID['snippet'][$item->snippet]))
{
$item->snippet = $this->newID['snippet'][$item->snippet];
}
elseif (!is_numeric($item->snippet) || $item->snippet == 0)
{
unset($item->snippet);
}
else
{
// $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSNIPPETB_IDS_MISMATCH_IN_BSB', $item->snippet, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning');
// unset($item->snippet);
}
break;
case 'custom_admin_view':
case 'site_view':
// update the main_get
if (isset($item->main_get) && isset($this->newID['dynamic_get'][$item->main_get]))
if (isset($item->main_get) && is_numeric($item->main_get) && $item->main_get > 0 && isset($this->newID['dynamic_get'][$item->main_get]))
{
$item->main_get = $this->newID['dynamic_get'][$item->main_get];
}
elseif (!is_numeric($item->main_get) || $item->main_get == 0)
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BMAIN_GETB_NOT_SET_FOR_BSB', ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning');
unset($item->main_get);
}
else
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BMAIN_GETB_IDS_MISMATCH_IN_BSB', $item->main_get, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'error');
return false;
}
// update the dynamic_get
if (isset($item->dynamic_get) && isset($this->newID['dynamic_get'][$item->dynamic_get]))
if (isset($item->dynamic_get) && is_numeric($item->dynamic_get) && $item->dynamic_get > 0 && isset($this->newID['dynamic_get'][$item->dynamic_get]))
{
$item->dynamic_get = $this->newID['dynamic_get'][$item->dynamic_get];
}
elseif (!is_numeric($item->dynamic_get) || $item->dynamic_get == 0)
{
unset($item->dynamic_get);
}
else
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BDYNAMIC_GETB_IDS_MISMATCH_IN_BSB', $item->dynamic_get, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning');
@ -946,14 +1111,14 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
else
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BCUSTOM_GET_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BDYNAMIC_GETB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BCUSTOM_GET_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BDYNAMIC_GETB_SO_THE_IDS_WAS_REMOVED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $get), 'warning');
unset($custom_get[$nr]);
}
}
// load it back if there is any remaining
if (ComponentbuilderHelper::checkArray($custom_get))
{
$item->custom_get = json_encode($custom_get);
$item->custom_get = json_encode( (object) $custom_get);
}
else
{
@ -964,6 +1129,20 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
unset($item->custom_get);
}
// update the snippet
if (isset($item->snippet) && is_numeric($item->snippet) && $item->snippet > 0 && isset($this->newID['snippet'][$item->snippet]))
{
$item->snippet = $this->newID['snippet'][$item->snippet];
}
elseif (!is_numeric($item->snippet) || $item->snippet == 0)
{
unset($item->snippet);
}
else
{
// $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSNIPPETB_IDS_MISMATCH_IN_BSB', $item->snippet, ComponentbuilderHelper::safeString($type, 'w').':'.$item->id), 'warning');
// unset($item->snippet);
}
break;
case 'admin_view':
// we must clear the demo content (since it was not moved as far as we know) TODO
@ -1001,23 +1180,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// update the addlinked_views
if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views))
{
$addlinked_views = json_decode($item->addlinked_views, true);
foreach ($addlinked_views['adminview'] as $nr => $id)
{
// update the addlinked_views
if (isset($this->newID['admin_view'][$id]))
{
$addlinked_views['adminview'][$nr] = $this->newID['admin_view'][$id];
}
else
{
// this is painful but true...
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BLINKED_ADMIN_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BADMIN_VIEWB_SO_THE_IDS_WAS_NOT_UPDATED', '('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
$this->updateAfter = true;
}
}
// load it back
$item->addlinked_views = json_encode($addlinked_views);
$this->updateAfter['adminview'][$item->id] = $item->id; // addlinked_views
}
else
{
@ -1037,6 +1200,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
$ids = array((int) $ids);
}
// the bucket to load the items back
$bucket = array();
foreach ($ids as $id)
{
if (!is_numeric($id))
@ -1045,14 +1210,22 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
if (isset($this->newID['field'][$id]))
{
$addconditions[$target][$nr] = $this->newID['field'][$id];
$bucket[] = $this->newID['field'][$id];
}
else
{
$this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_BSB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED', ComponentbuilderHelper::safeString($target, 'Ww') . ' in ('.ComponentbuilderHelper::safeString($type, 'w').':'.$item->id.')', $id), 'warning');
$addconditions[$target][$nr] = '';
$bucket[] = '';
}
}
if (count($bucket) == 1)
{
$addconditions[$target][$nr] = $bucket[0];
}
elseif (count($bucket) > 1)
{
$addconditions[$target][$nr] = $bucket;
}
}
}
// load it back
@ -1209,6 +1382,80 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
return false;
}
/**
* Check if a field is a repeatable field
*
* @param string $typeID The type ID
*
* @return bool true on success
*
*/
protected function checkRepeatable($typeID)
{
if(isset($this->isRepeatable[$typeID]))
{
return true;
}
elseif (ComponentbuilderHelper::checkArray($this->isRepeatable))
{
return false;
}
elseif ($type = $this->getFieldType($typeID))
{
if ('repeatable' === $type)
{
$this->isRepeatable[$typeID] = true;
return true;
}
}
return false;
}
/**
* Get the field type
*
* @param string $id The field type id
*
* @return string field type
*
*/
protected function getFieldType($id)
{
if (!isset($this->fieldTypes[$id]))
{
$properties = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'properties');
if (ComponentbuilderHelper::checkJson($properties))
{
$properties = json_decode($properties, true);
if (isset($properties['name']) && ComponentbuilderHelper::checkArray($properties['name']))
{
foreach ($properties['name'] as $key => $value)
{
if ('type' === $value)
{
if (isset($properties['example'][$key]) && ComponentbuilderHelper::checkString($properties['example'][$key]))
{
$this->fieldTypes[$id] = $properties['example'][$key];
break;
}
}
}
}
}
// if not found
if (!isset($this->fieldTypes[$id]) && $name = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'name'))
{
$this->fieldTypes[$id] = ComponentbuilderHelper::safeString($name);
}
}
// return the type
if (isset($this->fieldTypes[$id]))
{
return $this->fieldTypes[$id];
}
return false;
}
/**
* Update the local item
*
@ -1380,6 +1627,19 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
// get by code name (since there should only be one)
$getter = 'alias';
break;
case 'snippet':
// get by snippet (since there should only be one snippet like that)
if ($retry == 2)
{
$getter = array('name', 'snippet', 'url', 'type', 'heading');
}
else
{
// get by id name..
$getter = array('id', 'name', 'snippet', 'url', 'type', 'heading');
$retryAgain = 2;
}
break;
case 'custom_code':
// get by code to insure its correctly matched
$getter = array('code', 'comment_type', 'target');

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_components.php
@ -81,6 +81,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
protected $layoutIds = array();
protected $customCodeIds = array();
protected $customCodeM = array();
protected $fieldTypes = array();
protected $isRepeatable = array();
/**
* Method to build the export package
@ -390,7 +392,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
$values = json_decode($values, true);
}
// make sure we have an array
if (('custom_code' !== $table && 'component' !== $key) && (!ComponentbuilderHelper::checkArray($values) || !isset($values[$key]) || !ComponentbuilderHelper::checkArray($values[$key])))
if (('custom_code' !== $table && 'component' !== $key && 'custom_get' !== $key) && (!ComponentbuilderHelper::checkArray($values) || !isset($values[$key]) || !ComponentbuilderHelper::checkArray($values[$key])))
{
return false;
}
@ -409,6 +411,10 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
$query->where('a.component IN (' . implode(',',$values) . ')');
}
elseif ('custom_get' === $key)
{
$query->where('a.id IN (' . implode(',',$values) . ')');
}
else
{
$query->where('a.id IN (' . implode(',',$values[$key]) . ')');
@ -438,6 +444,15 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
$searchArray = array('php_view','php_jview','php_jview_display','php_document','js_document','css_document','css');
}
// reset the global array
if ('template' === $table)
{
$this->templateIds = array();
}
elseif ('layout' === $table)
{
$this->layoutIds = array();
}
// start loading the data
if (!isset($this->smartExport[$table]))
{
@ -445,20 +460,20 @@ class ComponentbuilderModelJoomla_components extends JModelList
}
foreach ($items as $nr => &$item)
{
// set the data per id only once
if (isset($this->smartExport[$table][$item->id]))
{
continue;
}
// load to global object
$this->smartExport[$table][$item->id] = $item;
// set the custom code ID's
$this->setCustomCodeIds($item, $table);
// actions to take if table is admin_view
if ('admin_view' === $table)
{
// add fields
$this->setData($user, $db, 'field', $item->addfields, 'field');
// add admin views
if (isset($item->addlinked_views))
{
// $this->setData($user, $db, 'admin_view', $item->addlinked_views, 'adminview'); TODO infinite loop error
}
// admin icon
$this->moveIt(array('image' => array($item->icon)), 'image');
// admin icon_add
@ -471,6 +486,27 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
// add field types
$this->setData($user, $db, 'fieldtype', array('fieldtype' => array($item->fieldtype)), 'fieldtype');
// we must add a repeatable field subfields
if ($this->checkRepeatable($item->fieldtype))
{
$fields = ComponentbuilderHelper::getBetween(json_decode($item->xml), 'fields="', '"');
$fieldsSets = array();
if (strpos($fields, ',') !== false)
{
// multiple fields
$fieldsSets = (array) explode(',', $fields);
}
elseif (is_numeric($fields))
{
// single field
$fieldsSets[] = (int) $fields;
}
// get fields
if (ComponentbuilderHelper::checkArray($fieldsSets))
{
$this->setData($user, $db, 'field', array('field' => $fieldsSets), 'field');
}
}
}
// actions to take if table is site_view and custom_admin_view
if ('site_view' === $table || 'custom_admin_view' === $table)
@ -480,28 +516,115 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add search array templates and layouts
foreach ($searchArray as $scripter)
{
if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1)
if (isset($item->{'add_'.$scripter}) && $item->{'add_'.$scripter} == 1)
{
$this->getTemplateLayout($view->$scripter, $db);
$this->getTemplateLayout($item->$scripter, $db);
}
}
// add dynamic gets
$this->setData($user, $db, 'dynamic_get', array('dynamic_get' => array($item->main_get)), 'dynamic_get');
$this->setData($user, $db, 'dynamic_get', array('dynamic_get' => $item->custom_get), 'dynamic_get');
$this->setData($user, $db, 'dynamic_get', $item->custom_get, 'custom_get');
if ('custom_admin_view' === $table && isset($item->icon))
{
// view icon
$this->moveIt(array('image' => array($item->icon)), 'image');
}
// add snippets
$this->setData($user, $db, 'snippet', array('snippet' => array($item->snippet)), 'snippet');
}
// set the custom code ID's
$this->setCustomCodeIds($item, $table);
// load to global object
$this->smartExport[$table][$item->id] = $item;
// actions to take if table is template and layout
if ('layout' === $table || 'template' === $table)
{
// search for templates & layouts
$this->getTemplateLayout(base64_decode($item->$table), $db, $user);
// add search array templates and layouts
if (isset($item->add_php_view) && $item->add_php_view == 1)
{
$this->getTemplateLayout($item->php_view, $db, $user);
}
// add dynamic gets
$this->setData($user, $db, 'dynamic_get', array('dynamic_get' => $item->dynamic_get), 'dynamic_get');
// add snippets
$this->setData($user, $db, 'snippet', array('snippet' => array($item->snippet)), 'snippet');
}
}
}
}
}
/**
* Check if a field is a repeatable field
*
* @param string $typeID The type ID
*
* @return bool true on success
*
*/
protected function checkRepeatable($typeID)
{
if(isset($this->isRepeatable[$typeID]))
{
return true;
}
elseif (ComponentbuilderHelper::checkArray($this->isRepeatable))
{
return false;
}
elseif ($type = $this->getFieldType($typeID))
{
if ('repeatable' === $type)
{
$this->isRepeatable[$typeID] = true;
return true;
}
}
return false;
}
/**
* Get the field type
*
* @param string $id The field type id
*
* @return string field type
*
*/
protected function getFieldType($id)
{
if (!isset($this->fieldTypes[$id]))
{
$properties = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'properties');
if (ComponentbuilderHelper::checkJson($properties))
{
$properties = json_decode($properties, true);
if (isset($properties['name']) && ComponentbuilderHelper::checkArray($properties['name']))
{
foreach ($properties['name'] as $key => $value)
{
if ('type' === $value)
{
if (isset($properties['example'][$key]) && ComponentbuilderHelper::checkString($properties['example'][$key]))
{
$this->fieldTypes[$id] = $properties['example'][$key];
break;
}
}
}
}
}
// if not found
if (!isset($this->fieldTypes[$id]) && $name = ComponentbuilderHelper::getVar('fieldtype', $id, 'id', 'name'))
{
$this->fieldTypes[$id] = ComponentbuilderHelper::safeString($name);
}
}
// return the type
if (isset($this->fieldTypes[$id]))
{
return $this->fieldTypes[$id];
}
return false;
}
/**
* Set Template and Layout Data
@ -511,7 +634,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
* @return void
*
*/
protected function getTemplateLayout($default, &$db)
protected function getTemplateLayout($default, &$db, $user = false)
{
// set the Template data
$temp1 = ComponentbuilderHelper::getAllBetween($default, "\$this->loadTemplate('","')");
@ -592,6 +715,20 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->getTemplateLayout($get, $db);
}
}
// Set the Data
if ($user)
{
// add templates
if (ComponentbuilderHelper::checkArray($this->templateIds))
{
$this->setData($user, $db, 'template', array('template' => $this->templateIds), 'template');
}
// add layouts
if (ComponentbuilderHelper::checkArray($this->layoutIds))
{
$this->setData($user, $db, 'layout', array('layout' => $this->layoutIds), 'layout');
}
}
}
/**

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.php

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage submitbutton.js

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage edit.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_body.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_footer.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_body.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_foot.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_head.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_toolbar.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 108 of this MVC
@build 24th March, 2017
@version @update number 109 of this MVC
@build 31st March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage submitbutton.js

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage edit.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage view.html.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_batch_body.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_batch_footer.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_body.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_foot.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_head.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage default_toolbar.php

View File

@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 266 of this MVC
@build 30th March, 2017
@version @update number 297 of this MVC
@build 31st March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage view.html.php

View File

@ -1361,7 +1361,7 @@ class com_componentbuilderInstallerScript
$admin_view->type_title = 'Componentbuilder Admin_view';
$admin_view->type_alias = 'com_componentbuilder.admin_view';
$admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems_after_all":"php_getitems_after_all","php_after_publish":"php_after_publish","description":"description","add_fadein":"add_fadein","php_allowedit":"php_allowedit","icon":"icon","source":"source","icon_add":"icon_add","icon_category":"icon_category","php_save":"php_save","php_batchmove":"php_batchmove","php_after_delete":"php_after_delete","php_getitems":"php_getitems","php_getlistquery":"php_getlistquery","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_import":"php_import","php_document":"php_document","type":"type","sql":"sql","php_getitem":"php_getitem","php_import_display":"php_import_display","not_required":"not_required","php_import_save":"php_import_save","add_css_view":"add_css_view","add_php_getitem":"add_php_getitem","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_save":"add_php_save","javascript_view_file":"javascript_view_file","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_file":"add_javascript_views_file","add_php_batchmove":"add_php_batchmove","javascript_views_file":"javascript_views_file","add_php_before_publish":"add_php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","add_php_after_publish":"add_php_after_publish","javascript_views_footer":"javascript_views_footer","add_php_before_delete":"add_php_before_delete","add_custom_button":"add_custom_button","add_php_after_delete":"add_php_after_delete","add_php_document":"add_php_document","php_controller":"php_controller","add_sql":"add_sql","php_controller_list":"php_controller_list","php_model":"php_model","php_model_list":"php_model_list","add_custom_import":"add_custom_import","add_php_ajax":"add_php_ajax","html_import_view":"html_import_view","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems_after_all":"php_getitems_after_all","php_after_publish":"php_after_publish","description":"description","add_fadein":"add_fadein","php_allowedit":"php_allowedit","icon":"icon","source":"source","icon_add":"icon_add","icon_category":"icon_category","php_save":"php_save","php_batchmove":"php_batchmove","php_after_delete":"php_after_delete","php_getitems":"php_getitems","php_getlistquery":"php_getlistquery","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_import":"php_import","php_document":"php_document","type":"type","sql":"sql","php_getitem":"php_getitem","php_import_display":"php_import_display","not_required":"not_required","php_import_save":"php_import_save","add_css_view":"add_css_view","add_php_getitem":"add_php_getitem","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_save":"add_php_save","javascript_view_file":"javascript_view_file","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_file":"add_javascript_views_file","add_php_batchmove":"add_php_batchmove","javascript_views_file":"javascript_views_file","add_php_before_publish":"add_php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","add_php_after_publish":"add_php_after_publish","javascript_views_footer":"javascript_views_footer","add_php_before_delete":"add_php_before_delete","add_custom_button":"add_custom_button","add_php_after_delete":"add_php_after_delete","add_php_document":"add_php_document","php_controller":"php_controller","add_sql":"add_sql","php_model":"php_model","php_controller_list":"php_controller_list","php_model_list":"php_model_list","add_custom_import":"add_custom_import","add_php_ajax":"add_php_ajax","html_import_view":"html_import_view","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext"}}';
$admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","source","type","not_required","add_css_view","add_php_getitem","add_php_getitems","add_css_views","add_php_getitems_after_all","add_php_getlistquery","add_javascript_view_file","add_php_save","add_php_postsavehook","add_javascript_view_footer","add_php_allowedit","add_php_batchcopy","add_javascript_views_file","add_php_batchmove","add_php_before_publish","add_javascript_views_footer","add_php_after_publish","add_php_before_delete","add_custom_button","add_php_after_delete","add_php_document","add_sql","add_custom_import","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
@ -1574,7 +1574,7 @@ class com_componentbuilderInstallerScript
$admin_view->type_title = 'Componentbuilder Admin_view';
$admin_view->type_alias = 'com_componentbuilder.admin_view';
$admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems_after_all":"php_getitems_after_all","php_after_publish":"php_after_publish","description":"description","add_fadein":"add_fadein","php_allowedit":"php_allowedit","icon":"icon","source":"source","icon_add":"icon_add","icon_category":"icon_category","php_save":"php_save","php_batchmove":"php_batchmove","php_after_delete":"php_after_delete","php_getitems":"php_getitems","php_getlistquery":"php_getlistquery","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_import":"php_import","php_document":"php_document","type":"type","sql":"sql","php_getitem":"php_getitem","php_import_display":"php_import_display","not_required":"not_required","php_import_save":"php_import_save","add_css_view":"add_css_view","add_php_getitem":"add_php_getitem","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_save":"add_php_save","javascript_view_file":"javascript_view_file","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_file":"add_javascript_views_file","add_php_batchmove":"add_php_batchmove","javascript_views_file":"javascript_views_file","add_php_before_publish":"add_php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","add_php_after_publish":"add_php_after_publish","javascript_views_footer":"javascript_views_footer","add_php_before_delete":"add_php_before_delete","add_custom_button":"add_custom_button","add_php_after_delete":"add_php_after_delete","add_php_document":"add_php_document","php_controller":"php_controller","add_sql":"add_sql","php_controller_list":"php_controller_list","php_model":"php_model","php_model_list":"php_model_list","add_custom_import":"add_custom_import","add_php_ajax":"add_php_ajax","html_import_view":"html_import_view","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems_after_all":"php_getitems_after_all","php_after_publish":"php_after_publish","description":"description","add_fadein":"add_fadein","php_allowedit":"php_allowedit","icon":"icon","source":"source","icon_add":"icon_add","icon_category":"icon_category","php_save":"php_save","php_batchmove":"php_batchmove","php_after_delete":"php_after_delete","php_getitems":"php_getitems","php_getlistquery":"php_getlistquery","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_import":"php_import","php_document":"php_document","type":"type","sql":"sql","php_getitem":"php_getitem","php_import_display":"php_import_display","not_required":"not_required","php_import_save":"php_import_save","add_css_view":"add_css_view","add_php_getitem":"add_php_getitem","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_save":"add_php_save","javascript_view_file":"javascript_view_file","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_file":"add_javascript_views_file","add_php_batchmove":"add_php_batchmove","javascript_views_file":"javascript_views_file","add_php_before_publish":"add_php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","add_php_after_publish":"add_php_after_publish","javascript_views_footer":"javascript_views_footer","add_php_before_delete":"add_php_before_delete","add_custom_button":"add_custom_button","add_php_after_delete":"add_php_after_delete","add_php_document":"add_php_document","php_controller":"php_controller","add_sql":"add_sql","php_model":"php_model","php_controller_list":"php_controller_list","php_model_list":"php_model_list","add_custom_import":"add_custom_import","add_php_ajax":"add_php_ajax","html_import_view":"html_import_view","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext"}}';
$admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","source","type","not_required","add_css_view","add_php_getitem","add_php_getitems","add_css_views","add_php_getitems_after_all","add_php_getlistquery","add_javascript_view_file","add_php_save","add_php_postsavehook","add_javascript_view_footer","add_php_allowedit","add_php_batchcopy","add_javascript_views_file","add_php_batchmove","add_php_before_publish","add_javascript_views_footer","add_php_after_publish","add_php_before_delete","add_custom_button","add_php_after_delete","add_php_document","add_sql","add_custom_import","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';