From aae9ffb6e02eb67acd774ead8aa05e986b635194 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 27 Feb 2020 23:05:28 +0200 Subject: [PATCH] Added the option to use advance field modeling to store data in other tables in combination with the field being set to not be stored in the view/table in the admin view. Fixed gh-487 yet once again to allow the datalength to be stored everytime, and not get dropped. Imporved the JCB way of conditions field behavior. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/c_Fields.php | 8 +-- admin/helpers/compiler/e_Interpretation.php | 46 ++++++++++------- admin/models/forms/admin_view.js | 51 ++++++++++++------- admin/models/forms/admin_view.xml | 2 +- admin/models/forms/class_method.js | 51 ++++++++++++------- admin/models/forms/class_property.js | 51 ++++++++++++------- admin/models/forms/custom_admin_view.xml | 2 +- admin/models/forms/custom_code.js | 51 ++++++++++++------- admin/models/forms/custom_code.xml | 2 +- admin/models/forms/dynamic_get.js | 51 ++++++++++++------- admin/models/forms/dynamic_get.xml | 2 +- admin/models/forms/field.js | 51 ++++++++++++------- admin/models/forms/field.xml | 2 +- admin/models/forms/fieldtype.js | 51 ++++++++++++------- admin/models/forms/fieldtype.xml | 2 +- admin/models/forms/help_document.js | 51 ++++++++++++------- admin/models/forms/help_document.xml | 2 +- admin/models/forms/joomla_component.js | 51 ++++++++++++------- admin/models/forms/joomla_component.xml | 2 +- admin/models/forms/joomla_module.js | 51 ++++++++++++------- admin/models/forms/joomla_module.xml | 2 +- admin/models/forms/joomla_plugin.js | 51 ++++++++++++------- admin/models/forms/joomla_plugin.xml | 2 +- admin/models/forms/layout.xml | 2 +- admin/models/forms/library.js | 51 ++++++++++++------- admin/models/forms/library.xml | 2 +- admin/models/forms/server.js | 51 ++++++++++++------- admin/models/forms/server.xml | 2 +- admin/models/forms/site_view.xml | 2 +- admin/models/forms/template.xml | 2 +- admin/sql/install.mysql.utf8.sql | 23 ++++----- admin/views/admin_views/tmpl/default.php | 4 +- .../views/admins_custom_tabs/tmpl/default.php | 4 +- admin/views/admins_fields/tmpl/default.php | 4 +- .../admins_fields_conditions/tmpl/default.php | 4 +- .../admins_fields_relations/tmpl/default.php | 4 +- admin/views/class_extendings/tmpl/default.php | 4 +- admin/views/class_methods/tmpl/default.php | 4 +- admin/views/class_properties/tmpl/default.php | 4 +- .../components_admin_views/tmpl/default.php | 4 +- .../views/components_config/tmpl/default.php | 4 +- .../tmpl/default.php | 4 +- .../tmpl/default.php | 4 +- .../components_dashboard/tmpl/default.php | 4 +- .../components_files_folders/tmpl/default.php | 4 +- .../views/components_modules/tmpl/default.php | 4 +- .../components_mysql_tweaks/tmpl/default.php | 4 +- .../components_placeholders/tmpl/default.php | 4 +- .../views/components_plugins/tmpl/default.php | 4 +- .../components_site_views/tmpl/default.php | 4 +- .../views/components_updates/tmpl/default.php | 4 +- .../views/custom_admin_views/tmpl/default.php | 4 +- admin/views/custom_codes/tmpl/default.php | 4 +- admin/views/dynamic_gets/tmpl/default.php | 4 +- admin/views/fields/tmpl/default.php | 4 +- admin/views/fieldtypes/tmpl/default.php | 4 +- admin/views/help_documents/tmpl/default.php | 4 +- .../views/joomla_components/tmpl/default.php | 4 +- admin/views/joomla_modules/tmpl/default.php | 4 +- .../tmpl/default.php | 4 +- .../joomla_modules_updates/tmpl/default.php | 4 +- .../joomla_plugin_groups/tmpl/default.php | 4 +- admin/views/joomla_plugins/tmpl/default.php | 4 +- .../tmpl/default.php | 4 +- .../joomla_plugins_updates/tmpl/default.php | 4 +- .../language_translations/tmpl/default.php | 4 +- admin/views/languages/tmpl/default.php | 4 +- admin/views/layouts/tmpl/default.php | 4 +- admin/views/libraries/tmpl/default.php | 4 +- admin/views/libraries_config/tmpl/default.php | 4 +- .../tmpl/default.php | 4 +- admin/views/placeholders/tmpl/default.php | 4 +- admin/views/servers/tmpl/default.php | 4 +- admin/views/site_views/tmpl/default.php | 4 +- admin/views/snippet_types/tmpl/default.php | 4 +- admin/views/snippets/tmpl/default.php | 4 +- admin/views/templates/tmpl/default.php | 4 +- admin/views/validation_rules/tmpl/default.php | 4 +- componentbuilder.xml | 2 +- script.php | 24 ++++----- 82 files changed, 598 insertions(+), 394 deletions(-) diff --git a/README.md b/README.md index 225f0e156..17a1baab6 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th February, 2020 ++ *Last Build*: 27th February, 2020 + *Version*: 2.10.11 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **278479** ++ *Line count*: **278669** + *Field count*: **1505** + *File count*: **1756** + *Folder count*: **278** diff --git a/admin/README.txt b/admin/README.txt index 225f0e156..17a1baab6 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th February, 2020 ++ *Last Build*: 27th February, 2020 + *Version*: 2.10.11 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **278479** ++ *Line count*: **278669** + *Field count*: **1505** + *File count*: **1756** + *Folder count*: **278** diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 9754adf52..e258d4a4a 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2987,7 +2987,9 @@ class Fields extends Structure $this->checkboxBuilder[$view_name_single][] = $name; } // setup checkboxes and other json items for this view - if ($dbSwitch && (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag')) + // if we have advance field modeling and the field is not being set in the DB + // this could mean that field is modeled manually (so we add it) + if (($dbSwitch || $field['settings']->store == 6) && (($typeName === 'subform' || $typeName === 'checkboxes' || $multiple || $field['settings']->store != 0) && $typeName != 'tag')) { $subformJsonSwitch = true; switch ($field['settings']->store) @@ -3069,8 +3071,8 @@ class Fields extends Structure } } - // subform house keeping - if ('subform' === $typeName) + // subform house keeping (only if not advance modeling) + if ('subform' === $typeName && $field['settings']->store != 6) { // the values must revert to array $this->jsonItemBuilderArray[$view_name_single][] = $name; diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 081d353de..0bee15833 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -10091,29 +10091,41 @@ class Interpretation extends Fields // add the needed validation to file if (isset($this->validationFixBuilder[$viewName]) && ComponentbuilderHelper::checkArray($this->validationFixBuilder[$viewName])) { - $validation .= PHP_EOL . "// update required fields"; - $validation .= PHP_EOL . "function updateFieldRequired(name,status)"; - $validation .= PHP_EOL . "{"; - $validation .= PHP_EOL . $this->_t(1) . "var not_required = jQuery('#jform_not_required').val();"; - $validation .= PHP_EOL . PHP_EOL . $this->_t(1) . "if(status == 1)"; - $validation .= PHP_EOL . $this->_t(1) . "{"; - $validation .= PHP_EOL . $this->_t(2) . "if (isSet(not_required) && not_required != 0)"; + $validation .= PHP_EOL . "// update fields required"; + $validation .= PHP_EOL . "function updateFieldRequired(name, status) {"; + $validation .= PHP_EOL . $this->_t(1) . "// check if not_required exist"; + $validation .= PHP_EOL . $this->_t(1) . "if (jQuery('#jform_not_required').length > 0) {"; + $validation .= PHP_EOL . $this->_t(2) . "var not_required = jQuery('#jform_not_required').val().split(\",\");"; + $validation .= PHP_EOL . PHP_EOL . $this->_t(2) . "if(status == 1)"; $validation .= PHP_EOL . $this->_t(2) . "{"; - $validation .= PHP_EOL . $this->_t(3) . "not_required = not_required+','+name;"; + $validation .= PHP_EOL . $this->_t(3) . "not_required.push(name);"; $validation .= PHP_EOL . $this->_t(2) . "}"; $validation .= PHP_EOL . $this->_t(2) . "else"; $validation .= PHP_EOL . $this->_t(2) . "{"; - $validation .= PHP_EOL . $this->_t(3) . "not_required = ','+name;"; + $validation .= PHP_EOL . $this->_t(3) . "not_required = removeFieldFromNotRequired(not_required, name);"; $validation .= PHP_EOL . $this->_t(2) . "}"; + $validation .= PHP_EOL . PHP_EOL . $this->_t(2) . "jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());"; $validation .= PHP_EOL . $this->_t(1) . "}"; - $validation .= PHP_EOL . $this->_t(1) . "else"; - $validation .= PHP_EOL . $this->_t(1) . "{"; - $validation .= PHP_EOL . $this->_t(2) . "if (isSet(not_required) && not_required != 0)"; - $validation .= PHP_EOL . $this->_t(2) . "{"; - $validation .= PHP_EOL . $this->_t(3) . "not_required = not_required.replace(','+name,'');"; - $validation .= PHP_EOL . $this->_t(2) . "}"; - $validation .= PHP_EOL . $this->_t(1) . "}"; - $validation .= PHP_EOL . PHP_EOL . $this->_t(1) . "jQuery('#jform_not_required').val(not_required);"; + $validation .= PHP_EOL . "}" . PHP_EOL; + $validation .= PHP_EOL . "// remove field from not_required"; + $validation .= PHP_EOL . "function removeFieldFromNotRequired(array, what) {"; + $validation .= PHP_EOL . $this->_t(1) . "return array.filter(function(element){"; + $validation .= PHP_EOL . $this->_t(2) . "return element !== what;"; + $validation .= PHP_EOL . $this->_t(1) . "});"; + $validation .= PHP_EOL . "}" . PHP_EOL; + $validation .= PHP_EOL . "// fix not required array"; + $validation .= PHP_EOL . "function fixNotRequiredArray(array) {"; + $validation .= PHP_EOL . $this->_t(1) . "var seen = {};"; + $validation .= PHP_EOL . $this->_t(1) . "return removeEmptyFromNotRequiredArray(array).filter(function(item) {"; + $validation .= PHP_EOL . $this->_t(2) . "return seen.hasOwnProperty(item) ? false : (seen[item] = true);"; + $validation .= PHP_EOL . $this->_t(1) . "});"; + $validation .= PHP_EOL . "}" . PHP_EOL; + $validation .= PHP_EOL . "// remove empty from not_required array"; + $validation .= PHP_EOL . "function removeEmptyFromNotRequiredArray(array) {"; + $validation .= PHP_EOL . $this->_t(1) . "return array.filter(function (el) {"; + $validation .= PHP_EOL . $this->_t(2) . "// remove ( 一_一) as well - lol"; + $validation .= PHP_EOL . $this->_t(2) . "return (el.length > 0 && '一_一' !== el);"; + $validation .= PHP_EOL . $this->_t(1) . "});"; $validation .= PHP_EOL . "}" . PHP_EOL; } // set the isSet function diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index c5f3d17b7..c1825ffcf 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -755,31 +755,46 @@ function vvvvwac(add_custom_button_vvvvwac) } } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); +// update fields required +function updateFieldRequired(name, status) { + // check if not_required exist + if (jQuery('#jform_not_required').length > 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 184b247d8..8664ad8fb 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -379,7 +379,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/class_property.js b/admin/models/forms/class_property.js index cec32bd50..38a6ac934 100644 --- a/admin/models/forms/class_property.js +++ b/admin/models/forms/class_property.js @@ -74,31 +74,46 @@ function extension_type_vvvvwcf_SomeFunc(extension_type_vvvvwcf) return false; } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); +// update fields required +function updateFieldRequired(name, status) { + // check if not_required exist + if (jQuery('#jform_not_required').length > 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/custom_admin_view.xml b/admin/models/forms/custom_admin_view.xml index 2ff62340c..724a996ce 100644 --- a/admin/models/forms/custom_admin_view.xml +++ b/admin/models/forms/custom_admin_view.xml @@ -310,7 +310,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/custom_code.xml b/admin/models/forms/custom_code.xml index 9f5c1f643..2d5d35ba3 100644 --- a/admin/models/forms/custom_code.xml +++ b/admin/models/forms/custom_code.xml @@ -158,7 +158,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index 0507a49ff..45d7fd914 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -682,7 +682,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml index abea536b7..88f9c95c0 100644 --- a/admin/models/forms/field.xml +++ b/admin/models/forms/field.xml @@ -469,7 +469,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml index c82eb4951..acdbb6afd 100644 --- a/admin/models/forms/fieldtype.xml +++ b/admin/models/forms/fieldtype.xml @@ -295,7 +295,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/help_document.xml b/admin/models/forms/help_document.xml index f6a9bf71e..d2b7969a3 100644 --- a/admin/models/forms/help_document.xml +++ b/admin/models/forms/help_document.xml @@ -165,7 +165,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index c3d5b5c97..638aff063 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -768,7 +768,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/joomla_module.xml b/admin/models/forms/joomla_module.xml index 1d6a70f6b..b290b7193 100644 --- a/admin/models/forms/joomla_module.xml +++ b/admin/models/forms/joomla_module.xml @@ -303,7 +303,7 @@ diff --git a/admin/models/forms/joomla_plugin.js b/admin/models/forms/joomla_plugin.js index 2ccd96661..d6007d990 100644 --- a/admin/models/forms/joomla_plugin.js +++ b/admin/models/forms/joomla_plugin.js @@ -612,31 +612,46 @@ function vvvvvyu(addreadme_vvvvvyu) } } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); +// update fields required +function updateFieldRequired(name, status) { + // check if not_required exist + if (jQuery('#jform_not_required').length > 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/joomla_plugin.xml b/admin/models/forms/joomla_plugin.xml index 73e214f4f..1ec8662e8 100644 --- a/admin/models/forms/joomla_plugin.xml +++ b/admin/models/forms/joomla_plugin.xml @@ -378,7 +378,7 @@ 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/library.xml b/admin/models/forms/library.xml index 54414605a..028c7002b 100644 --- a/admin/models/forms/library.xml +++ b/admin/models/forms/library.xml @@ -173,7 +173,7 @@ diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index 41bd932b7..0e8d5c6a4 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -539,31 +539,46 @@ function authentication_vvvvwei_SomeFunc(authentication_vvvvwei) return false; } -// update required fields -function updateFieldRequired(name,status) -{ - var not_required = jQuery('#jform_not_required').val(); +// update fields required +function updateFieldRequired(name, status) { + // check if not_required exist + if (jQuery('#jform_not_required').length > 0) { + var not_required = jQuery('#jform_not_required').val().split(","); - if(status == 1) - { - if (isSet(not_required) && not_required != 0) + if(status == 1) { - not_required = not_required+','+name; + not_required.push(name); } else { - not_required = ','+name; + not_required = removeFieldFromNotRequired(not_required, name); } - } - else - { - if (isSet(not_required) && not_required != 0) - { - not_required = not_required.replace(','+name,''); - } - } - jQuery('#jform_not_required').val(not_required); + jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString()); + } +} + +// remove field from not_required +function removeFieldFromNotRequired(array, what) { + return array.filter(function(element){ + return element !== what; + }); +} + +// fix not required array +function fixNotRequiredArray(array) { + var seen = {}; + return removeEmptyFromNotRequiredArray(array).filter(function(item) { + return seen.hasOwnProperty(item) ? false : (seen[item] = true); + }); +} + +// remove empty from not_required array +function removeEmptyFromNotRequiredArray(array) { + return array.filter(function (el) { + // remove ( 一_一) as well - lol + return (el.length > 0 && '一_一' !== el); + }); } // the isSet function diff --git a/admin/models/forms/server.xml b/admin/models/forms/server.xml index e97b76fba..c88ab6d62 100644 --- a/admin/models/forms/server.xml +++ b/admin/models/forms/server.xml @@ -126,7 +126,7 @@ diff --git a/admin/models/forms/site_view.xml b/admin/models/forms/site_view.xml index c52ecb0b0..7a8c6fae1 100644 --- a/admin/models/forms/site_view.xml +++ b/admin/models/forms/site_view.xml @@ -249,7 +249,7 @@ \"', 1, '2015-04-29 14:00:56', '2015-08-25 21:15:22', 1, '', 45, '0d6970af-b361-4f65-84f6-0eb0c5f09bad'), (196, '', '', '', '', '', '', '', '', '', 64, '', 'VARCHAR', '', '', '', 'Mobile Phone', 'NOT NULL', '', 23, '\"\"', 1, '2015-04-07 22:12:58', '2016-03-28 14:00:02', 2, '', 7, '65933a19-243a-48b2-aae9-34e2da710051'), (199, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2017-10-25 20:26:02', 8, '', 4, '5d3d34dd-4876-4c6a-86ab-b4e162f22c08'), -(203, '', '', '', '', '', '', '', '', '', 1, '', 'INT', '', '', '', 'Not Required', 'NOT NULL', '', 9, '\"\"', 1, '2015-05-08 16:19:16', '2015-08-25 21:15:22', 1, '', 19, 'da5e6901-6958-40e5-a4f5-6822d6fe57ac'), +(203, '', '', '', '', '', '', '', '', '', 1, '', 'INT', '', '', '', 'Not Required', 'NOT NULL', '', 9, '\"\"', 1, '2015-05-08 16:19:16', '2020-02-27 20:17:33', 13, '', 19, 'da5e6901-6958-40e5-a4f5-6822d6fe57ac'), (280, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Website', 'NOT NULL', '', 27, '\"\"', 1, '2015-04-08 00:36:16', '2018-07-08 00:11:05', 2, '', 105, '6c3a6983-d1bf-4e5e-9e99-deea00b0cefd'), (682, '', '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Add More', 'NOT NULL', '', 17, '\"\"', 1, '2015-08-05 01:18:20', '2018-03-30 09:30:45', 4, '', 196, 'a66389aa-2323-4f44-8c23-ff44969639be'), (1011, '', '', '', '', '', '', '', 'Other', '0000-00-00', '', '', 'DATE', '', '', '', 'Date of Birth', 'NOT NULL', '', 1, '\"\"', 1, '2015-12-07 01:47:32', '2018-08-03 09:56:07', 4, '', 649, 'cb2bdf20-8800-407b-a4f6-250152a0bdfb'); @@ -2415,7 +2409,8 @@ INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, (2, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/js\\/bootstrap.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/css\\/bootstrap.min.css\",\"type\":\"2\"}}', 2, '', 1, '2017-11-25 16:17:36', '2018-05-02 23:29:05', 11, '', 2), (3, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/js\\/uikit.min.js\",\"type\":\"2\"},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/js\\/uikit-icons.min.js\",\"type\":\"2\"},\"addurls4\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/css\\/uikit.min.css\",\"type\":\"2\"}}', 3, '', 1, '2017-11-25 21:47:40', '2018-09-19 14:22:09', 10, '', 3), (4, '{}', '{\"addfolders0\":{\"folder\":\"file_icon_vectors\",\"path\":\"\\/media\\/vector\",\"rename\":\"1\"}}', '{}', 7, '', 1, '2019-10-03 09:24:30', '2019-10-03 09:25:39', 2, '', 4), -(5, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/css\\/grapes.min.css\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.css\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/grapes.min.js\",\"type\":2},\"addurls3\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.js\",\"type\":2}}', 8, '', 1, '2020-02-10 21:34:33', '2020-02-12 13:57:06', 4, '', 5); +(5, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/css\\/grapes.min.css\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/grapes.min.js\",\"type\":2}}', 8, '', 1, '2020-02-10 21:34:33', '2020-02-18 21:12:35', 5, '', 5), +(6, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.css\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.js\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/static.filestackapi.com\\/v3\\/filestack-0.1.10.js\",\"type\":2}}', 9, '', 1, '2020-02-18 21:13:16', '2020-02-18 21:14:11', 2, '', 5); CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( diff --git a/admin/views/admin_views/tmpl/default.php b/admin/views/admin_views/tmpl/default.php index a46765abd..81bc87541 100644 --- a/admin/views/admin_views/tmpl/default.php +++ b/admin/views/admin_views/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/admins_custom_tabs/tmpl/default.php b/admin/views/admins_custom_tabs/tmpl/default.php index f70695f4a..cbe0eb57a 100644 --- a/admin/views/admins_custom_tabs/tmpl/default.php +++ b/admin/views/admins_custom_tabs/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/admins_fields/tmpl/default.php b/admin/views/admins_fields/tmpl/default.php index 650dc6726..61a8b37dd 100644 --- a/admin/views/admins_fields/tmpl/default.php +++ b/admin/views/admins_fields/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/admins_fields_conditions/tmpl/default.php b/admin/views/admins_fields_conditions/tmpl/default.php index f36a01d71..b04fdb62a 100644 --- a/admin/views/admins_fields_conditions/tmpl/default.php +++ b/admin/views/admins_fields_conditions/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/admins_fields_relations/tmpl/default.php b/admin/views/admins_fields_relations/tmpl/default.php index bf5cc3400..457b13264 100644 --- a/admin/views/admins_fields_relations/tmpl/default.php +++ b/admin/views/admins_fields_relations/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/class_extendings/tmpl/default.php b/admin/views/class_extendings/tmpl/default.php index 5a82e3896..cf196e3d1 100644 --- a/admin/views/class_extendings/tmpl/default.php +++ b/admin/views/class_extendings/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/class_methods/tmpl/default.php b/admin/views/class_methods/tmpl/default.php index cf2e2d721..95414bd34 100644 --- a/admin/views/class_methods/tmpl/default.php +++ b/admin/views/class_methods/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/class_properties/tmpl/default.php b/admin/views/class_properties/tmpl/default.php index 3d3c28711..42f995783 100644 --- a/admin/views/class_properties/tmpl/default.php +++ b/admin/views/class_properties/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_admin_views/tmpl/default.php b/admin/views/components_admin_views/tmpl/default.php index 92e940970..266415998 100644 --- a/admin/views/components_admin_views/tmpl/default.php +++ b/admin/views/components_admin_views/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_config/tmpl/default.php b/admin/views/components_config/tmpl/default.php index 9275949fb..8edd52a0c 100644 --- a/admin/views/components_config/tmpl/default.php +++ b/admin/views/components_config/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_custom_admin_menus/tmpl/default.php b/admin/views/components_custom_admin_menus/tmpl/default.php index 59efdfaf4..ea35f2709 100644 --- a/admin/views/components_custom_admin_menus/tmpl/default.php +++ b/admin/views/components_custom_admin_menus/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_custom_admin_views/tmpl/default.php b/admin/views/components_custom_admin_views/tmpl/default.php index bc15affc3..0fde9afd2 100644 --- a/admin/views/components_custom_admin_views/tmpl/default.php +++ b/admin/views/components_custom_admin_views/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_dashboard/tmpl/default.php b/admin/views/components_dashboard/tmpl/default.php index 2a4e58ff8..da24d5cdc 100644 --- a/admin/views/components_dashboard/tmpl/default.php +++ b/admin/views/components_dashboard/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_files_folders/tmpl/default.php b/admin/views/components_files_folders/tmpl/default.php index c24c8a0c6..1e6cb2418 100644 --- a/admin/views/components_files_folders/tmpl/default.php +++ b/admin/views/components_files_folders/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_modules/tmpl/default.php b/admin/views/components_modules/tmpl/default.php index 2c29f859a..f048d2109 100644 --- a/admin/views/components_modules/tmpl/default.php +++ b/admin/views/components_modules/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_mysql_tweaks/tmpl/default.php b/admin/views/components_mysql_tweaks/tmpl/default.php index ba1737baa..62f392248 100644 --- a/admin/views/components_mysql_tweaks/tmpl/default.php +++ b/admin/views/components_mysql_tweaks/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_placeholders/tmpl/default.php b/admin/views/components_placeholders/tmpl/default.php index c1dcae0e8..3612ef1b1 100644 --- a/admin/views/components_placeholders/tmpl/default.php +++ b/admin/views/components_placeholders/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_plugins/tmpl/default.php b/admin/views/components_plugins/tmpl/default.php index a4dcd693b..f79c12620 100644 --- a/admin/views/components_plugins/tmpl/default.php +++ b/admin/views/components_plugins/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_site_views/tmpl/default.php b/admin/views/components_site_views/tmpl/default.php index 077150658..f42d87bca 100644 --- a/admin/views/components_site_views/tmpl/default.php +++ b/admin/views/components_site_views/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/components_updates/tmpl/default.php b/admin/views/components_updates/tmpl/default.php index 7ea429079..193c6b494 100644 --- a/admin/views/components_updates/tmpl/default.php +++ b/admin/views/components_updates/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/custom_admin_views/tmpl/default.php b/admin/views/custom_admin_views/tmpl/default.php index e74f6e754..e20fde714 100644 --- a/admin/views/custom_admin_views/tmpl/default.php +++ b/admin/views/custom_admin_views/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/custom_codes/tmpl/default.php b/admin/views/custom_codes/tmpl/default.php index a2ea3c285..f9214e15e 100644 --- a/admin/views/custom_codes/tmpl/default.php +++ b/admin/views/custom_codes/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/dynamic_gets/tmpl/default.php b/admin/views/dynamic_gets/tmpl/default.php index 99e8c8d63..78a79ace1 100644 --- a/admin/views/dynamic_gets/tmpl/default.php +++ b/admin/views/dynamic_gets/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/fields/tmpl/default.php b/admin/views/fields/tmpl/default.php index 8687281a7..008cd39f0 100644 --- a/admin/views/fields/tmpl/default.php +++ b/admin/views/fields/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/fieldtypes/tmpl/default.php b/admin/views/fieldtypes/tmpl/default.php index 3a492e23d..876c961ce 100644 --- a/admin/views/fieldtypes/tmpl/default.php +++ b/admin/views/fieldtypes/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/help_documents/tmpl/default.php b/admin/views/help_documents/tmpl/default.php index 218b94a08..9c79c938f 100644 --- a/admin/views/help_documents/tmpl/default.php +++ b/admin/views/help_documents/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index a05fe3cc7..ecc519339 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_modules/tmpl/default.php b/admin/views/joomla_modules/tmpl/default.php index dd9582052..4100065a7 100644 --- a/admin/views/joomla_modules/tmpl/default.php +++ b/admin/views/joomla_modules/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_modules_files_folders_urls/tmpl/default.php b/admin/views/joomla_modules_files_folders_urls/tmpl/default.php index 6cf98b3a8..76bf426a9 100644 --- a/admin/views/joomla_modules_files_folders_urls/tmpl/default.php +++ b/admin/views/joomla_modules_files_folders_urls/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_modules_updates/tmpl/default.php b/admin/views/joomla_modules_updates/tmpl/default.php index 773ea33b0..6e2d69df4 100644 --- a/admin/views/joomla_modules_updates/tmpl/default.php +++ b/admin/views/joomla_modules_updates/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_plugin_groups/tmpl/default.php b/admin/views/joomla_plugin_groups/tmpl/default.php index b6f5bb304..cb53414e7 100644 --- a/admin/views/joomla_plugin_groups/tmpl/default.php +++ b/admin/views/joomla_plugin_groups/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_plugins/tmpl/default.php b/admin/views/joomla_plugins/tmpl/default.php index eee613380..67e1e8eac 100644 --- a/admin/views/joomla_plugins/tmpl/default.php +++ b/admin/views/joomla_plugins/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php index 69e909642..de710474c 100644 --- a/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php +++ b/admin/views/joomla_plugins_files_folders_urls/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/joomla_plugins_updates/tmpl/default.php b/admin/views/joomla_plugins_updates/tmpl/default.php index 90d6b4887..65d63db9b 100644 --- a/admin/views/joomla_plugins_updates/tmpl/default.php +++ b/admin/views/joomla_plugins_updates/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/language_translations/tmpl/default.php b/admin/views/language_translations/tmpl/default.php index 2270eeee6..2270d80e2 100644 --- a/admin/views/language_translations/tmpl/default.php +++ b/admin/views/language_translations/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/languages/tmpl/default.php b/admin/views/languages/tmpl/default.php index 29454e513..f7bc1f9a7 100644 --- a/admin/views/languages/tmpl/default.php +++ b/admin/views/languages/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/layouts/tmpl/default.php b/admin/views/layouts/tmpl/default.php index 835635544..71c5e14b5 100644 --- a/admin/views/layouts/tmpl/default.php +++ b/admin/views/layouts/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/libraries/tmpl/default.php b/admin/views/libraries/tmpl/default.php index f534989be..b68deb7d5 100644 --- a/admin/views/libraries/tmpl/default.php +++ b/admin/views/libraries/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/libraries_config/tmpl/default.php b/admin/views/libraries_config/tmpl/default.php index be211c97f..a0903a080 100644 --- a/admin/views/libraries_config/tmpl/default.php +++ b/admin/views/libraries_config/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/libraries_files_folders_urls/tmpl/default.php b/admin/views/libraries_files_folders_urls/tmpl/default.php index 48f530d2e..33e903268 100644 --- a/admin/views/libraries_files_folders_urls/tmpl/default.php +++ b/admin/views/libraries_files_folders_urls/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/placeholders/tmpl/default.php b/admin/views/placeholders/tmpl/default.php index 95246e912..242a4833c 100644 --- a/admin/views/placeholders/tmpl/default.php +++ b/admin/views/placeholders/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/servers/tmpl/default.php b/admin/views/servers/tmpl/default.php index d6157e504..cbb2a15bd 100644 --- a/admin/views/servers/tmpl/default.php +++ b/admin/views/servers/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/site_views/tmpl/default.php b/admin/views/site_views/tmpl/default.php index c2a6bff84..a9090f66c 100644 --- a/admin/views/site_views/tmpl/default.php +++ b/admin/views/site_views/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/snippet_types/tmpl/default.php b/admin/views/snippet_types/tmpl/default.php index ab5c6c4f4..820ed9c04 100644 --- a/admin/views/snippet_types/tmpl/default.php +++ b/admin/views/snippet_types/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/snippets/tmpl/default.php b/admin/views/snippets/tmpl/default.php index e6b2062e7..937eb60f0 100644 --- a/admin/views/snippets/tmpl/default.php +++ b/admin/views/snippets/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/templates/tmpl/default.php b/admin/views/templates/tmpl/default.php index 45fbdb5b5..30a5e9324 100644 --- a/admin/views/templates/tmpl/default.php +++ b/admin/views/templates/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/admin/views/validation_rules/tmpl/default.php b/admin/views/validation_rules/tmpl/default.php index 1c203d7b2..cfe4c2d20 100644 --- a/admin/views/validation_rules/tmpl/default.php +++ b/admin/views/validation_rules/tmpl/default.php @@ -75,8 +75,8 @@ if ($this->saveOrder) $this->loadTemplate('batch_body') ); ?> - - + + diff --git a/componentbuilder.xml b/componentbuilder.xml index b2b1e6da5..eb0c3abdf 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 17th February, 2020 + 27th February, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/script.php b/script.php index e23df6136..a6e132946 100644 --- a/script.php +++ b/script.php @@ -5976,7 +5976,7 @@ class com_componentbuilderInstallerScript $custom_admin_view->table = '{"special": {"dbtable": "#__componentbuilder_custom_admin_view","key": "id","type": "Custom_admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $custom_admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "css_document","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":"name","description":"description","main_get":"main_get","add_php_jview_display":"add_php_jview_display","css_document":"css_document","css":"css","js_document":"js_document","javascript_file":"javascript_file","codename":"codename","default":"default","snippet":"snippet","icon":"icon","add_php_jview":"add_php_jview","context":"context","not_required":"not_required","add_js_document":"add_js_document","custom_get":"custom_get","add_javascript_file":"add_javascript_file","php_ajaxmethod":"php_ajaxmethod","add_css_document":"add_css_document","add_php_document":"add_php_document","add_css":"add_css","add_php_view":"add_php_view","add_php_ajax":"add_php_ajax","libraries":"libraries","dynamic_get":"dynamic_get","php_document":"php_document","php_view":"php_view","add_custom_button":"add_custom_button","php_jview_display":"php_jview_display","php_jview":"php_jview","php_controller":"php_controller","guid":"guid","php_model":"php_model"}}'; $custom_admin_view->router = 'ComponentbuilderHelperRoute::getCustom_admin_viewRoute'; - $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_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","main_get","add_php_jview_display","snippet","add_php_jview","not_required","add_js_document","add_javascript_file","add_css_document","add_php_document","add_css","add_php_view","add_php_ajax","dynamic_get","add_custom_button"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_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","main_get","add_php_jview_display","snippet","add_php_jview","add_js_document","add_javascript_file","add_css_document","add_php_document","add_css","add_php_view","add_php_ajax","dynamic_get","add_custom_button"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $custom_admin_view_Inserted = $db->insertObject('#__content_types', $custom_admin_view); @@ -5988,7 +5988,7 @@ class com_componentbuilderInstallerScript $site_view->table = '{"special": {"dbtable": "#__componentbuilder_site_view","key": "id","type": "Site_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $site_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "js_document","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":"name","description":"description","main_get":"main_get","add_php_jview_display":"add_php_jview_display","add_php_document":"add_php_document","add_php_view":"add_php_view","js_document":"js_document","codename":"codename","javascript_file":"javascript_file","context":"context","not_required":"not_required","default":"default","snippet":"snippet","add_php_jview":"add_php_jview","custom_get":"custom_get","css_document":"css_document","add_javascript_file":"add_javascript_file","css":"css","add_js_document":"add_js_document","php_ajaxmethod":"php_ajaxmethod","add_css_document":"add_css_document","libraries":"libraries","add_css":"add_css","dynamic_get":"dynamic_get","add_php_ajax":"add_php_ajax","add_custom_button":"add_custom_button","php_document":"php_document","button_position":"button_position","php_view":"php_view","php_jview_display":"php_jview_display","php_jview":"php_jview","php_controller":"php_controller","guid":"guid","php_model":"php_model"}}'; $site_view->router = 'ComponentbuilderHelperRoute::getSite_viewRoute'; - $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_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","main_get","add_php_jview_display","add_php_document","add_php_view","not_required","snippet","add_php_jview","add_javascript_file","add_js_document","add_css_document","add_css","dynamic_get","add_php_ajax","add_custom_button","button_position"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_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","main_get","add_php_jview_display","add_php_document","add_php_view","snippet","add_php_jview","add_javascript_file","add_js_document","add_css_document","add_css","dynamic_get","add_php_ajax","add_custom_button","button_position"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $site_view_Inserted = $db->insertObject('#__content_types', $site_view); @@ -6024,7 +6024,7 @@ class com_componentbuilderInstallerScript $dynamic_get->table = '{"special": {"dbtable": "#__componentbuilder_dynamic_get","key": "id","type": "Dynamic_get","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $dynamic_get->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_before_getitems","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": {"name":"name","main_source":"main_source","gettype":"gettype","php_router_parse":"php_router_parse","php_before_getitems":"php_before_getitems","php_after_getitems":"php_after_getitems","php_after_getitem":"php_after_getitem","php_getlistquery":"php_getlistquery","view_selection":"view_selection","db_table_main":"db_table_main","php_custom_get":"php_custom_get","plugin_events":"plugin_events","db_selection":"db_selection","php_calculation":"php_calculation","php_before_getitem":"php_before_getitem","view_table_main":"view_table_main","select_all":"select_all","add_php_before_getitem":"add_php_before_getitem","getcustom":"getcustom","add_php_after_getitem":"add_php_after_getitem","pagination":"pagination","add_php_getlistquery":"add_php_getlistquery","not_required":"not_required","add_php_before_getitems":"add_php_before_getitems","add_php_after_getitems":"add_php_after_getitems","add_php_router_parse":"add_php_router_parse","addcalculation":"addcalculation","guid":"guid"}}'; $dynamic_get->router = 'ComponentbuilderHelperRoute::getDynamic_getRoute'; - $dynamic_get->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/dynamic_get.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","main_source","gettype","view_table_main","select_all","add_php_before_getitem","add_php_after_getitem","pagination","add_php_getlistquery","not_required","add_php_before_getitems","add_php_after_getitems","add_php_router_parse"],"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"},{"sourceColumn": "view_table_main","targetTable": "#__componentbuilder_admin_view","targetColumn": "id","displayColumn": "system_name"}]}'; + $dynamic_get->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/dynamic_get.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","main_source","gettype","view_table_main","select_all","add_php_before_getitem","add_php_after_getitem","pagination","add_php_getlistquery","add_php_before_getitems","add_php_after_getitems","add_php_router_parse"],"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"},{"sourceColumn": "view_table_main","targetTable": "#__componentbuilder_admin_view","targetColumn": "id","displayColumn": "system_name"}]}'; // Set the object into the content types table. $dynamic_get_Inserted = $db->insertObject('#__content_types', $dynamic_get); @@ -6036,7 +6036,7 @@ class com_componentbuilderInstallerScript $custom_code->table = '{"special": {"dbtable": "#__componentbuilder_custom_code","key": "id","type": "Custom_code","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $custom_code->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "component","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "code","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": {"component":"component","path":"path","target":"target","type":"type","comment_type":"comment_type","not_required":"not_required","function_name":"function_name","system_name":"system_name","code":"code","hashendtarget":"hashendtarget","to_line":"to_line","from_line":"from_line","hashtarget":"hashtarget"}}'; $custom_code->router = 'ComponentbuilderHelperRoute::getCustom_codeRoute'; - $custom_code->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_code.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","component","target","type","comment_type","not_required"],"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"},{"sourceColumn": "component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; + $custom_code->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_code.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","component","target","type","comment_type"],"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"},{"sourceColumn": "component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; // Set the object into the content types table. $custom_code_Inserted = $db->insertObject('#__content_types', $custom_code); @@ -6084,7 +6084,7 @@ class com_componentbuilderInstallerScript $library->table = '{"special": {"dbtable": "#__componentbuilder_library","key": "id","type": "Library","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $library->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","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": {"name":"name","target":"target","how":"how","type":"type","description":"description","not_required":"not_required","libraries":"libraries","php_setdocument":"php_setdocument","guid":"guid"}}'; $library->router = 'ComponentbuilderHelperRoute::getLibraryRoute'; - $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.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","target","how","type","not_required"],"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"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; + $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.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","target","how","type"],"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"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $library_Inserted = $db->insertObject('#__content_types', $library); @@ -6192,7 +6192,7 @@ class com_componentbuilderInstallerScript $server->table = '{"special": {"dbtable": "#__componentbuilder_server","key": "id","type": "Server","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $server->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","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": {"name":"name","protocol":"protocol","not_required":"not_required","signature":"signature","private_key":"private_key","secret":"secret","password":"password","private":"private","authentication":"authentication","path":"path","port":"port","host":"host","username":"username"}}'; $server->router = 'ComponentbuilderHelperRoute::getServerRoute'; - $server->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/server.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","protocol","not_required","authentication"],"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"}]}'; + $server->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/server.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","protocol","authentication"],"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"}]}'; // Set the object into the content types table. $server_Inserted = $db->insertObject('#__content_types', $server); @@ -7469,7 +7469,7 @@ class com_componentbuilderInstallerScript $custom_admin_view->table = '{"special": {"dbtable": "#__componentbuilder_custom_admin_view","key": "id","type": "Custom_admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $custom_admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "css_document","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":"name","description":"description","main_get":"main_get","add_php_jview_display":"add_php_jview_display","css_document":"css_document","css":"css","js_document":"js_document","javascript_file":"javascript_file","codename":"codename","default":"default","snippet":"snippet","icon":"icon","add_php_jview":"add_php_jview","context":"context","not_required":"not_required","add_js_document":"add_js_document","custom_get":"custom_get","add_javascript_file":"add_javascript_file","php_ajaxmethod":"php_ajaxmethod","add_css_document":"add_css_document","add_php_document":"add_php_document","add_css":"add_css","add_php_view":"add_php_view","add_php_ajax":"add_php_ajax","libraries":"libraries","dynamic_get":"dynamic_get","php_document":"php_document","php_view":"php_view","add_custom_button":"add_custom_button","php_jview_display":"php_jview_display","php_jview":"php_jview","php_controller":"php_controller","guid":"guid","php_model":"php_model"}}'; $custom_admin_view->router = 'ComponentbuilderHelperRoute::getCustom_admin_viewRoute'; - $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_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","main_get","add_php_jview_display","snippet","add_php_jview","not_required","add_js_document","add_javascript_file","add_css_document","add_php_document","add_css","add_php_view","add_php_ajax","dynamic_get","add_custom_button"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $custom_admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_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","main_get","add_php_jview_display","snippet","add_php_jview","add_js_document","add_javascript_file","add_css_document","add_php_document","add_css","add_php_view","add_php_ajax","dynamic_get","add_custom_button"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Check if custom_admin_view type is already in content_type DB. $custom_admin_view_id = null; @@ -7498,7 +7498,7 @@ class com_componentbuilderInstallerScript $site_view->table = '{"special": {"dbtable": "#__componentbuilder_site_view","key": "id","type": "Site_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $site_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "js_document","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":"name","description":"description","main_get":"main_get","add_php_jview_display":"add_php_jview_display","add_php_document":"add_php_document","add_php_view":"add_php_view","js_document":"js_document","codename":"codename","javascript_file":"javascript_file","context":"context","not_required":"not_required","default":"default","snippet":"snippet","add_php_jview":"add_php_jview","custom_get":"custom_get","css_document":"css_document","add_javascript_file":"add_javascript_file","css":"css","add_js_document":"add_js_document","php_ajaxmethod":"php_ajaxmethod","add_css_document":"add_css_document","libraries":"libraries","add_css":"add_css","dynamic_get":"dynamic_get","add_php_ajax":"add_php_ajax","add_custom_button":"add_custom_button","php_document":"php_document","button_position":"button_position","php_view":"php_view","php_jview_display":"php_jview_display","php_jview":"php_jview","php_controller":"php_controller","guid":"guid","php_model":"php_model"}}'; $site_view->router = 'ComponentbuilderHelperRoute::getSite_viewRoute'; - $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_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","main_get","add_php_jview_display","add_php_document","add_php_view","not_required","snippet","add_php_jview","add_javascript_file","add_js_document","add_css_document","add_css","dynamic_get","add_php_ajax","add_custom_button","button_position"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; + $site_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/site_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","main_get","add_php_jview_display","add_php_document","add_php_view","snippet","add_php_jview","add_javascript_file","add_js_document","add_css_document","add_css","dynamic_get","add_php_ajax","add_custom_button","button_position"],"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"},{"sourceColumn": "main_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "snippet","targetTable": "#__componentbuilder_snippet","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "custom_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "dynamic_get","targetTable": "#__componentbuilder_dynamic_get","targetColumn": "id","displayColumn": "name"}]}'; // Check if site_view type is already in content_type DB. $site_view_id = null; @@ -7585,7 +7585,7 @@ class com_componentbuilderInstallerScript $dynamic_get->table = '{"special": {"dbtable": "#__componentbuilder_dynamic_get","key": "id","type": "Dynamic_get","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $dynamic_get->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_before_getitems","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": {"name":"name","main_source":"main_source","gettype":"gettype","php_router_parse":"php_router_parse","php_before_getitems":"php_before_getitems","php_after_getitems":"php_after_getitems","php_after_getitem":"php_after_getitem","php_getlistquery":"php_getlistquery","view_selection":"view_selection","db_table_main":"db_table_main","php_custom_get":"php_custom_get","plugin_events":"plugin_events","db_selection":"db_selection","php_calculation":"php_calculation","php_before_getitem":"php_before_getitem","view_table_main":"view_table_main","select_all":"select_all","add_php_before_getitem":"add_php_before_getitem","getcustom":"getcustom","add_php_after_getitem":"add_php_after_getitem","pagination":"pagination","add_php_getlistquery":"add_php_getlistquery","not_required":"not_required","add_php_before_getitems":"add_php_before_getitems","add_php_after_getitems":"add_php_after_getitems","add_php_router_parse":"add_php_router_parse","addcalculation":"addcalculation","guid":"guid"}}'; $dynamic_get->router = 'ComponentbuilderHelperRoute::getDynamic_getRoute'; - $dynamic_get->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/dynamic_get.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","main_source","gettype","view_table_main","select_all","add_php_before_getitem","add_php_after_getitem","pagination","add_php_getlistquery","not_required","add_php_before_getitems","add_php_after_getitems","add_php_router_parse"],"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"},{"sourceColumn": "view_table_main","targetTable": "#__componentbuilder_admin_view","targetColumn": "id","displayColumn": "system_name"}]}'; + $dynamic_get->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/dynamic_get.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","main_source","gettype","view_table_main","select_all","add_php_before_getitem","add_php_after_getitem","pagination","add_php_getlistquery","add_php_before_getitems","add_php_after_getitems","add_php_router_parse"],"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"},{"sourceColumn": "view_table_main","targetTable": "#__componentbuilder_admin_view","targetColumn": "id","displayColumn": "system_name"}]}'; // Check if dynamic_get type is already in content_type DB. $dynamic_get_id = null; @@ -7614,7 +7614,7 @@ class com_componentbuilderInstallerScript $custom_code->table = '{"special": {"dbtable": "#__componentbuilder_custom_code","key": "id","type": "Custom_code","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $custom_code->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "component","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "code","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": {"component":"component","path":"path","target":"target","type":"type","comment_type":"comment_type","not_required":"not_required","function_name":"function_name","system_name":"system_name","code":"code","hashendtarget":"hashendtarget","to_line":"to_line","from_line":"from_line","hashtarget":"hashtarget"}}'; $custom_code->router = 'ComponentbuilderHelperRoute::getCustom_codeRoute'; - $custom_code->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_code.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","component","target","type","comment_type","not_required"],"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"},{"sourceColumn": "component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; + $custom_code->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/custom_code.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","component","target","type","comment_type"],"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"},{"sourceColumn": "component","targetTable": "#__componentbuilder_joomla_component","targetColumn": "id","displayColumn": "system_name"}]}'; // Check if custom_code type is already in content_type DB. $custom_code_id = null; @@ -7730,7 +7730,7 @@ class com_componentbuilderInstallerScript $library->table = '{"special": {"dbtable": "#__componentbuilder_library","key": "id","type": "Library","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $library->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","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": {"name":"name","target":"target","how":"how","type":"type","description":"description","not_required":"not_required","libraries":"libraries","php_setdocument":"php_setdocument","guid":"guid"}}'; $library->router = 'ComponentbuilderHelperRoute::getLibraryRoute'; - $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.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","target","how","type","not_required"],"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"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; + $library->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/library.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","target","how","type"],"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"},{"sourceColumn": "libraries","targetTable": "#__componentbuilder_library","targetColumn": "id","displayColumn": "name"}]}'; // Check if library type is already in content_type DB. $library_id = null; @@ -7991,7 +7991,7 @@ class com_componentbuilderInstallerScript $server->table = '{"special": {"dbtable": "#__componentbuilder_server","key": "id","type": "Server","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $server->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","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": {"name":"name","protocol":"protocol","not_required":"not_required","signature":"signature","private_key":"private_key","secret":"secret","password":"password","private":"private","authentication":"authentication","path":"path","port":"port","host":"host","username":"username"}}'; $server->router = 'ComponentbuilderHelperRoute::getServerRoute'; - $server->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/server.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","protocol","not_required","authentication"],"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"}]}'; + $server->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/server.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","protocol","authentication"],"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"}]}'; // Check if server type is already in content_type DB. $server_id = null;