Resolved gh-345 by adding whole new mysql table selection options in the admin view, under the mySql tab. Fixed the folder & file loader. Fixed the Update of custom files, so even the custom code and external code placholders will work in external files. Update all tables in JCB to use InnoDB Engine, utf8md4 Charset and utf8mb4_unicode_ci Collation.

This commit is contained in:
2018-09-25 22:02:48 +02:00
parent 6ad253be44
commit 73d383c755
79 changed files with 3139 additions and 1576 deletions

View File

@ -31,8 +31,8 @@ class ComponentbuilderModelAdmin_views extends JModelList
'a.name_single','name_single',
'a.short_description','short_description',
'a.add_fadein','add_fadein',
'a.add_custom_import','add_custom_import',
'a.type','type',
'a.add_custom_import','add_custom_import',
'a.add_custom_button','add_custom_button',
'a.add_php_ajax','add_php_ajax'
);
@ -67,12 +67,12 @@ class ComponentbuilderModelAdmin_views extends JModelList
$add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein');
$this->setState('filter.add_fadein', $add_fadein);
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
$this->setState('filter.add_custom_import', $add_custom_import);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
$this->setState('filter.add_custom_import', $add_custom_import);
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
$this->setState('filter.add_custom_button', $add_custom_button);
@ -136,10 +136,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
{
// convert add_fadein
$item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein');
// convert add_custom_import
$item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import');
// convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// convert add_custom_import
$item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import');
// convert add_custom_button
$item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button');
// convert add_php_ajax
@ -172,19 +172,6 @@ class ComponentbuilderModelAdmin_views extends JModelList
return $add_fadeinArray[$value];
}
}
// Array of add_custom_import language strings
if ($name === 'add_custom_import')
{
$add_custom_importArray = array(
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_custom_importArray[$value]) && ComponentbuilderHelper::checkString($add_custom_importArray[$value]))
{
return $add_custom_importArray[$value];
}
}
// Array of type language strings
if ($name === 'type')
{
@ -198,6 +185,19 @@ class ComponentbuilderModelAdmin_views extends JModelList
return $typeArray[$value];
}
}
// Array of add_custom_import language strings
if ($name === 'add_custom_import')
{
$add_custom_importArray = array(
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_YES',
0 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_NO'
);
// Now check if value is found in this array
if (isset($add_custom_importArray[$value]) && ComponentbuilderHelper::checkString($add_custom_importArray[$value]))
{
return $add_custom_importArray[$value];
}
}
// Array of add_custom_button language strings
if ($name === 'add_custom_button')
{
@ -282,7 +282,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.name_list LIKE '.$search.' OR a.type LIKE '.$search.')');
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.name_list LIKE '.$search.')');
}
}
@ -291,16 +291,16 @@ class ComponentbuilderModelAdmin_views extends JModelList
{
$query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein)));
}
// Filter by Add_custom_import.
if ($add_custom_import = $this->getState('filter.add_custom_import'))
{
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
}
// Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type)));
}
// Filter by Add_custom_import.
if ($add_custom_import = $this->getState('filter.add_custom_import'))
{
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
}
// Filter by Add_custom_button.
if ($add_custom_button = $this->getState('filter.add_custom_button'))
{
@ -376,76 +376,76 @@ class ComponentbuilderModelAdmin_views extends JModelList
continue;
}
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getform
$item->php_getform = base64_decode($item->php_getform);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd);
// decode php_save
$item->php_save = base64_decode($item->php_save);
// decode php_getform
$item->php_getform = base64_decode($item->php_getform);
// decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save);
// decode php_document
$item->php_document = base64_decode($item->php_document);
// decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish);
// decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete);
// decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view);
// decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems);
// decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save);
// decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit);
// decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove);
// decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish);
// decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_model
$item->php_model = base64_decode($item->php_model);
// decode sql
$item->sql = base64_decode($item->sql);
// 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 sql
$item->sql = base64_decode($item->sql);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display);
// decode php_import
$item->php_import = base64_decode($item->php_import);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext);
// unset the values we don't want exported.
@ -512,8 +512,8 @@ class ComponentbuilderModelAdmin_views extends JModelList
$id .= ':' . $this->getState('filter.name_single');
$id .= ':' . $this->getState('filter.short_description');
$id .= ':' . $this->getState('filter.add_fadein');
$id .= ':' . $this->getState('filter.add_custom_import');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.add_custom_import');
$id .= ':' . $this->getState('filter.add_custom_button');
$id .= ':' . $this->getState('filter.add_php_ajax');