From f2b2228dd7798ba7e7c99eded2a8e04b25539cba Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 29 May 2020 03:01:07 +0200 Subject: [PATCH 01/14] Fixed gh-565 by removing the old PHPExcel_IOFactory and adding the new. Updated the subform layout for verious subforms in JCB for beter display. Change the helper category naming conventions for better integration with Joomla fields. gh-561 --- README.md | 6 +- admin/README.txt | 6 +- .../joomla_3/Helper_category_view.php | 4 +- admin/helpers/compiler/e_Interpretation.php | 16 +-- .../en-GB/en-GB.com_componentbuilder.ini | 3 + admin/layouts/repeatablejcb.php | 95 ++++++++++++++++++ admin/layouts/sectionjcb.php | 62 ++++++++++++ .../fields/adminlistvieworderfields.php | 99 +++++++++++++++++++ .../models/fields/linkedviewsorderfields.php | 99 +++++++++++++++++++ admin/models/forms/admin_custom_tabs.xml | 2 +- admin/models/forms/admin_fields.xml | 2 +- .../models/forms/admin_fields_conditions.xml | 2 +- admin/models/forms/admin_fields_relations.xml | 2 +- admin/models/forms/component_admin_views.xml | 2 +- .../forms/component_custom_admin_views.xml | 2 +- admin/models/forms/component_site_views.xml | 2 +- admin/models/import_language_translations.php | 10 +- admin/sql/install.mysql.utf8.sql | 2 +- admin/views/admin_custom_tabs/view.html.php | 8 +- admin/views/admin_fields/view.html.php | 7 +- .../admin_fields_conditions/view.html.php | 8 +- .../admin_fields_relations/view.html.php | 6 ++ admin/views/admin_view/view.html.php | 7 +- admin/views/class_extends/view.html.php | 7 +- admin/views/class_method/view.html.php | 7 +- admin/views/class_property/view.html.php | 7 +- admin/views/compiler/view.html.php | 28 +++++- .../views/component_admin_views/view.html.php | 8 +- .../view.html.php | 8 +- .../view.html.php | 8 +- admin/views/component_dashboard/view.html.php | 7 +- .../views/component_site_views/view.html.php | 8 +- admin/views/custom_admin_view/view.html.php | 7 +- admin/views/custom_code/view.html.php | 7 +- admin/views/dynamic_get/view.html.php | 7 +- admin/views/field/view.html.php | 7 +- .../import_joomla_components/view.html.php | 7 +- admin/views/joomla_component/view.html.php | 7 +- admin/views/joomla_module/view.html.php | 7 +- admin/views/joomla_plugin/view.html.php | 7 +- admin/views/layout/view.html.php | 7 +- admin/views/library/view.html.php | 7 +- admin/views/placeholder/view.html.php | 7 +- admin/views/site_view/view.html.php | 7 +- admin/views/template/view.html.php | 7 +- admin/views/validation_rule/view.html.php | 7 +- componentbuilder.xml | 2 +- site/helpers/category.php | 8 +- .../{categoryfields.php => categoryfield.php} | 4 +- ...ryfieldtypes.php => categoryfieldtype.php} | 4 +- 50 files changed, 571 insertions(+), 85 deletions(-) create mode 100644 admin/layouts/repeatablejcb.php create mode 100644 admin/layouts/sectionjcb.php create mode 100644 admin/models/fields/adminlistvieworderfields.php create mode 100644 admin/models/fields/linkedviewsorderfields.php rename site/helpers/{categoryfields.php => categoryfield.php} (86%) rename site/helpers/{categoryfieldtypes.php => categoryfieldtype.php} (85%) diff --git a/README.md b/README.md index 4c365b20b..b60e50426 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,13 @@ 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*: 25th May, 2020 ++ *Last Build*: 29th May, 2020 + *Version*: 2.11.2 + *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*: **282168** ++ *Line count*: **282456** + *Field count*: **1522** -+ *File count*: **1783** ++ *File count*: **1785** + *Folder count*: **295** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 4c365b20b..b60e50426 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,13 +144,13 @@ 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*: 25th May, 2020 ++ *Last Build*: 29th May, 2020 + *Version*: 2.11.2 + *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*: **282168** ++ *Line count*: **282456** + *Field count*: **1522** -+ *File count*: **1783** ++ *File count*: **1785** + *Folder count*: **295** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/Helper_category_view.php b/admin/compiler/joomla_3/Helper_category_view.php index e02ee4b00..46524c443 100644 --- a/admin/compiler/joomla_3/Helper_category_view.php +++ b/admin/compiler/joomla_3/Helper_category_view.php @@ -20,7 +20,7 @@ defined('_JEXEC') or die('Restricted access'); /** * ###Component### ###View### Component Category Tree */ -class ###Component######Views###Categories extends JCategories +class ###Component######View###Categories extends JCategories { /** * Class constructor @@ -31,7 +31,7 @@ class ###Component######Views###Categories extends JCategories public function __construct($options = array()) { $options['table'] = '#__###component###_###view###'; - $options['extension'] = 'com_###component###.###views###'; + $options['extension'] = 'com_###component###.###view###'; parent::__construct($options); } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 8072c1fc0..f687a3b93 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -17461,24 +17461,24 @@ class Interpretation extends Fields } // load the category helper details in not already loaded if (!isset( - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'view' . $this->hhh] )) { // lets also set the category helper for this view - $target = array('site' => 'category' . $viewName_list); + $target = array('site' => 'category' . $otherView); $this->buildDynamique($target, 'category'); // insure the file gets updated - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'view' . $this->hhh] = $otherView; - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'View' . $this->hhh] = ucfirst($otherView); - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'views' . $this->hhh] = $otherViews; - $this->fileContentDynamic['category' . $otherViews][$this->hhh + $this->fileContentDynamic['category' . $otherView][$this->hhh . 'Views' . $this->hhh] = ucfirst($otherViews); // set script to global helper file @@ -17486,12 +17486,12 @@ class Interpretation extends Fields $includeHelper[] = "\n//" . $this->setLine(__LINE__) . "Insure this view category file is loaded."; $includeHelper[] = "\$classname = '" . ucfirst($component) - . ucfirst($viewName_list) . "Categories';"; + . ucfirst($otherView) . "Categories';"; $includeHelper[] = "if (!class_exists(\$classname))"; $includeHelper[] = "{"; $includeHelper[] = $this->_t(1) . "\$path = JPATH_SITE . '/components/com_" . $component - . "/helpers/category" . $viewName_list . ".php';"; + . "/helpers/category" . $otherView . ".php';"; $includeHelper[] = $this->_t(1) . "if (is_file(\$path))"; $includeHelper[] = $this->_t(1) . "{"; $includeHelper[] = $this->_t(2) . "include_once \$path;"; diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index de38067e9..f30834db6 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -7,6 +7,7 @@ COM_COMPONENTBUILDER_ACCESS="Access" COM_COMPONENTBUILDER_ACCESS_BULK_TOOLS="Access Bulk Tools" COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_ADD="Add" COM_COMPONENTBUILDER_ADD_ACCESS="Add Access" COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging." COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" @@ -7717,6 +7718,7 @@ COM_COMPONENTBUILDER_MODEL_AFTER_MODELLING="Model (after modelling)" COM_COMPONENTBUILDER_MODEL_BEFORE_MODELLING="Model (before modelling)" COM_COMPONENTBUILDER_MODULE="Module" COM_COMPONENTBUILDER_MODULES="Modules" +COM_COMPONENTBUILDER_MOVE="Move" COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)" @@ -7913,6 +7915,7 @@ COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_REFRESH="Refresh" COM_COMPONENTBUILDER_RELEASED_THIS="released this" +COM_COMPONENTBUILDER_REMOVE="Remove" COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list." diff --git a/admin/layouts/repeatablejcb.php b/admin/layouts/repeatablejcb.php new file mode 100644 index 000000000..53d215068 --- /dev/null +++ b/admin/layouts/repeatablejcb.php @@ -0,0 +1,95 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $tmpl The Empty form for template + * @var array $forms Array of JForm instances for render the rows + * @var bool $multiple The multiple state for the form field + * @var int $min Count of minimum repeating in multiple mode + * @var int $max Count of maximum repeating in multiple mode + * @var string $fieldname The field name + * @var string $control The forms control + * @var string $label The field label + * @var string $description The field description + * @var array $buttons Array of the buttons that will be rendered + * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset + */ +extract($displayData); + +// Add script +JHtml::_('jquery.ui', array('core', 'sortable')); +JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); + +$sublayout = 'sectionjcb'; + +?> +
+
+
+ + +
+
+ + + +
+
+ + $form) : + echo JLayoutHelper::render( + $sublayout, + array( + 'form' => $form, + 'basegroup' => $fieldname, + 'group' => $fieldname . $k, + 'buttons' => $buttons, + 'unique_subform_id' => $unique_subform_id + ) + ); + endforeach; + ?> + + + +
+
+
diff --git a/admin/layouts/sectionjcb.php b/admin/layouts/sectionjcb.php new file mode 100644 index 000000000..bbcc14347 --- /dev/null +++ b/admin/layouts/sectionjcb.php @@ -0,0 +1,62 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $form The form instance for render the section + * @var string $basegroup The base group name + * @var string $group Current group name + * @var array $buttons Array of the buttons that will be rendered + */ +extract($displayData); + +?> +
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + +
+ getGroup('') as $field) : ?> +
+
+ renderField(); ?> +
+
+ +
+
diff --git a/admin/models/fields/adminlistvieworderfields.php b/admin/models/fields/adminlistvieworderfields.php new file mode 100644 index 000000000..710ddf443 --- /dev/null +++ b/admin/models/fields/adminlistvieworderfields.php @@ -0,0 +1,99 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Adminlistvieworderfields Form Field class for the Componentbuilder component + */ +class JFormFieldAdminlistvieworderfields extends JFormFieldList +{ + /** + * The adminlistvieworderfields field type. + * + * @var string + */ + public $type = 'adminlistvieworderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // load the db object + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // admin list view and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 3) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[] = (int) $addField['field']; + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = JHtml::_('select.option', -1, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = JHtml::_('select.option', -2, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = JHtml::_('select.option', -3, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/models/fields/linkedviewsorderfields.php b/admin/models/fields/linkedviewsorderfields.php new file mode 100644 index 000000000..d9194bb41 --- /dev/null +++ b/admin/models/fields/linkedviewsorderfields.php @@ -0,0 +1,99 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the list field type +jimport('joomla.form.helper'); +JFormHelper::loadFieldClass('list'); + +/** + * Linkedviewsorderfields Form Field class for the Componentbuilder component + */ +class JFormFieldLinkedviewsorderfields extends JFormFieldList +{ + /** + * The linkedviewsorderfields field type. + * + * @var string + */ + public $type = 'linkedviewsorderfields'; + + /** + * Method to get a list of options for a list input. + * + * @return array An array of JHtml options. + */ + protected function getOptions() + { + // load the db object + $db = JFactory::getDBO(); + // get the input from url + $jinput = JFactory::getApplication()->input; + // get the id + $adminView = $jinput->getInt('id', 0); + // check if we have an admin view + if (is_numeric($adminView) && $adminView >= 1) + { + // get all the fields linked to the admin view + if ($addFields = ComponentbuilderHelper::getVar('admin_fields', (int) $adminView, 'admin_view', 'addfields')) + { + if (ComponentbuilderHelper::checkJson($addFields)) + { + $addFields = json_decode($addFields, true); + if (ComponentbuilderHelper::checkArray($addFields)) + { + foreach($addFields as $addField) + { + // linked list views and ordering + if (isset($addField['field']) && isset($addField['list']) && ($addField['list'] == 1 || $addField['list'] == 4) + && isset($addField['sort']) && $addField['sort']) + { + $fieldIds[] = (int) $addField['field']; + } + } + } + } + } + // filter by fields linked + if (ComponentbuilderHelper::checkArray($fieldIds)) + { + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type'))); + $query->from($db->quoteName('#__componentbuilder_field', 'a')); + $query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype'); + $query->where($db->quoteName('a.published') . ' >= 1'); + // only load these fields + $query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')'); + $query->order('a.name ASC'); + $db->setQuery((string)$query); + $items = $db->loadObjectList(); + $options = array(); + if ($items) + { + $options[] = JHtml::_('select.option', '', JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_SELECT_AN_OPTION')); + $options[] = JHtml::_('select.option', -1, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ID'). ' [ id - text ]'); + $options[] = JHtml::_('select.option', -2, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_ORDERING'). ' [ ordering - number ]'); + $options[] = JHtml::_('select.option', -3, JText::_('PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS_STATUS'). ' [ published - list ]'); + foreach($items as $item) + { + // get the field name (TODO this could slow down the system so we will need to improve on this) + $field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"')); + $options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]'); + } + } + return $options; + } + } + return false; + } +} diff --git a/admin/models/forms/admin_custom_tabs.xml b/admin/models/forms/admin_custom_tabs.xml index 786c03827..8153f3f82 100644 --- a/admin/models/forms/admin_custom_tabs.xml +++ b/admin/models/forms/admin_custom_tabs.xml @@ -103,7 +103,7 @@ type="subform" name="tabs" label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="joomla.form.field.subform.repeatable" multiple="true" buttons="add,remove,move" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_DESCRIPTION" diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml index b94b9b6cf..29917814f 100644 --- a/admin/models/forms/admin_fields.xml +++ b/admin/models/forms/admin_fields.xml @@ -103,7 +103,7 @@ type="subform" name="addfields" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION" default="" diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml index ec148c220..1423d0631 100644 --- a/admin/models/forms/admin_fields_conditions.xml +++ b/admin/models/forms/admin_fields_conditions.xml @@ -103,7 +103,7 @@ type="subform" name="addconditions" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_LABEL" - layout="joomla.form.field.subform.repeatable" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_DESCRIPTION" default="" diff --git a/admin/models/forms/admin_fields_relations.xml b/admin/models/forms/admin_fields_relations.xml index 46d660b6c..6b243214e 100644 --- a/admin/models/forms/admin_fields_relations.xml +++ b/admin/models/forms/admin_fields_relations.xml @@ -103,7 +103,7 @@ type="subform" name="addrelations" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_LABEL" - layout="joomla.form.field.subform.repeatable" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_DESCRIPTION" default="" diff --git a/admin/models/forms/component_admin_views.xml b/admin/models/forms/component_admin_views.xml index 7236ff821..a7c6fd334 100644 --- a/admin/models/forms/component_admin_views.xml +++ b/admin/models/forms/component_admin_views.xml @@ -103,7 +103,7 @@ type="subform" name="addadmin_views" label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION" default="[{"submenu":"1","checkin":"1","history":"1","access":"1","port":"1"}]" diff --git a/admin/models/forms/component_custom_admin_views.xml b/admin/models/forms/component_custom_admin_views.xml index d4bb68794..720ad7f95 100644 --- a/admin/models/forms/component_custom_admin_views.xml +++ b/admin/models/forms/component_custom_admin_views.xml @@ -103,7 +103,7 @@ type="subform" name="addcustom_admin_views" label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" default="" icon="list"> diff --git a/admin/models/forms/component_site_views.xml b/admin/models/forms/component_site_views.xml index 69519b668..86989bcc6 100644 --- a/admin/models/forms/component_site_views.xml +++ b/admin/models/forms/component_site_views.xml @@ -103,7 +103,7 @@ type="subform" name="addsite_views" label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS_DESCRIPTION" default="" diff --git a/admin/models/import_language_translations.php b/admin/models/import_language_translations.php index 9d2745852..a98a7e9e5 100644 --- a/admin/models/import_language_translations.php +++ b/admin/models/import_language_translations.php @@ -419,8 +419,8 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy { if (ComponentbuilderHelper::checkArray($target_headers)) { - // make sure the file is loaded - JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers'); + // make sure the file is loaded + ComponentbuilderHelper::composerAutoload('phpspreadsheet'); $jinput = JFactory::getApplication()->input; foreach($target_headers as $header) { @@ -429,14 +429,14 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy // set the data if(isset($package['dir'])) { - $inputFileType = PHPExcel_IOFactory::identify($package['dir']); - $excelReader = PHPExcel_IOFactory::createReader($inputFileType); + $inputFileType = IOFactory::identify($package['dir']); + $excelReader = IOFactory::createReader($inputFileType); $excelReader->setReadDataOnly(true); $excelObj = $excelReader->load($package['dir']); $data['array'] = $excelObj->getActiveSheet()->toArray(null, true,true,true); $excelObj->disconnectWorksheets(); unset($excelObj); - return $this->save($data,$table); + return $this->save($data, $table); } } return false; diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 2feb16036..c4681421c 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2139,7 +2139,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name (8, '', 'The Editor field type provides a WYSIWYG editor.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties7\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties8\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties9\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties10\":{\"name\":\"buttons\",\"example\":\"no\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties11\":{\"name\":\"syntax\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) can be used to set the code syntax matching for this field.\"},\"properties12\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties13\":{\"name\":\"editor\",\"example\":\"codemirror|none\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties14\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties15\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties16\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties17\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides an editor area field.', '', 1, 11, '', '', '51f288d2-6eaa-42bc-a182-a6f69b3032b8'), (9, '', 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value this is entered i', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties5\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'provides a hidden field for saving a form field whose value cannot be altered directly by a user.', '', 1, 2, '', '', '82f1b5ca-bb9b-44d7-9a7a-9a03fb2a31dd'), (10, '', 'The integer form field type provides a select box with a range of integer values. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Integer', '{\"properties0\":{\"name\":\"type\",\"example\":\"integer\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be integer.\"},\"properties1\":{\"name\":\"name\",\"example\":\"size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties8\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties9\":{\"name\":\"first\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties10\":{\"name\":\"last\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties11\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of integers between a minimum and maximum.', '', 1, 6, '', '', 'fdbb50ea-35d2-45b2-a0bc-076fdf1544b8'), -(11, '', 'The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'List', '{\"properties0\":{\"name\":\"type\",\"example\":\"list\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be list.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mylist\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) filter options\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"option\",\"example\":\"0|Option 1,1|Option 2,2|Option 1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties11\":{\"name\":\"useglobal\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) if set to true, it will show the value that is set in the global configuration if found in the database.\"},\"properties12\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default list item value.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of custom-defined entries.', '', 1, 9, '', '', 'a51dfc06-1b9b-4d0a-86ba-f705bcd40d4d'), +(11, '', 'The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'List', '{\"properties0\":{\"name\":\"type\",\"example\":\"list\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be list.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mylist\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) filter options\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"option\",\"example\":\"0|Option 1,1|Option 2,2|Option 1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties11\":{\"name\":\"useglobal\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) if set to true, it will show the value that is set in the global configuration if found in the database.\"},\"properties12\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default list item value.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of custom-defined entries.', '', 1, 10, '', '', 'a51dfc06-1b9b-4d0a-86ba-f705bcd40d4d'), (12, '', 'The media form field type provides modal access to the media manager for the choice of an image. Users with appropriate permissions will be able to upload files.', 'Media', '{\"properties0\":{\"name\":\"type\",\"example\":\"media\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be media.\"},\"properties1\":{\"name\":\"name\",\"example\":\"media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Media\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"directory\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the directory from which the user will be able to choose a file. This attribute should be relative to the top level \\/images\\/ folder.\"},\"properties5\":{\"name\":\"preview\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) shows or hides the preview of the currently chosen image. (\\\"true\\\": Show always, \\\"tooltip\\\": Show as tooltip, \\\"false\\\": Show never) (since Joomla! 2.5.5)\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides modal access to the media manager for insertion of images with upload for users with appropriate permissions.', '', 1, 4, '', '', '69957007-e3d4-4976-a32b-611d02dbad71'), (13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a meter to show value in a range.', '', 1, 3, '', '', '81668284-e572-4e17-927b-ba697fc64bd0'), (14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without having to rely on the tooltips). Or adding any other text you want.', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'supports a one line text field.', '', 1, 5, '', '', 'f9ecacd0-8481-4157-8c71-d7aaefc2b7c3'), diff --git a/admin/views/admin_custom_tabs/view.html.php b/admin/views/admin_custom_tabs/view.html.php index a5c26fcfb..ecb664470 100644 --- a/admin/views/admin_custom_tabs/view.html.php +++ b/admin/views/admin_custom_tabs/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewAdmin_custom_tabs extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_custom_tabs.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_custom_tabs/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_custom_tabs/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index 2782639a6..a8c811eca 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -191,12 +191,15 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); JText::script('COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE'); diff --git a/admin/views/admin_fields_conditions/view.html.php b/admin/views/admin_fields_conditions/view.html.php index 6edc2d910..73eceb8cf 100644 --- a/admin/views/admin_fields_conditions/view.html.php +++ b/admin/views/admin_fields_conditions/view.html.php @@ -191,7 +191,13 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy // Add Ajax Token $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_conditions/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/admin_fields_relations/view.html.php b/admin/views/admin_fields_relations/view.html.php index d6750ca21..4c387ddb2 100644 --- a/admin/views/admin_fields_relations/view.html.php +++ b/admin/views/admin_fields_relations/view.html.php @@ -192,6 +192,12 @@ class ComponentbuilderViewAdmin_fields_relations extends JViewLegacy $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_fields_relations/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add var key $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); // add return_here diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php index 7f39b3ec9..92aca99af 100644 --- a/admin/views/admin_view/view.html.php +++ b/admin/views/admin_view/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/class_extends/view.html.php b/admin/views/class_extends/view.html.php index 7e2f938fc..c758cac0b 100644 --- a/admin/views/class_extends/view.html.php +++ b/admin/views/class_extends/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewClass_extends extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_extends/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/class_method/view.html.php b/admin/views/class_method/view.html.php index 3d70d2a97..bef921b04 100644 --- a/admin/views/class_method/view.html.php +++ b/admin/views/class_method/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewClass_method extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_method/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/class_property/view.html.php b/admin/views/class_property/view.html.php index 90f99f6d5..6db978037 100644 --- a/admin/views/class_property/view.html.php +++ b/admin/views/class_property/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewClass_property extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/class_property/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index 4d726a446..12c562fc4 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -59,6 +59,10 @@ class ComponentbuilderViewCompiler extends JViewLegacy parent::display($tpl); } + // These are subform layouts used in JCB + // JLayoutHelper::render('sectionjcb', [?]); // added to ensure the layout is loaded + // JLayoutHelper::render('repeatablejcb', [?]); // added to ensure the layout is loaded + public function setForm() { if(ComponentbuilderHelper::checkArray($this->Components)) @@ -192,8 +196,30 @@ class ComponentbuilderViewCompiler extends JViewLegacy $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); } + // Load the script to find all uikit components needed. + if ($uikit != 2) + { + // Set the default uikit components in this view. + $uikitComp = array(); + $uikitComp[] = 'data-uk-grid'; + + // Get field uikit components needed in this view. + $uikitFieldComp = $this->get('UikitComp'); + if (isset($uikitFieldComp) && ComponentbuilderHelper::checkArray($uikitFieldComp)) + { + if (isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) + { + $uikitComp = array_merge($uikitComp, $uikitFieldComp); + $uikitComp = array_unique($uikitComp); + } + else + { + $uikitComp = $uikitFieldComp; + } + } + } + // Load the needed uikit components in this view. - $uikitComp = $this->get('UikitComp'); if ($uikit != 2 && isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) { // load just in case. diff --git a/admin/views/component_admin_views/view.html.php b/admin/views/component_admin_views/view.html.php index d7e89df0b..f8f62b6a2 100644 --- a/admin/views/component_admin_views/view.html.php +++ b/admin/views/component_admin_views/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_admin_views extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_admin_views.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_custom_admin_menus/view.html.php b/admin/views/component_custom_admin_menus/view.html.php index 2df89ad51..72df3bdad 100644 --- a/admin/views/component_custom_admin_menus/view.html.php +++ b/admin/views/component_custom_admin_menus/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_custom_admin_menus extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_menus.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_menus/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_custom_admin_views/view.html.php b/admin/views/component_custom_admin_views/view.html.php index 7a9c3063a..aa193a104 100644 --- a/admin/views/component_custom_admin_views/view.html.php +++ b/admin/views/component_custom_admin_views/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_custom_admin_views extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_custom_admin_views.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_custom_admin_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/component_dashboard/view.html.php b/admin/views/component_dashboard/view.html.php index dc9e2d092..c81cf8f83 100644 --- a/admin/views/component_dashboard/view.html.php +++ b/admin/views/component_dashboard/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewComponent_dashboard extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_dashboard/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/component_site_views/view.html.php b/admin/views/component_site_views/view.html.php index ff1c47e82..66f45e8a0 100644 --- a/admin/views/component_site_views/view.html.php +++ b/admin/views/component_site_views/view.html.php @@ -189,7 +189,13 @@ class ComponentbuilderViewComponent_site_views extends JViewLegacy $this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_NEW' : 'COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_EDIT')); $this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/component_site_views.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); - $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/component_site_views/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 JavaScripts + $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + JText::script('view not acceptable. Error'); } } diff --git a/admin/views/custom_admin_view/view.html.php b/admin/views/custom_admin_view/view.html.php index 23b625269..0348ac11c 100644 --- a/admin/views/custom_admin_view/view.html.php +++ b/admin/views/custom_admin_view/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_admin_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/custom_code/view.html.php b/admin/views/custom_code/view.html.php index 78d2be551..9603ee62b 100644 --- a/admin/views/custom_code/view.html.php +++ b/admin/views/custom_code/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewCustom_code extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/custom_code/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/dynamic_get/view.html.php b/admin/views/dynamic_get/view.html.php index 8ae84b76f..eb7231da3 100644 --- a/admin/views/dynamic_get/view.html.php +++ b/admin/views/dynamic_get/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/dynamic_get/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/field/view.html.php b/admin/views/field/view.html.php index 859e5ea36..213bcb753 100644 --- a/admin/views/field/view.html.php +++ b/admin/views/field/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewField extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/field/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php index 4c8563b26..9efee96d0 100644 --- a/admin/views/import_joomla_components/view.html.php +++ b/admin/views/import_joomla_components/view.html.php @@ -156,12 +156,15 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy // add a token on the page for javascript $this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); } diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index b78328334..37640592a 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_component/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/joomla_module/view.html.php b/admin/views/joomla_module/view.html.php index cf16779cc..dd1a2026b 100644 --- a/admin/views/joomla_module/view.html.php +++ b/admin/views/joomla_module/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewJoomla_module extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_module/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // Add the JavaScript for JStore diff --git a/admin/views/joomla_plugin/view.html.php b/admin/views/joomla_plugin/view.html.php index 8b83c69bb..3a03654e5 100644 --- a/admin/views/joomla_plugin/view.html.php +++ b/admin/views/joomla_plugin/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewJoomla_plugin extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/joomla_plugin/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // Add the JavaScript for JStore diff --git a/admin/views/layout/view.html.php b/admin/views/layout/view.html.php index c4dd87ee4..9d3be7ca6 100644 --- a/admin/views/layout/view.html.php +++ b/admin/views/layout/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewLayout extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/layout/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/library/view.html.php b/admin/views/library/view.html.php index 1a4d9a567..d4734bbe2 100644 --- a/admin/views/library/view.html.php +++ b/admin/views/library/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewLibrary extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/library/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/placeholder/view.html.php b/admin/views/placeholder/view.html.php index d6843ce01..20b1abd02 100644 --- a/admin/views/placeholder/view.html.php +++ b/admin/views/placeholder/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewPlaceholder extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/placeholder/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add some language strings diff --git a/admin/views/site_view/view.html.php b/admin/views/site_view/view.html.php index 72ef6159d..689722c6c 100644 --- a/admin/views/site_view/view.html.php +++ b/admin/views/site_view/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewSite_view extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/site_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/template/view.html.php b/admin/views/template/view.html.php index 94df9687d..574a3a8af 100644 --- a/admin/views/template/view.html.php +++ b/admin/views/template/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewTemplate extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/template/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/admin/views/validation_rule/view.html.php b/admin/views/validation_rule/view.html.php index 9dc0aed8f..6a78444d6 100644 --- a/admin/views/validation_rule/view.html.php +++ b/admin/views/validation_rule/view.html.php @@ -193,12 +193,15 @@ class ComponentbuilderViewValidation_rule extends JViewLegacy $this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/validation_rule/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + // add the Uikit v2 style sheets $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); - // add Uikit v2 JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + + // add the Uikit v2 extra style sheets + $this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + // add Uikit v2 extra JavaScripts $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); // add var key diff --git a/componentbuilder.xml b/componentbuilder.xml index 6e71467f8..f96061588 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 25th May, 2020 + 29th May, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/category.php b/site/helpers/category.php index ecead8458..6960fd59f 100644 --- a/site/helpers/category.php +++ b/site/helpers/category.php @@ -17,20 +17,20 @@ defined('_JEXEC') or die('Restricted access'); */ //Insure this view category file is loaded. -$classname = 'ComponentbuilderFieldsCategories'; +$classname = 'ComponentbuilderFieldCategories'; if (!class_exists($classname)) { - $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfields.php'; + $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfield.php'; if (is_file($path)) { include_once $path; } } //Insure this view category file is loaded. -$classname = 'ComponentbuilderFieldtypesCategories'; +$classname = 'ComponentbuilderFieldtypeCategories'; if (!class_exists($classname)) { - $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfieldtypes.php'; + $path = JPATH_SITE . '/components/com_componentbuilder/helpers/categoryfieldtype.php'; if (is_file($path)) { include_once $path; diff --git a/site/helpers/categoryfields.php b/site/helpers/categoryfield.php similarity index 86% rename from site/helpers/categoryfields.php rename to site/helpers/categoryfield.php index 766030339..59387bd16 100644 --- a/site/helpers/categoryfields.php +++ b/site/helpers/categoryfield.php @@ -15,7 +15,7 @@ defined('_JEXEC') or die('Restricted access'); /** * Componentbuilder Field Component Category Tree */ -class ComponentbuilderFieldsCategories extends JCategories +class ComponentbuilderFieldCategories extends JCategories { /** * Class constructor @@ -26,7 +26,7 @@ class ComponentbuilderFieldsCategories extends JCategories public function __construct($options = array()) { $options['table'] = '#__componentbuilder_field'; - $options['extension'] = 'com_componentbuilder.fields'; + $options['extension'] = 'com_componentbuilder.field'; parent::__construct($options); } diff --git a/site/helpers/categoryfieldtypes.php b/site/helpers/categoryfieldtype.php similarity index 85% rename from site/helpers/categoryfieldtypes.php rename to site/helpers/categoryfieldtype.php index 6dd7ff9f4..ba3a88b35 100644 --- a/site/helpers/categoryfieldtypes.php +++ b/site/helpers/categoryfieldtype.php @@ -15,7 +15,7 @@ defined('_JEXEC') or die('Restricted access'); /** * Componentbuilder Fieldtype Component Category Tree */ -class ComponentbuilderFieldtypesCategories extends JCategories +class ComponentbuilderFieldtypeCategories extends JCategories { /** * Class constructor @@ -26,7 +26,7 @@ class ComponentbuilderFieldtypesCategories extends JCategories public function __construct($options = array()) { $options['table'] = '#__componentbuilder_fieldtype'; - $options['extension'] = 'com_componentbuilder.fieldtypes'; + $options['extension'] = 'com_componentbuilder.fieldtype'; parent::__construct($options); } -- 2.40.1 From 70635ff6f06b3d6123060ff18430a584cf26f529 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 30 May 2020 20:49:13 +0200 Subject: [PATCH 02/14] Added notice to the compiler where it detects mismatching category view target names. Added the update script for categories in JCB. Made adjustments all across JCB to act according to gh-561 implementation. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/c_Fields.php | 30 +++++- admin/helpers/compiler/e_Interpretation.php | 34 +++--- admin/helpers/componentbuilder.php | 4 +- admin/layouts/fieldtype/fields_fullwidth.php | 4 +- admin/models/forms/field.xml | 3 +- admin/models/forms/fieldtype.xml | 2 +- admin/views/fields/tmpl/default_body.php | 4 +- admin/views/fields/view.html.php | 4 +- admin/views/fieldtypes/tmpl/default_body.php | 4 +- admin/views/fieldtypes/view.html.php | 4 +- componentbuilder.xml | 2 +- script.php | 105 +++++++++++++++---- site/helpers/route.php | 4 +- 15 files changed, 154 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index b60e50426..b4c6b07c4 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*: 29th May, 2020 ++ *Last Build*: 30th May, 2020 + *Version*: 2.11.2 + *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*: **282456** ++ *Line count*: **282524** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index b60e50426..b4c6b07c4 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*: 29th May, 2020 ++ *Last Build*: 30th May, 2020 + *Version*: 2.11.2 + *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*: **282456** ++ *Line count*: **282524** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index a6f365590..bb99927e2 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -4112,7 +4112,7 @@ class Fields extends Structure { $this->setScriptMediaSwitch[$typeName] = $typeName; } - // setup gategory for this view + // setup category for this view if ($dbSwitch && $typeName === 'category') { if (isset($this->catOtherName[$view_name_list]) @@ -4134,13 +4134,37 @@ class Fields extends Structure $field['settings']->xml, 'extension="', '"' ), $this->placeholders ); - // if they left out the extention for some reason + // if they left out the extension for some reason if (!ComponentbuilderHelper::checkString($_extension)) { $_extension = 'com_' . $this->componentCodeName . '.' . $otherView; } - // load the category builder + // check the context (does our target match) + if (strpos($_extension, '.') !== false) + { + $target_view = trim(explode('.', $_extension)[1]); + // from my understanding the target extension view and the otherView must align + // so I will here check that it does, and if not raise an error message to fix this + if ($target_view !== $otherView) + { + $target_extension = trim(explode('.', $_extension)[0]); + $correction = $target_extension . '.' . $otherView; + $this->app->enqueueMessage( + JText::sprintf('

Category targeting view mismatch

+ The + category field in (%s) admin view has a mismatching target view. +
To correct the mismatch, the extension value %s in the + field must be changed to %s + for + best category integration with Joomla. +
Please watch + this tutorial before proceeding!!!, + code fix

', $field['field'], $view_name_single, $_extension, $field['field'], $correction), 'Error' + ); + } + } + // load the category builder - TODO must move all to single view $this->categoryBuilder[$view_name_list] = array('code' => $name, 'name' => $listLangName, 'extension' => $_extension); diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index f687a3b93..1cbc5af5a 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -8476,19 +8476,21 @@ class Interpretation extends Fields public function getCategoryContentType($view, $views, $component) { + // get the other view + $otherView = $this->catCodeBuilder[$view]['view']; $category = $this->catCodeBuilder[$view]['code']; $Component = ComponentbuilderHelper::safeString($component, 'F'); $View = ComponentbuilderHelper::safeString($view, 'F'); // build uninstall script for content types $this->uninstallScriptBuilder[$View . ' ' . $category] = 'com_' - . $component . '.' . $views . '.category'; + . $component . '.' . $otherView . '.category'; $this->uninstallScriptContent[$View . ' ' . $category] = $View . ' ' . $category; // set the title $array['type_title'] = $Component . ' ' . $View . ' ' . ComponentbuilderHelper::safeString($category, 'F'); // set the alias - $array['type_alias'] = 'com_' . $component . '.' . $views . '.category'; + $array['type_alias'] = 'com_' . $component . '.' . $otherView . '.category'; // set the table $array['table'] = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'; @@ -11450,13 +11452,10 @@ class Interpretation extends Fields // if to be linked if ($item['type'] === 'category' && !$item['title']) { - // get the other view - $otherViews = $this->catCodeBuilder[$viewName_single]['views']; - // return the link to category return 'index.php?option=com_categories&task=category.edit&id=' - . $item['code'] . '; ?>&extension=com_' - . $this->componentCodeName . '.' . $otherViews; + . $item['code'] . '; ?>&extension=' + . $this->categoryBuilder[$viewName_list]['extension']; } elseif ($item['type'] === 'user' && !$item['title']) { @@ -11517,11 +11516,10 @@ class Interpretation extends Fields if ($item['type'] === 'category' && !$item['title']) { // get the other view - $otherViews = $this->catCodeBuilder[$viewName_single]['views']; - + $otherView = $this->catCodeBuilder[$viewName_single]['view']; // return the authority to category return $user . "->authorise('core.edit', 'com_" - . $this->componentCodeName . "." . $otherViews + . $this->componentCodeName . "." . $otherView . ".category.' . (int)\$item->" . $item['code'] . ")"; } elseif ($item['type'] === 'user' && !$item['title']) @@ -17459,6 +17457,10 @@ class Interpretation extends Fields $otherViews = $viewName_list; $otherView = $viewName_single; } + // set the OtherView value + $this->fileContentDynamic['category' . $otherView][$this->hhh + . 'otherview' . $this->hhh] + = $otherView; // load the category helper details in not already loaded if (!isset( $this->fileContentDynamic['category' . $otherView][$this->hhh @@ -17593,7 +17595,7 @@ class Interpretation extends Fields . " If the category has been passed in the URL check it."; $allow[] = $this->_t(3) . "\$allow = \$user->authorise('core.create', \$this->option . '." - . $otherViews . ".category.' . \$categoryId);"; + . $otherView . ".category.' . \$categoryId);"; $allow[] = $this->_t(2) . "}"; $allow[] = PHP_EOL . $this->_t(2) . "if (\$allow === null)"; $allow[] = $this->_t(2) . "{"; @@ -18168,6 +18170,8 @@ class Interpretation extends Fields ) . " Check for existing item."; $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit State access controls."; + // get the other view + $otherView = $this->catCodeBuilder[$viewName_single]['view']; // check if the item has permissions. if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder[$core['core.edit.state']]) @@ -18185,7 +18189,7 @@ class Interpretation extends Fields . $viewName_single . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" - . $component . "." . $viewName_list + . $component . "." . $otherView . ".category.' . (int) \$catid))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" @@ -18199,7 +18203,7 @@ class Interpretation extends Fields . $component . "." . $viewName_single . ".' . (int) \$id))"; $getForm[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" - . $component . "." . $viewName_list + . $component . "." . $otherView . ".category.' . (int) \$catid))"; $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_" @@ -18728,7 +18732,7 @@ class Interpretation extends Fields $allow[] = PHP_EOL . $this->_t(3) . "\$user = JFactory::getUser();"; $allow[] = $this->_t(3) . "\$allow = \$user->authorise('core.delete', 'com_" - . $component . "." . $otherViews + . $component . "." . $otherView . ".category.' . (int) \$record->catid);"; // check if the item has permissions. if ($coreLoad @@ -18882,7 +18886,7 @@ class Interpretation extends Fields $allow[] = $this->_t(2) . "{"; $allow[] = $this->_t(3) . "\$catpermission = \$user->authorise('core.edit.state', 'com_" - . $component . "." . $otherViews + . $component . "." . $otherView . ".category.' . (int) \$record->catid);"; $allow[] = $this->_t(3) . "if (!\$catpermission && !is_null(\$catpermission))"; diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index cf7d9cd02..433fc969a 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -6033,12 +6033,12 @@ abstract class ComponentbuilderHelper if ($user->authorise('field.access', 'com_componentbuilder') && $user->authorise('field.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FIELDS'), 'index.php?option=com_componentbuilder&view=fields', $submenu === 'fields'); - JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fields', $submenu === 'categories.fields'); + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.field', $submenu === 'categories.field'); } if ($user->authorise('fieldtype.access', 'com_componentbuilder') && $user->authorise('fieldtype.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FIELDTYPES'), 'index.php?option=com_componentbuilder&view=fieldtypes', $submenu === 'fieldtypes'); - JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fieldtypes', $submenu === 'categories.fieldtypes'); + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fieldtype', $submenu === 'categories.fieldtype'); } if ($user->authorise('language_translation.access', 'com_componentbuilder') && $user->authorise('language_translation.submenu', 'com_componentbuilder')) { diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 4ab41c6b1..b8fba47f6 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -118,8 +118,8 @@ $can = ComponentbuilderHelper::getActions('field'); store); ?> - authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?> - escape($item->category_title); ?> + authorise('core.edit', 'com_componentbuilder.field.category.' . (int)$item->catid)): ?> + escape($item->category_title); ?> escape($item->category_title); ?> diff --git a/admin/models/forms/field.xml b/admin/models/forms/field.xml index 2f3a39fea..211698f6d 100644 --- a/admin/models/forms/field.xml +++ b/admin/models/forms/field.xml @@ -227,8 +227,7 @@ type="category" name="catid" label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL" - extension="com_componentbuilder.fields" - default="" + extension="com_componentbuilder.field" description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION" class="inputbox" /> diff --git a/admin/models/forms/fieldtype.xml b/admin/models/forms/fieldtype.xml index ac00e85e6..e456efeb4 100644 --- a/admin/models/forms/fieldtype.xml +++ b/admin/models/forms/fieldtype.xml @@ -449,7 +449,7 @@ type="category" name="catid" label="COM_COMPONENTBUILDER_FIELDTYPE_CATID_LABEL" - extension="com_componentbuilder.fieldtypes" + extension="com_componentbuilder.fieldtype" default="" description="COM_COMPONENTBUILDER_FIELDTYPE_CATID_DESCRIPTION" class="inputbox" diff --git a/admin/views/fields/tmpl/default_body.php b/admin/views/fields/tmpl/default_body.php index e79c51bd9..382ce7d16 100644 --- a/admin/views/fields/tmpl/default_body.php +++ b/admin/views/fields/tmpl/default_body.php @@ -95,8 +95,8 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
- user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?> - escape($item->category_title); ?> + user->authorise('core.edit', 'com_componentbuilder.field.category.' . (int)$item->catid)): ?> + escape($item->category_title); ?> escape($item->category_title); ?> diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 2beec06b4..3fc356eba 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -196,7 +196,7 @@ class ComponentbuilderViewFields extends JViewLegacy JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', - JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fields'), 'value', 'text', $this->state->get('filter.category_id')) + JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.field'), 'value', 'text', $this->state->get('filter.category_id')) ); if ($this->canBatch && $this->canCreate && $this->canEdit) @@ -205,7 +205,7 @@ class ComponentbuilderViewFields extends JViewLegacy JHtmlBatch_::addListSelection( JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_CATEGORY'), 'batch[category]', - JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fields'), 'value', 'text') + JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.field'), 'value', 'text') ); } diff --git a/admin/views/fieldtypes/tmpl/default_body.php b/admin/views/fieldtypes/tmpl/default_body.php index 0c4d65319..887e1812f 100644 --- a/admin/views/fieldtypes/tmpl/default_body.php +++ b/admin/views/fieldtypes/tmpl/default_body.php @@ -77,8 +77,8 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed
- user->authorise('core.edit', 'com_componentbuilder.fieldtypes.category.' . (int)$item->catid)): ?> - escape($item->category_title); ?> + user->authorise('core.edit', 'com_componentbuilder.fieldtype.category.' . (int)$item->catid)): ?> + escape($item->category_title); ?> escape($item->category_title); ?> diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index 075cdb23f..fac139380 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -191,7 +191,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy JHtmlSidebar::addFilter( JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', - JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fieldtypes'), 'value', 'text', $this->state->get('filter.category_id')) + JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fieldtype'), 'value', 'text', $this->state->get('filter.category_id')) ); if ($this->canBatch && $this->canCreate && $this->canEdit) @@ -200,7 +200,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy JHtmlBatch_::addListSelection( JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_CATEGORY'), 'batch[category]', - JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fieldtypes'), 'value', 'text') + JHtml::_('select.options', JHtml::_('category.options', 'com_componentbuilder.fieldtype'), 'value', 'text') ); } } diff --git a/componentbuilder.xml b/componentbuilder.xml index f96061588..d4551f41b 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 29th May, 2020 + 30th May, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/script.php b/script.php index 817b584db..a6775ed6a 100644 --- a/script.php +++ b/script.php @@ -1516,7 +1516,7 @@ class com_componentbuilderInstallerScript $query->select($db->quoteName('type_id')); $query->from($db->quoteName('#__content_types')); // Where Field catid alias is found - $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fields.category') ); + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.field.category') ); $db->setQuery($query); // Execute query to see if alias is found $db->execute(); @@ -1527,7 +1527,7 @@ class com_componentbuilderInstallerScript // Since there are load the needed field_catid type ids $field_catid_ids = $db->loadColumn(); // Remove Field catid from the content type table - $field_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fields.category') ); + $field_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.field.category') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__content_types')); @@ -1538,11 +1538,11 @@ class com_componentbuilderInstallerScript if ($field_catid_done) { // If succesfully remove Field catid add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.fields.category) type alias was removed from the #__content_type table')); + $app->enqueueMessage(JText::_('The (com_componentbuilder.field.category) type alias was removed from the #__content_type table')); } // Remove Field catid items from the contentitem tag map table - $field_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fields.category') ); + $field_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.field.category') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__contentitem_tag_map')); @@ -1553,11 +1553,11 @@ class com_componentbuilderInstallerScript if ($field_catid_done) { // If succesfully remove Field catid add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.fields.category) type alias was removed from the #__contentitem_tag_map table')); + $app->enqueueMessage(JText::_('The (com_componentbuilder.field.category) type alias was removed from the #__contentitem_tag_map table')); } // Remove Field catid items from the ucm content table - $field_catid_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.fields.category') ); + $field_catid_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.field.category') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_content')); @@ -1568,7 +1568,7 @@ class com_componentbuilderInstallerScript if ($field_catid_done) { // If succesfully remove Field catid add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.fields.category) type alias was removed from the #__ucm_content table')); + $app->enqueueMessage(JText::_('The (com_componentbuilder.field.category) type alias was removed from the #__ucm_content table')); } // Make sure that all the Field catid items are cleared from DB @@ -1688,7 +1688,7 @@ class com_componentbuilderInstallerScript $query->select($db->quoteName('type_id')); $query->from($db->quoteName('#__content_types')); // Where Fieldtype catid alias is found - $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fieldtypes.category') ); + $query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fieldtype.category') ); $db->setQuery($query); // Execute query to see if alias is found $db->execute(); @@ -1699,7 +1699,7 @@ class com_componentbuilderInstallerScript // Since there are load the needed fieldtype_catid type ids $fieldtype_catid_ids = $db->loadColumn(); // Remove Fieldtype catid from the content type table - $fieldtype_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fieldtypes.category') ); + $fieldtype_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fieldtype.category') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__content_types')); @@ -1710,11 +1710,11 @@ class com_componentbuilderInstallerScript if ($fieldtype_catid_done) { // If succesfully remove Fieldtype catid add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.fieldtypes.category) type alias was removed from the #__content_type table')); + $app->enqueueMessage(JText::_('The (com_componentbuilder.fieldtype.category) type alias was removed from the #__content_type table')); } // Remove Fieldtype catid items from the contentitem tag map table - $fieldtype_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fieldtypes.category') ); + $fieldtype_catid_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.fieldtype.category') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__contentitem_tag_map')); @@ -1725,11 +1725,11 @@ class com_componentbuilderInstallerScript if ($fieldtype_catid_done) { // If succesfully remove Fieldtype catid add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.fieldtypes.category) type alias was removed from the #__contentitem_tag_map table')); + $app->enqueueMessage(JText::_('The (com_componentbuilder.fieldtype.category) type alias was removed from the #__contentitem_tag_map table')); } // Remove Fieldtype catid items from the ucm content table - $fieldtype_catid_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.fieldtypes.category') ); + $fieldtype_catid_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.fieldtype.category') ); // Create a new query object. $query = $db->getQuery(true); $query->delete($db->quoteName('#__ucm_content')); @@ -1740,7 +1740,7 @@ class com_componentbuilderInstallerScript if ($fieldtype_catid_done) { // If succesfully remove Fieldtype catid add queued success message. - $app->enqueueMessage(JText::_('The (com_componentbuilder.fieldtypes.category) type alias was removed from the #__ucm_content table')); + $app->enqueueMessage(JText::_('The (com_componentbuilder.fieldtype.category) type alias was removed from the #__ucm_content table')); } // Make sure that all the Fieldtype catid items are cleared from DB @@ -5890,6 +5890,75 @@ class com_componentbuilderInstallerScript JFile::delete($wiki_menu); } } + // target version less then or equal to 2.11.2 + if (count($this->JCBversion) == 3 && $this->JCBversion[0] <= 2 && ($this->JCBversion[1] < 11 || ($this->JCBversion[1] == 11 && $this->JCBversion[2] <= 2))) + { + // we need to make a database correction for the field categories and the fieldtype categories + $fix_categories = array( + 'com_componentbuilder.fields' => 'com_componentbuilder.field', + 'com_componentbuilder.fieldtypes' => 'com_componentbuilder.fieldtype' + ); + // targeted tables (to fix all places categories are mapped into Joomla) + $fix_tables = array( + 'content_types' => array( + 'id' => 'type_id', + 'key' => 'type_alias', + 'suffix' => '.category'), + 'contentitem_tag_map' => array( + 'id' => 'type_id', + 'key' => 'type_alias', + 'suffix' => '.category'), + 'ucm_content' => array( + 'id' => 'core_content_id', + 'key' => 'core_type_alias', + 'suffix' => '.category'), + 'categories' => array( + 'id' => 'id', + 'key' => 'extension', + 'suffix' => '') + ); + + // the script that does the work + foreach ($fix_categories as $fix => $category) + { + // loop over the targeted tables + foreach ($fix_tables as $_table => $_update) + { + // Create a new query object. + $query = $db->getQuery(true); + // get all type_ids + $query->select($db->quoteName($_update['id'])); + $query->from($db->quoteName('#__' . $_table)); + $query->where( $db->quoteName($_update['key']) . ' = ' . $db->quote($fix . $_update['suffix'])); + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + + // all these must be updated + $ids = $db->loadColumn(); + // Fields to update. + $fields = array( + $db->quoteName($_update['key']) . ' = ' . $db->quote($category . $_update['suffix']) + ); + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName($_update['id']) . ' IN (' . implode(', ', $ids) . ')' + ); + $query->update($db->quoteName('#__' . $_table))->set($fields)->where($conditions); + $db->setQuery($query); + $result = $db->execute(); + // on success + if ($result) + { + $app->enqueueMessage("

Updated #__$_table - " . $_update['key'] . " from $fix" . $_update['suffix'] . " to $category" . $_update['suffix'] . "!

", 'Notice'); + } + + } + } + } + } } } @@ -6136,7 +6205,7 @@ class com_componentbuilderInstallerScript // Create the field category content type object. $field_category = new stdClass(); $field_category->type_title = 'Componentbuilder Field Catid'; - $field_category->type_alias = 'com_componentbuilder.fields.category'; + $field_category->type_alias = 'com_componentbuilder.field.category'; $field_category->table = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'; $field_category->field_mappings = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}'; $field_category->router = 'ComponentbuilderHelperRoute::getCategoryRoute'; @@ -6160,7 +6229,7 @@ class com_componentbuilderInstallerScript // Create the fieldtype category content type object. $fieldtype_category = new stdClass(); $fieldtype_category->type_title = 'Componentbuilder Fieldtype Catid'; - $fieldtype_category->type_alias = 'com_componentbuilder.fieldtypes.category'; + $fieldtype_category->type_alias = 'com_componentbuilder.fieldtype.category'; $fieldtype_category->table = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'; $fieldtype_category->field_mappings = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}'; $fieldtype_category->router = 'ComponentbuilderHelperRoute::getCategoryRoute'; @@ -7850,7 +7919,7 @@ class com_componentbuilderInstallerScript // Create the field category content type object. $field_category = new stdClass(); $field_category->type_title = 'Componentbuilder Field Catid'; - $field_category->type_alias = 'com_componentbuilder.fields.category'; + $field_category->type_alias = 'com_componentbuilder.field.category'; $field_category->table = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'; $field_category->field_mappings = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}'; $field_category->router = 'ComponentbuilderHelperRoute::getCategoryRoute'; @@ -7908,7 +7977,7 @@ class com_componentbuilderInstallerScript // Create the fieldtype category content type object. $fieldtype_category = new stdClass(); $fieldtype_category->type_title = 'Componentbuilder Fieldtype Catid'; - $fieldtype_category->type_alias = 'com_componentbuilder.fieldtypes.category'; + $fieldtype_category->type_alias = 'com_componentbuilder.fieldtype.category'; $fieldtype_category->table = '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}'; $fieldtype_category->field_mappings = '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}'; $fieldtype_category->router = 'ComponentbuilderHelperRoute::getCategoryRoute'; diff --git a/site/helpers/route.php b/site/helpers/route.php index 341ed01c4..441972641 100644 --- a/site/helpers/route.php +++ b/site/helpers/route.php @@ -85,8 +85,8 @@ abstract class ComponentbuilderHelperRoute } $views = array( - "com_componentbuilder.fields" => "field", - "com_componentbuilder.fieldtypes" => "fieldtype"); + "com_componentbuilder.field" => "field", + "com_componentbuilder.fieldtype" => "fieldtype"); $view = $views[$category->extension]; if ($id < 1 || !($category instanceof JCategoryNode)) -- 2.40.1 From 90f48bd5fab24d540012a5bb3bbac5b973b631f3 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 2 Jun 2020 00:49:30 +0200 Subject: [PATCH 03/14] Updated paypal donation link in readme note. --- README.md | 2 +- admin/README.txt | 2 +- admin/language/en-GB/en-GB.com_componentbuilder.ini | 2 +- admin/sql/install.mysql.utf8.sql | 4 ++-- componentbuilder.xml | 2 +- script.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b4c6b07c4..f42ef9898 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ 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*: 30th May, 2020 ++ *Last Build*: 1st June, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/README.txt b/admin/README.txt index b4c6b07c4..f42ef9898 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,7 +144,7 @@ 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*: 30th May, 2020 ++ *Last Build*: 1st June, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index f30834db6..3d23dd41b 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -5872,7 +5872,7 @@ Project duration: **###projectWeekTime### weeks** or **###projectMonthTime### mo ## Donations

If you want to support this project, please consider donating:
- * PayPal: [paypal.me/asseblief](https://www.paypal.me/asseblief) (Asseblief = Please) in Afrikaans
+ * PayPal: [paypal.me/donationgeek](https://www.paypal.me/donationgeek)
* Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
* Ethereum: 0x9548144662b47327c954f3e214edb96662d51218
" diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index c4681421c..546d2bc3d 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1904,7 +1904,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KKiBQYXlQYWw6IFtwYXlwYWwubWUvcGF5dmRtXShodHRwczovL3d3dy5wYXlwYWwubWUvcGF5dmRtKQ0KKiBCaXRjb2luOiAxRkx4aVQ2d3l4Z1ozYm9ldmlMa1lKMURScHA0MXV6cHhhDQoqIEV0aGVyZXVtOiAweDI0MzM5MmRhYTNjOWM4YmM4NDFmY2FjZjdjN2Y3MjU0MWNiMTY4MjMg', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.1', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'ssoiRTgyHnjpbecX2FNhW3d1xwZw3anFWZAhImJtELo=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-05-21 13:12:17', '', 3, '9K0W+p28QsHgdHuzrpCNpctEhN3vABrEKYTyV3qaQmg=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.2', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'HFrCeQ/dZlNywC+BnkD7+Jznb1AoSMFkvlZvLrWJnP8=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-06-01 22:30:51', '', 3, 'LqVjNz4RpFQus30hSwGAxD6C55z/W+xG/qO+0Ea2QUA=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); -- -- Dumping data for table `#__componentbuilder_admin_view` @@ -2312,7 +2312,7 @@ INSERT INTO `#__componentbuilder_component_custom_admin_views` (`id`, `addcustom -- INSERT INTO `#__componentbuilder_component_updates` (`id`, `joomla_component`, `version_update`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES -(27, 25, '{\"version_update0\":{\"version\":\"1.0.5\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v1.0.5.zip\"},\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\n\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update2\":{\"version\":\"2.0.1\",\"mysql\":\"\",\"url\":\"http:\\/\\/domain.com\\/demo.zip\"}}', 1, '2017-10-28 03:56:26', '2020-05-21 13:12:17', 6, '', ''); +(27, 25, '{\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\r\\n\\r\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update2\":{\"version\":\"2.0.2\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/master.zip\"}}', 1, '2017-10-28 03:56:26', '2020-05-30 23:56:04', 7, '', ''); -- -- Dumping data for table `#__componentbuilder_component_mysql_tweaks` diff --git a/componentbuilder.xml b/componentbuilder.xml index d4551f41b..43dbca171 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 30th May, 2020 + 1st June, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/script.php b/script.php index a6775ed6a..021103f47 100644 --- a/script.php +++ b/script.php @@ -5898,6 +5898,7 @@ class com_componentbuilderInstallerScript 'com_componentbuilder.fields' => 'com_componentbuilder.field', 'com_componentbuilder.fieldtypes' => 'com_componentbuilder.fieldtype' ); + // targeted tables (to fix all places categories are mapped into Joomla) $fix_tables = array( 'content_types' => array( @@ -5917,7 +5918,6 @@ class com_componentbuilderInstallerScript 'key' => 'extension', 'suffix' => '') ); - // the script that does the work foreach ($fix_categories as $fix => $category) { -- 2.40.1 From e86ab88f5cdcf8cc0c247265edf21044d12d8598 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 25 Jun 2020 21:22:30 +0200 Subject: [PATCH 04/14] Fixed gh-571 compiler path errors. --- README.md | 4 +- admin/README.txt | 4 +- admin/compiler/joomla_3/Helper.php | 1 + admin/compiler/joomla_3/Helper_site.php | 1 + admin/compiler/joomla_3/edit_site.php | 5 +- admin/compiler/joomla_3/layout_admin.php | 20 +++++++ admin/compiler/joomla_3/settings.json | 5 ++ admin/helpers/compiler/a_Get.php | 43 ++++++++++++++- admin/helpers/compiler/b_Structure.php | 46 +++++++++++----- admin/helpers/compiler/e_Interpretation.php | 53 +++++++++++++++---- admin/helpers/compiler/f_Infusion.php | 4 ++ admin/helpers/componentbuilder.php | 13 +++++ admin/models/admin_view.php | 13 +++-- admin/models/class_method.php | 13 +++-- admin/models/class_property.php | 13 +++-- admin/models/custom_admin_view.php | 13 +++-- admin/models/dynamic_get.php | 13 +++-- admin/models/field.php | 13 +++-- admin/models/fieldtype.php | 13 +++-- admin/models/forms/dynamic_get.xml | 4 +- admin/models/import_language_translations.php | 2 +- admin/models/joomla_component.php | 13 +++-- admin/models/joomla_module.php | 13 +++-- admin/models/joomla_plugin.php | 13 +++-- admin/models/library.php | 13 +++-- admin/models/site_view.php | 13 +++-- admin/models/snippet.php | 13 +++-- admin/sql/install.mysql.utf8.sql | 11 ++-- admin/views/admin_custom_tabs/tmpl/edit.php | 2 +- admin/views/admin_fields/tmpl/edit.php | 2 +- .../admin_fields_conditions/tmpl/edit.php | 2 +- .../admin_fields_relations/tmpl/edit.php | 2 +- admin/views/admin_view/tmpl/edit.php | 2 +- admin/views/class_extends/tmpl/edit.php | 2 +- admin/views/class_method/tmpl/edit.php | 2 +- admin/views/class_property/tmpl/edit.php | 2 +- .../views/component_admin_views/tmpl/edit.php | 2 +- admin/views/component_config/tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- admin/views/component_dashboard/tmpl/edit.php | 2 +- .../component_files_folders/tmpl/edit.php | 2 +- admin/views/component_modules/tmpl/edit.php | 2 +- .../component_mysql_tweaks/tmpl/edit.php | 2 +- .../component_placeholders/tmpl/edit.php | 2 +- admin/views/component_plugins/tmpl/edit.php | 2 +- .../views/component_site_views/tmpl/edit.php | 2 +- admin/views/component_updates/tmpl/edit.php | 2 +- admin/views/custom_admin_view/tmpl/edit.php | 2 +- admin/views/custom_code/tmpl/edit.php | 2 +- admin/views/dynamic_get/tmpl/edit.php | 2 +- admin/views/field/tmpl/edit.php | 2 +- admin/views/fieldtype/tmpl/edit.php | 2 +- admin/views/help_document/tmpl/edit.php | 2 +- admin/views/joomla_component/tmpl/edit.php | 2 +- admin/views/joomla_module/tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- .../views/joomla_module_updates/tmpl/edit.php | 2 +- admin/views/joomla_plugin/tmpl/edit.php | 2 +- .../tmpl/edit.php | 2 +- admin/views/joomla_plugin_group/tmpl/edit.php | 2 +- .../views/joomla_plugin_updates/tmpl/edit.php | 2 +- admin/views/language/tmpl/edit.php | 2 +- .../views/language_translation/tmpl/edit.php | 2 +- admin/views/layout/tmpl/edit.php | 2 +- admin/views/library/tmpl/edit.php | 2 +- admin/views/library_config/tmpl/edit.php | 2 +- .../library_files_folders_urls/tmpl/edit.php | 2 +- admin/views/placeholder/tmpl/edit.php | 2 +- admin/views/server/tmpl/edit.php | 2 +- admin/views/site_view/tmpl/edit.php | 2 +- admin/views/snippet/tmpl/edit.php | 2 +- admin/views/snippet_type/tmpl/edit.php | 2 +- admin/views/template/tmpl/edit.php | 2 +- admin/views/validation_rule/tmpl/edit.php | 2 +- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 13 +++++ 77 files changed, 369 insertions(+), 125 deletions(-) create mode 100644 admin/compiler/joomla_3/layout_admin.php diff --git a/README.md b/README.md index f42ef9898..8ab0e94ec 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*: 1st June, 2020 ++ *Last Build*: 24th June, 2020 + *Version*: 2.11.2 + *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*: **282524** ++ *Line count*: **282642** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index f42ef9898..8ab0e94ec 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*: 1st June, 2020 ++ *Last Build*: 24th June, 2020 + *Version*: 2.11.2 + *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*: **282524** ++ *Line count*: **282642** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index a33b227ea..5d0f8e464 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -18,6 +18,7 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper;###ADMIN_HELPER_CLASS_HEADER### diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index 4faaf7a16..c3e36bd54 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -18,6 +18,7 @@ defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper;###SITE_HELPER_CLASS_HEADER### diff --git a/admin/compiler/joomla_3/edit_site.php b/admin/compiler/joomla_3/edit_site.php index f9362c09c..17f2e9277 100644 --- a/admin/compiler/joomla_3/edit_site.php +++ b/admin/compiler/joomla_3/edit_site.php @@ -24,9 +24,10 @@ JHtml::_('formbehavior.chosen', 'select'); JHtml::_('behavior.keepalive'); JHtml::_('behavior.tabstate'); JHtml::_('behavior.calendar'); -$componentParams = $this->params; // will be removed just use $this->params instead ?> +
toolbar->render(); ?>
###EDITBODY### -
###EDITBODYSCRIPT### + +
###EDITBODYSCRIPT### diff --git a/admin/compiler/joomla_3/layout_admin.php b/admin/compiler/joomla_3/layout_admin.php new file mode 100644 index 000000000..b1c513391 --- /dev/null +++ b/admin/compiler/joomla_3/layout_admin.php @@ -0,0 +1,20 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); +?> +###BOM### + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access');###ADMIN_LAYOUT_CODE### + +?>###ADMIN_LAYOUT_BODY### diff --git a/admin/compiler/joomla_3/settings.json b/admin/compiler/joomla_3/settings.json index a012e154e..748bc7e17 100644 --- a/admin/compiler/joomla_3/settings.json +++ b/admin/compiler/joomla_3/settings.json @@ -376,6 +376,11 @@ "rename": "JFormRule", "type": "rule" }, + "layout_admin.php": { + "path": "c0mp0n3nt/admin/layouts", + "rename": "layout_admin", + "type": "layout" + }, "layoutitems.php": { "path": "c0mp0n3nt/admin/layouts/VIEW", "rename": "layoutitems", diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 7b0690610..3f3ffa46d 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -1413,6 +1413,8 @@ class Get ? json_decode($component->addadmin_views, true) : null; if (ComponentbuilderHelper::checkArray($component->addadmin_views)) { + $this->lang = 'admin'; + $this->target = 'admin'; // sort the views according to order usort( $component->addadmin_views, function ($a, $b) { @@ -2923,6 +2925,10 @@ class Get false, $guiMapper ); + + // check if we have template or layouts to load + $this->setTemplateAndLayoutData($view->{$scripter}, $name_single); + unset($view->{$scripter}); } } @@ -2953,6 +2959,9 @@ class Get ), $guiMapper ); + + // check if we have template or layouts to load + $this->setTemplateAndLayoutData($view->{$button_code_field}, $name_single); } } // set the button array @@ -3045,6 +3054,7 @@ class Get $name_single, $guiMapper ); + if ($addAjaxSite) { $this->setCustomScriptBuilder( @@ -4988,6 +4998,8 @@ class Get { $script = $this->setGuiCodePlaceholder($script, $config); } + // add base64 locking option of a string + $script = $this->setBase64LOCK($script); // load the script if ($first && $second && $third) { @@ -9851,7 +9863,7 @@ class Get */ protected function customCodeFactory(&$paths, &$today) { - // we must first store the current woking directory + // we must first store the current working directory $joomla = getcwd(); $counter = array(1 => 0, 2 => 0); // file types to get @@ -10337,6 +10349,35 @@ class Get } } + /** + * Lock a string with bsae64 (basic) + * + * @param string $string The code string + * + * @return string + * + */ + protected function setBase64LOCK($script) + { + if (strpos($script, 'LOCKBASE64((((') !== false) + { + // get the strings + $values = ComponentbuilderHelper::getAllBetween($script, 'LOCKBASE64((((', '))))'); + $locker = array(); + // convert them + foreach($values as $value) + { + $locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," . + PHP_EOL . $this->_t(2) . "'" . + wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) . + "'));"; + } + // update the script + return $this->setPlaceholders($script, $locker); + } + return $script; + } + /** * Set the JCB GUI code placeholder * diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 735ce1e20..caea7cafb 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -2556,7 +2556,8 @@ class Structure extends Get public function moveFieldsRules($field, $path) { // check if we have a subform or repeatable field - if ($field['type_name'] === 'subform' || $field['type_name'] === 'repeatable') + if ($field['type_name'] === 'subform' + || $field['type_name'] === 'repeatable') { // since we could have a custom field or rule inside $this->moveMultiFieldsRules($field, $path); @@ -2624,7 +2625,7 @@ class Structure extends Get * move the fields and Rules of multi fields * * @param array $multi_field The field data - * @param string $path The path to move to + * @param string $path The path to move to * * @return void * @@ -2632,13 +2633,19 @@ class Structure extends Get protected function moveMultiFieldsRules($multi_field, $path) { // get the fields ids - $ids = array_map( 'trim', explode(',', ComponentbuilderHelper::getBetween($multi_field['settings']->xml, 'fields="', '"'))); + $ids = array_map( + 'trim', explode( + ',', ComponentbuilderHelper::getBetween( + $multi_field['settings']->xml, 'fields="', '"' + ) + ) + ); if (ComponentbuilderHelper::checkArray($ids)) { foreach ($ids as $id) { // setup the field - $field = array(); + $field = array(); $field['field'] = $id; $this->setFieldDetails($field); // move field and rules if needed @@ -2835,10 +2842,24 @@ class Structure extends Get { $path = $details->path; } - $zipPath = str_replace('c0mp0n3nt/', '', $path); - $path = str_replace( - 'c0mp0n3nt/', $this->componentPath . '/', $path - ); + // make sure we have component to replace + if (strpos($path, 'c0mp0n3nt') !== false) + { + $zipPath = str_replace('c0mp0n3nt/', '', $path); + $path = str_replace( + 'c0mp0n3nt/', $this->componentPath . '/', $path + ); + } + else + { + $this->app->enqueueMessage( + JText::sprintf( + '

c0mp0n3nt issue found

The path (%s) could not be used.

', + $path + ), 'Error' + ); + continue; + } // setup the folder if (!JFolder::exists($path)) @@ -2878,7 +2899,7 @@ class Structure extends Get // move the file to its place JFile::copy( $this->templatePath . '/' . $item, - $path . '/' . $new, '', true + $path . '/' . $new ); // count the file created $this->fileCount++; @@ -2934,9 +2955,10 @@ class Structure extends Get 'rename' => 1); $this->componentData->folders[] = $importView; // move the phpspreadsheet Folder (TODO we must move this to a library package) - $PHPExcel = array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor', - 'path' => '/libraries/phpspreadsheet/', - 'rename' => 0); + $PHPExcel + = array('folderpath' => 'JPATH_LIBRARIES/phpspreadsheet/vendor', + 'path' => '/libraries/phpspreadsheet/', + 'rename' => 0); $this->componentData->folders[] = $PHPExcel; } if (2 == $this->uikit || 1 == $this->uikit) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 1cbc5af5a..14f012682 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -5260,7 +5260,10 @@ class Interpretation extends Fields . " this is where you want to load your module position"; $addModule[] = $this->_t(3) . "\$modules = JModuleHelper::getModules(\$position);"; - $addModule[] = $this->_t(3) . "if (\$modules)"; + $addModule[] = $this->_t(3) . "if (" + . $this->fileContentStatic[$this->hhh . 'Component' + . $this->hhh] + . "Helper::checkArray(\$modules, true))"; $addModule[] = $this->_t(3) . "{"; $addModule[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " set the place holder"; @@ -12622,10 +12625,11 @@ class Interpretation extends Fields if ($items_one || $items_two) { // check if the item has permissions. - $publishingPer = array(); - $allToBeChekced = array('core.delete', 'core.edit.created_by', - 'core.edit.state', 'core.edit.created'); - foreach ($allToBeChekced as $core_permission) + $publishingPerOR = array(); + $allToBeChekcedOR = array('core.edit.created_by', + 'core.edit.created', + 'core.edit.state'); + foreach ($allToBeChekcedOR as $core_permission) { if ($coreLoad && isset($core[$core_permission]) && isset($this->permissionBuilder['global'][$core[$core_permission]]) @@ -12638,13 +12642,38 @@ class Interpretation extends Fields )) { // set permissions. - $publishingPer[] = "\$this->canDo->get('" + $publishingPerOR[] = "\$this->canDo->get('" . $core[$core_permission] . "')"; } else { // set permissions. - $publishingPer[] = "\$this->canDo->get('" . $core_permission + $publishingPerOR[] = "\$this->canDo->get('" . $core_permission + . "')"; + } + } + $publishingPerAND = array(); + $allToBeChekcedAND = array('core.delete', 'core.edit.state'); + foreach ($allToBeChekcedAND as $core_permission) + { + if ($coreLoad && isset($core[$core_permission]) + && isset($this->permissionBuilder['global'][$core[$core_permission]]) + && ComponentbuilderHelper::checkArray( + $this->permissionBuilder['global'][$core[$core_permission]] + ) + && in_array( + $view_name_single, + $this->permissionBuilder['global'][$core[$core_permission]] + )) + { + // set permissions. + $publishingPerAND[] = "\$this->canDo->get('" + . $core[$core_permission] . "')"; + } + else + { + // set permissions. + $publishingPerAND[] = "\$this->canDo->get('" . $core_permission . "')"; } } @@ -12655,8 +12684,11 @@ class Interpretation extends Fields { $tabs .= $_customTabHTML; } + // add the AND values to OR + $publishingPerOR[] = '(' . implode(' && ', $publishingPerAND) . ')'; + // now build the complete showhide behaviour for the publishing area $tabs .= PHP_EOL . PHP_EOL . $this->_t(1) . ""; // set the default publishing tab $tabs .= PHP_EOL . $this->_t(1) @@ -20821,7 +20853,7 @@ class Interpretation extends Fields // move the image to its place JFile::copy( JPATH_SITE . '/' . $path, - $imagePath . '/vdm-component.' . $type, '', true + $imagePath . '/vdm-component.' . $type ); // now set the type to global for re-use $this->componentImageType = $type; @@ -21060,8 +21092,7 @@ class Interpretation extends Fields } // move the image to its place JFile::copy( - JPATH_SITE . '/' . $path, $imagePath . '/' . $imageName, - '', true + JPATH_SITE . '/' . $path, $imagePath . '/' . $imageName ); } } diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 6e2e3ca9d..f0f9689f4 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1077,6 +1077,9 @@ class Infusion extends Interpretation ); } + // setup the layouts + $this->setCustomViewLayouts(); + // ADMIN_HELPER_CLASS_HEADER $this->fileContentStatic[$this->hhh . 'ADMIN_HELPER_CLASS_HEADER' . $this->hhh] @@ -1760,6 +1763,7 @@ class Infusion extends Interpretation &$this->placeholders, &$this->hhh) ); } + // setup the layouts $this->setCustomViewLayouts(); } diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 433fc969a..7656d19ca 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -13,6 +13,7 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; use PhpOffice\PhpSpreadsheet\IOFactory; @@ -5787,6 +5788,18 @@ abstract class ComponentbuilderHelper return date('Y' . $spacer . 'm' . $spacer . 'd', $date); } + /** + * set the date as 03/05/2004 + */ + public static function setDayMonthYear($date, $spacer = '/') + { + if (!self::isValidTimeStamp($date)) + { + $date = strtotime($date); + } + return date('d' . $spacer . 'm' . $spacer . 'Y', $date); + } + /** * Check if string is a valid time stamp */ diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 0f469f420..abddb2482 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -800,8 +800,8 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1491,8 +1491,15 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "admin_view", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('admin_view', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "admin_view", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/class_method.php b/admin/models/class_method.php index 004874715..0ec5d128d 100644 --- a/admin/models/class_method.php +++ b/admin/models/class_method.php @@ -342,8 +342,8 @@ class ComponentbuilderModelClass_method extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -972,8 +972,15 @@ class ComponentbuilderModelClass_method extends JModelAdmin $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "class_method", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('class_method', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "class_method", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/class_property.php b/admin/models/class_property.php index 6a6af7baf..a79d84a9b 100644 --- a/admin/models/class_property.php +++ b/admin/models/class_property.php @@ -333,8 +333,8 @@ class ComponentbuilderModelClass_property extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -963,8 +963,15 @@ class ComponentbuilderModelClass_property extends JModelAdmin $data['name'] = ComponentbuilderHelper::safeClassFunctionName($data['name']); // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "class_property", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('class_property', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "class_property", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index a21f8c5c7..91af2d657 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -506,8 +506,8 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1125,8 +1125,15 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "custom_admin_view", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('custom_admin_view', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "custom_admin_view", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index d897a4af4..a5589053e 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -520,8 +520,8 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1148,8 +1148,15 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "dynamic_get", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('dynamic_get', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "dynamic_get", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/field.php b/admin/models/field.php index 5cc2eafb8..b0ca2e38d 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -419,8 +419,8 @@ class ComponentbuilderModelField extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1144,8 +1144,15 @@ class ComponentbuilderModelField extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "field", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('field', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "field", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index bc916c4f3..1693a7b6d 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -544,8 +544,8 @@ class ComponentbuilderModelFieldtype extends JModelAdmin } } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1197,8 +1197,15 @@ class ComponentbuilderModelFieldtype extends JModelAdmin // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "fieldtype", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('fieldtype', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "fieldtype", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index 19fc6f35b..21d67915f 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -227,7 +227,7 @@ type="subform" name="join_db_table" label="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_DB_TABLE_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_DB_TABLE_DESCRIPTION" icon="list"> @@ -1202,7 +1202,7 @@ type="subform" name="join_view_table" label="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_VIEW_TABLE_LABEL" - layout="joomla.form.field.subform.repeatable-table" + layout="repeatablejcb" multiple="true" description="COM_COMPONENTBUILDER_DYNAMIC_GET_JOIN_VIEW_TABLE_DESCRIPTION" icon="list"> diff --git a/admin/models/import_language_translations.php b/admin/models/import_language_translations.php index a98a7e9e5..9f36e3076 100644 --- a/admin/models/import_language_translations.php +++ b/admin/models/import_language_translations.php @@ -424,7 +424,7 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy $jinput = JFactory::getApplication()->input; foreach($target_headers as $header) { - $data['target_headers'][$header] = $jinput->getString($header, null); + $data['target_headers'][$header] = $jinput->getString(strtolower($header), null); } // set the data if(isset($package['dir'])) diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index d4063eb70..bdcc71305 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -694,8 +694,8 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1385,8 +1385,15 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "joomla_component", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('joomla_component', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "joomla_component", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/joomla_module.php b/admin/models/joomla_module.php index 313d937bd..714c8f9a8 100644 --- a/admin/models/joomla_module.php +++ b/admin/models/joomla_module.php @@ -514,8 +514,8 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1199,8 +1199,15 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "joomla_module", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('joomla_module', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "joomla_module", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 4fac186d9..64ca2553e 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -479,8 +479,8 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1162,8 +1162,15 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "joomla_plugin", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('joomla_plugin', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "joomla_plugin", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/library.php b/admin/models/library.php index 7d3ce5578..e5f26141b 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -358,8 +358,8 @@ class ComponentbuilderModelLibrary extends JModelAdmin } } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1048,8 +1048,15 @@ class ComponentbuilderModelLibrary extends JModelAdmin // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "library", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('library', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "library", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/site_view.php b/admin/models/site_view.php index a826d76dd..823a0a3dc 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -527,8 +527,8 @@ class ComponentbuilderModelSite_view extends JModelAdmin } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -1146,8 +1146,15 @@ class ComponentbuilderModelSite_view extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "site_view", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('site_view', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "site_view", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/models/snippet.php b/admin/models/snippet.php index 4439466cb..56602624b 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -243,8 +243,8 @@ class ComponentbuilderModelSnippet extends JModelAdmin } } - // Only load the GUID if new item - if (0 == $id) + // Only load the GUID if new item (or empty) + if (0 == $id || !($val = $form->getValue('guid'))) { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } @@ -852,8 +852,15 @@ class ComponentbuilderModelSnippet extends JModelAdmin } // Set the GUID if empty or not valid - if (isset($data['guid']) && !ComponentbuilderHelper::validGUID($data['guid'], "snippet", $data['id'])) + if (empty($data['guid']) && $data['id'] > 0) { + // get the existing one + $data['guid'] = (string) ComponentbuilderHelper::getVar('snippet', $data['id'], 'id', 'guid'); + } + // Set the GUID if empty or not valid + while (!ComponentbuilderHelper::validGUID($data['guid'], "snippet", $data['id'])) + { + // must always be set $data['guid'] = (string) ComponentbuilderHelper::GUID(); } diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 546d2bc3d..737375ae9 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1904,7 +1904,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.2', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'HFrCeQ/dZlNywC+BnkD7+Jznb1AoSMFkvlZvLrWJnP8=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-06-01 22:30:51', '', 3, 'LqVjNz4RpFQus30hSwGAxD6C55z/W+xG/qO+0Ea2QUA=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.3', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'HFrCeQ/dZlNywC+BnkD7+Jznb1AoSMFkvlZvLrWJnP8=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-06-24 22:43:55', '', 3, 'LqVjNz4RpFQus30hSwGAxD6C55z/W+xG/qO+0Ea2QUA=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); -- -- Dumping data for table `#__componentbuilder_admin_view` @@ -2116,9 +2116,9 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, (23, '', '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Alias', 'NOT NULL', '', 24, '\"\"', 1, '2015-04-09 13:46:04', '2016-05-05 22:30:18', 2, '', 216, '335866ce-b81b-4329-901d-c20254135c9c'), (84, '', '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Description (full width)', 'NOT NULL', '', 25, '\"\"', 1, '2015-03-19 18:20:49', '2016-10-20 17:01:21', 4, '', 265, '749a9917-90c3-49c4-9e72-aa33b0683a87'), (100, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Email (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-05-05 23:44:32', '2016-02-07 22:43:18', 4, '', 285, '10c1eccb-b3c3-4325-a056-45a72d116fd8'), -(158, '', '', '', '', '', '', '', '', '', 64, '', 'CHAR', '', '', '', 'Image', 'NOT NULL', '', 12, '\"\"', 1, '2015-04-29 14:00:56', '2015-08-25 21:15:22', 1, '', 45, '0d6970af-b361-4f65-84f6-0eb0c5f09bad'), +(158, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', '', '', '', 'Image', 'NOT NULL', '', 12, '\"\"', 1, '2015-04-29 14:00:56', '2020-06-07 02:17:46', 2, '', 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'), +(199, '', '', '', '', '', '', '', '', '', 255, '', 'VARCHAR', 2, '', '', 'Name (required)', 'NOT NULL', '', 24, '\"\"', 1, '2015-03-19 17:30:59', '2020-06-01 23:44:08', 9, '', 4, '5d3d34dd-4876-4c6a-86ab-b4e162f22c08'), (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'), @@ -2312,7 +2312,7 @@ INSERT INTO `#__componentbuilder_component_custom_admin_views` (`id`, `addcustom -- INSERT INTO `#__componentbuilder_component_updates` (`id`, `joomla_component`, `version_update`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES -(27, 25, '{\"version_update1\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\r\\n\\r\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update2\":{\"version\":\"2.0.2\",\"mysql\":\"\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/master.zip\"}}', 1, '2017-10-28 03:56:26', '2020-05-30 23:56:04', 7, '', ''); +(27, 25, '{\"version_update0\":{\"version\":\"2.0.0\",\"mysql\":\"ALTER TABLE `#__demo_look` ENGINE = InnoDB;\\r\\n\\r\\nALTER TABLE `#__demo_look` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/v2.0.0.zip\"},\"version_update1\":{\"version\":\"2.0.2\",\"mysql\":\"ALTER TABLE `#__demo_look` CHANGE `image` `image` VARCHAR(255) NOT NULL DEFAULT \'\';\",\"url\":\"https:\\/\\/github.com\\/namibia\\/demo-joomla-3-component\\/archive\\/master.zip\"},\"version_update2\":{\"version\":\"2.0.3\",\"mysql\":\"\",\"url\":\"http:\\/\\/domain.com\\/demo.zip\"}}', 1, '2017-10-28 03:56:26', '2020-06-24 22:43:55', 8, '', ''); -- -- Dumping data for table `#__componentbuilder_component_mysql_tweaks` @@ -2414,7 +2414,8 @@ INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, (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:\\/\\/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); +(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), +(7, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdn.jsdelivr.net\\/npm\\/vue\",\"type\":3}}', 10, '', 1, '2020-06-05 13:11:54', '0000-00-00 00:00:00', 1, '', 6); CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( diff --git a/admin/views/admin_custom_tabs/tmpl/edit.php b/admin/views/admin_custom_tabs/tmpl/edit.php index 9203d773f..eb213b4fc 100644 --- a/admin/views/admin_custom_tabs/tmpl/edit.php +++ b/admin/views/admin_custom_tabs/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_custom_tabsTab'; ?> - canDo->get('admin_custom_tabs.delete') || $this->canDo->get('admin_custom_tabs.edit.created_by') || $this->canDo->get('admin_custom_tabs.edit.state') || $this->canDo->get('admin_custom_tabs.edit.created')) : ?> + canDo->get('admin_custom_tabs.edit.created_by') || $this->canDo->get('admin_custom_tabs.edit.created') || $this->canDo->get('admin_custom_tabs.edit.state') || ($this->canDo->get('admin_custom_tabs.delete') && $this->canDo->get('admin_custom_tabs.edit.state'))) : ?>
diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php index f08ccbca8..24949aa61 100644 --- a/admin/views/admin_fields/tmpl/edit.php +++ b/admin/views/admin_fields/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_fieldsTab'; ?> - canDo->get('admin_fields.delete') || $this->canDo->get('admin_fields.edit.created_by') || $this->canDo->get('admin_fields.edit.state') || $this->canDo->get('admin_fields.edit.created')) : ?> + canDo->get('admin_fields.edit.created_by') || $this->canDo->get('admin_fields.edit.created') || $this->canDo->get('admin_fields.edit.state') || ($this->canDo->get('admin_fields.delete') && $this->canDo->get('admin_fields.edit.state'))) : ?>
diff --git a/admin/views/admin_fields_conditions/tmpl/edit.php b/admin/views/admin_fields_conditions/tmpl/edit.php index 459616b31..1ef755774 100644 --- a/admin/views/admin_fields_conditions/tmpl/edit.php +++ b/admin/views/admin_fields_conditions/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_fields_conditionsTab'; ?> - canDo->get('admin_fields_conditions.delete') || $this->canDo->get('admin_fields_conditions.edit.created_by') || $this->canDo->get('admin_fields_conditions.edit.state') || $this->canDo->get('admin_fields_conditions.edit.created')) : ?> + canDo->get('admin_fields_conditions.edit.created_by') || $this->canDo->get('admin_fields_conditions.edit.created') || $this->canDo->get('admin_fields_conditions.edit.state') || ($this->canDo->get('admin_fields_conditions.delete') && $this->canDo->get('admin_fields_conditions.edit.state'))) : ?>
diff --git a/admin/views/admin_fields_relations/tmpl/edit.php b/admin/views/admin_fields_relations/tmpl/edit.php index 22cb39c09..9cdee6ac0 100644 --- a/admin/views/admin_fields_relations/tmpl/edit.php +++ b/admin/views/admin_fields_relations/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_fields_relationsTab'; ?> - canDo->get('admin_fields_relations.delete') || $this->canDo->get('admin_fields_relations.edit.created_by') || $this->canDo->get('admin_fields_relations.edit.state') || $this->canDo->get('admin_fields_relations.edit.created')) : ?> + canDo->get('admin_fields_relations.edit.created_by') || $this->canDo->get('admin_fields_relations.edit.created') || $this->canDo->get('admin_fields_relations.edit.state') || ($this->canDo->get('admin_fields_relations.delete') && $this->canDo->get('admin_fields_relations.edit.state'))) : ?>
diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index b9ff6d98b..da0706cbf 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -161,7 +161,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'admin_viewTab'; ?> - canDo->get('admin_view.delete') || $this->canDo->get('admin_view.edit.created_by') || $this->canDo->get('admin_view.edit.state') || $this->canDo->get('admin_view.edit.created')) : ?> + canDo->get('admin_view.edit.created_by') || $this->canDo->get('admin_view.edit.created') || $this->canDo->get('admin_view.edit.state') || ($this->canDo->get('admin_view.delete') && $this->canDo->get('admin_view.edit.state'))) : ?>
diff --git a/admin/views/class_extends/tmpl/edit.php b/admin/views/class_extends/tmpl/edit.php index f387ca558..8bbebc8a1 100644 --- a/admin/views/class_extends/tmpl/edit.php +++ b/admin/views/class_extends/tmpl/edit.php @@ -68,7 +68,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'class_extendsTab'; ?> - canDo->get('class_extends.delete') || $this->canDo->get('class_extends.edit.created_by') || $this->canDo->get('class_extends.edit.state') || $this->canDo->get('class_extends.edit.created')) : ?> + canDo->get('class_extends.edit.created_by') || $this->canDo->get('class_extends.edit.created') || $this->canDo->get('class_extends.edit.state') || ($this->canDo->get('class_extends.delete') && $this->canDo->get('class_extends.edit.state'))) : ?>
diff --git a/admin/views/class_method/tmpl/edit.php b/admin/views/class_method/tmpl/edit.php index 48cd43e95..05a1ed5c9 100644 --- a/admin/views/class_method/tmpl/edit.php +++ b/admin/views/class_method/tmpl/edit.php @@ -68,7 +68,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'class_methodTab'; ?> - canDo->get('class_method.delete') || $this->canDo->get('class_method.edit.created_by') || $this->canDo->get('class_method.edit.state') || $this->canDo->get('class_method.edit.created')) : ?> + canDo->get('class_method.edit.created_by') || $this->canDo->get('class_method.edit.created') || $this->canDo->get('class_method.edit.state') || ($this->canDo->get('class_method.delete') && $this->canDo->get('class_method.edit.state'))) : ?>
diff --git a/admin/views/class_property/tmpl/edit.php b/admin/views/class_property/tmpl/edit.php index f85a11225..c371b7f3d 100644 --- a/admin/views/class_property/tmpl/edit.php +++ b/admin/views/class_property/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'class_propertyTab'; ?> - canDo->get('class_property.delete') || $this->canDo->get('class_property.edit.created_by') || $this->canDo->get('class_property.edit.state') || $this->canDo->get('class_property.edit.created')) : ?> + canDo->get('class_property.edit.created_by') || $this->canDo->get('class_property.edit.created') || $this->canDo->get('class_property.edit.state') || ($this->canDo->get('class_property.delete') && $this->canDo->get('class_property.edit.state'))) : ?>
diff --git a/admin/views/component_admin_views/tmpl/edit.php b/admin/views/component_admin_views/tmpl/edit.php index b1164daa1..fcf93e100 100644 --- a/admin/views/component_admin_views/tmpl/edit.php +++ b/admin/views/component_admin_views/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_admin_viewsTab'; ?> - canDo->get('component_admin_views.delete') || $this->canDo->get('component_admin_views.edit.created_by') || $this->canDo->get('component_admin_views.edit.state') || $this->canDo->get('component_admin_views.edit.created')) : ?> + canDo->get('component_admin_views.edit.created_by') || $this->canDo->get('component_admin_views.edit.created') || $this->canDo->get('component_admin_views.edit.state') || ($this->canDo->get('component_admin_views.delete') && $this->canDo->get('component_admin_views.edit.state'))) : ?>
diff --git a/admin/views/component_config/tmpl/edit.php b/admin/views/component_config/tmpl/edit.php index 149c726fa..756745e9c 100644 --- a/admin/views/component_config/tmpl/edit.php +++ b/admin/views/component_config/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_configTab'; ?> - canDo->get('component_config.delete') || $this->canDo->get('component_config.edit.created_by') || $this->canDo->get('component_config.edit.state') || $this->canDo->get('component_config.edit.created')) : ?> + canDo->get('component_config.edit.created_by') || $this->canDo->get('component_config.edit.created') || $this->canDo->get('component_config.edit.state') || ($this->canDo->get('component_config.delete') && $this->canDo->get('component_config.edit.state'))) : ?>
diff --git a/admin/views/component_custom_admin_menus/tmpl/edit.php b/admin/views/component_custom_admin_menus/tmpl/edit.php index 9b15e7d9d..7edc56830 100644 --- a/admin/views/component_custom_admin_menus/tmpl/edit.php +++ b/admin/views/component_custom_admin_menus/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_custom_admin_menusTab'; ?> - canDo->get('component_custom_admin_menus.delete') || $this->canDo->get('component_custom_admin_menus.edit.created_by') || $this->canDo->get('component_custom_admin_menus.edit.state') || $this->canDo->get('component_custom_admin_menus.edit.created')) : ?> + canDo->get('component_custom_admin_menus.edit.created_by') || $this->canDo->get('component_custom_admin_menus.edit.created') || $this->canDo->get('component_custom_admin_menus.edit.state') || ($this->canDo->get('component_custom_admin_menus.delete') && $this->canDo->get('component_custom_admin_menus.edit.state'))) : ?>
diff --git a/admin/views/component_custom_admin_views/tmpl/edit.php b/admin/views/component_custom_admin_views/tmpl/edit.php index d773ec910..6e7aab4bc 100644 --- a/admin/views/component_custom_admin_views/tmpl/edit.php +++ b/admin/views/component_custom_admin_views/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_custom_admin_viewsTab'; ?> - canDo->get('component_custom_admin_views.delete') || $this->canDo->get('component_custom_admin_views.edit.created_by') || $this->canDo->get('component_custom_admin_views.edit.state') || $this->canDo->get('component_custom_admin_views.edit.created')) : ?> + canDo->get('component_custom_admin_views.edit.created_by') || $this->canDo->get('component_custom_admin_views.edit.created') || $this->canDo->get('component_custom_admin_views.edit.state') || ($this->canDo->get('component_custom_admin_views.delete') && $this->canDo->get('component_custom_admin_views.edit.state'))) : ?>
diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index 4ff5fbed3..3b737d6e8 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_dashboardTab'; ?> - canDo->get('component_dashboard.delete') || $this->canDo->get('component_dashboard.edit.created_by') || $this->canDo->get('component_dashboard.edit.state') || $this->canDo->get('component_dashboard.edit.created')) : ?> + canDo->get('component_dashboard.edit.created_by') || $this->canDo->get('component_dashboard.edit.created') || $this->canDo->get('component_dashboard.edit.state') || ($this->canDo->get('component_dashboard.delete') && $this->canDo->get('component_dashboard.edit.state'))) : ?>
diff --git a/admin/views/component_files_folders/tmpl/edit.php b/admin/views/component_files_folders/tmpl/edit.php index 541c619f2..f25b1e7fd 100644 --- a/admin/views/component_files_folders/tmpl/edit.php +++ b/admin/views/component_files_folders/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_files_foldersTab'; ?> - canDo->get('component_files_folders.delete') || $this->canDo->get('component_files_folders.edit.created_by') || $this->canDo->get('component_files_folders.edit.state') || $this->canDo->get('component_files_folders.edit.created')) : ?> + canDo->get('component_files_folders.edit.created_by') || $this->canDo->get('component_files_folders.edit.created') || $this->canDo->get('component_files_folders.edit.state') || ($this->canDo->get('component_files_folders.delete') && $this->canDo->get('component_files_folders.edit.state'))) : ?>
diff --git a/admin/views/component_modules/tmpl/edit.php b/admin/views/component_modules/tmpl/edit.php index 2c7c5c46c..c8b23313c 100644 --- a/admin/views/component_modules/tmpl/edit.php +++ b/admin/views/component_modules/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_modulesTab'; ?> - canDo->get('component_modules.delete') || $this->canDo->get('component_modules.edit.created_by') || $this->canDo->get('component_modules.edit.state') || $this->canDo->get('component_modules.edit.created')) : ?> + canDo->get('component_modules.edit.created_by') || $this->canDo->get('component_modules.edit.created') || $this->canDo->get('component_modules.edit.state') || ($this->canDo->get('component_modules.delete') && $this->canDo->get('component_modules.edit.state'))) : ?>
diff --git a/admin/views/component_mysql_tweaks/tmpl/edit.php b/admin/views/component_mysql_tweaks/tmpl/edit.php index 2381d0621..a04dcd019 100644 --- a/admin/views/component_mysql_tweaks/tmpl/edit.php +++ b/admin/views/component_mysql_tweaks/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_mysql_tweaksTab'; ?> - canDo->get('component_mysql_tweaks.delete') || $this->canDo->get('component_mysql_tweaks.edit.created_by') || $this->canDo->get('component_mysql_tweaks.edit.state') || $this->canDo->get('component_mysql_tweaks.edit.created')) : ?> + canDo->get('component_mysql_tweaks.edit.created_by') || $this->canDo->get('component_mysql_tweaks.edit.created') || $this->canDo->get('component_mysql_tweaks.edit.state') || ($this->canDo->get('component_mysql_tweaks.delete') && $this->canDo->get('component_mysql_tweaks.edit.state'))) : ?>
diff --git a/admin/views/component_placeholders/tmpl/edit.php b/admin/views/component_placeholders/tmpl/edit.php index c84fd9476..9776309e7 100644 --- a/admin/views/component_placeholders/tmpl/edit.php +++ b/admin/views/component_placeholders/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_placeholdersTab'; ?> - canDo->get('component_placeholders.delete') || $this->canDo->get('component_placeholders.edit.created_by') || $this->canDo->get('component_placeholders.edit.state') || $this->canDo->get('component_placeholders.edit.created')) : ?> + canDo->get('component_placeholders.edit.created_by') || $this->canDo->get('component_placeholders.edit.created') || $this->canDo->get('component_placeholders.edit.state') || ($this->canDo->get('component_placeholders.delete') && $this->canDo->get('component_placeholders.edit.state'))) : ?>
diff --git a/admin/views/component_plugins/tmpl/edit.php b/admin/views/component_plugins/tmpl/edit.php index b0b528c75..f14227200 100644 --- a/admin/views/component_plugins/tmpl/edit.php +++ b/admin/views/component_plugins/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_pluginsTab'; ?> - canDo->get('component_plugins.delete') || $this->canDo->get('component_plugins.edit.created_by') || $this->canDo->get('component_plugins.edit.state') || $this->canDo->get('component_plugins.edit.created')) : ?> + canDo->get('component_plugins.edit.created_by') || $this->canDo->get('component_plugins.edit.created') || $this->canDo->get('component_plugins.edit.state') || ($this->canDo->get('component_plugins.delete') && $this->canDo->get('component_plugins.edit.state'))) : ?>
diff --git a/admin/views/component_site_views/tmpl/edit.php b/admin/views/component_site_views/tmpl/edit.php index 7fa4efe80..3006ac614 100644 --- a/admin/views/component_site_views/tmpl/edit.php +++ b/admin/views/component_site_views/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_site_viewsTab'; ?> - canDo->get('component_site_views.delete') || $this->canDo->get('component_site_views.edit.created_by') || $this->canDo->get('component_site_views.edit.state') || $this->canDo->get('component_site_views.edit.created')) : ?> + canDo->get('component_site_views.edit.created_by') || $this->canDo->get('component_site_views.edit.created') || $this->canDo->get('component_site_views.edit.state') || ($this->canDo->get('component_site_views.delete') && $this->canDo->get('component_site_views.edit.state'))) : ?>
diff --git a/admin/views/component_updates/tmpl/edit.php b/admin/views/component_updates/tmpl/edit.php index 264094aae..998874f5b 100644 --- a/admin/views/component_updates/tmpl/edit.php +++ b/admin/views/component_updates/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'component_updatesTab'; ?> - canDo->get('component_updates.delete') || $this->canDo->get('component_updates.edit.created_by') || $this->canDo->get('component_updates.edit.state') || $this->canDo->get('component_updates.edit.created')) : ?> + canDo->get('component_updates.edit.created_by') || $this->canDo->get('component_updates.edit.created') || $this->canDo->get('component_updates.edit.state') || ($this->canDo->get('component_updates.delete') && $this->canDo->get('component_updates.edit.state'))) : ?>
diff --git a/admin/views/custom_admin_view/tmpl/edit.php b/admin/views/custom_admin_view/tmpl/edit.php index 3f50a5ce7..6571f0dd8 100644 --- a/admin/views/custom_admin_view/tmpl/edit.php +++ b/admin/views/custom_admin_view/tmpl/edit.php @@ -113,7 +113,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'custom_admin_viewTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/custom_code/tmpl/edit.php b/admin/views/custom_code/tmpl/edit.php index a75a87685..13e16aba5 100644 --- a/admin/views/custom_code/tmpl/edit.php +++ b/admin/views/custom_code/tmpl/edit.php @@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'custom_codeTab'; ?> - canDo->get('custom_code.delete') || $this->canDo->get('custom_code.edit.created_by') || $this->canDo->get('custom_code.edit.state') || $this->canDo->get('custom_code.edit.created')) : ?> + canDo->get('custom_code.edit.created_by') || $this->canDo->get('custom_code.edit.created') || $this->canDo->get('custom_code.edit.state') || ($this->canDo->get('custom_code.delete') && $this->canDo->get('custom_code.edit.state'))) : ?>
diff --git a/admin/views/dynamic_get/tmpl/edit.php b/admin/views/dynamic_get/tmpl/edit.php index f9a6f9576..24243052a 100644 --- a/admin/views/dynamic_get/tmpl/edit.php +++ b/admin/views/dynamic_get/tmpl/edit.php @@ -112,7 +112,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'dynamic_getTab'; ?> - canDo->get('dynamic_get.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('dynamic_get.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('dynamic_get.edit.state') || ($this->canDo->get('dynamic_get.delete') && $this->canDo->get('dynamic_get.edit.state'))) : ?>
diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 9aa9bb044..30641b09a 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -100,7 +100,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'fieldTab'; ?> - canDo->get('field.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('field.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('field.edit.state') || ($this->canDo->get('field.delete') && $this->canDo->get('field.edit.state'))) : ?>
diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 5a0419d1c..2096e9020 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -92,7 +92,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'fieldtypeTab'; ?> - canDo->get('fieldtype.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('fieldtype.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('fieldtype.edit.state') || ($this->canDo->get('fieldtype.delete') && $this->canDo->get('fieldtype.edit.state'))) : ?>
diff --git a/admin/views/help_document/tmpl/edit.php b/admin/views/help_document/tmpl/edit.php index 27c1b97d4..2326b63c7 100644 --- a/admin/views/help_document/tmpl/edit.php +++ b/admin/views/help_document/tmpl/edit.php @@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'help_documentTab'; ?> - canDo->get('help_document.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('help_document.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('help_document.edit.state') || ($this->canDo->get('help_document.delete') && $this->canDo->get('help_document.edit.state'))) : ?>
diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 8dd5f6710..a4c3cf7e0 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -178,7 +178,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_componentTab'; ?> - canDo->get('joomla_component.delete') || $this->canDo->get('joomla_component.edit.created_by') || $this->canDo->get('joomla_component.edit.state') || $this->canDo->get('joomla_component.edit.created')) : ?> + canDo->get('joomla_component.edit.created_by') || $this->canDo->get('joomla_component.edit.created') || $this->canDo->get('joomla_component.edit.state') || ($this->canDo->get('joomla_component.delete') && $this->canDo->get('joomla_component.edit.state'))) : ?>
diff --git a/admin/views/joomla_module/tmpl/edit.php b/admin/views/joomla_module/tmpl/edit.php index 380a7f650..947b7d1f2 100644 --- a/admin/views/joomla_module/tmpl/edit.php +++ b/admin/views/joomla_module/tmpl/edit.php @@ -147,7 +147,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_moduleTab'; ?> - canDo->get('joomla_module.delete') || $this->canDo->get('joomla_module.edit.created_by') || $this->canDo->get('joomla_module.edit.state') || $this->canDo->get('joomla_module.edit.created')) : ?> + canDo->get('joomla_module.edit.created_by') || $this->canDo->get('joomla_module.edit.created') || $this->canDo->get('joomla_module.edit.state') || ($this->canDo->get('joomla_module.delete') && $this->canDo->get('joomla_module.edit.state'))) : ?>
diff --git a/admin/views/joomla_module_files_folders_urls/tmpl/edit.php b/admin/views/joomla_module_files_folders_urls/tmpl/edit.php index 8969bf127..44f8f487f 100644 --- a/admin/views/joomla_module_files_folders_urls/tmpl/edit.php +++ b/admin/views/joomla_module_files_folders_urls/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_module_files_folders_urlsTab'; ?> - canDo->get('joomla_module_files_folders_urls.delete') || $this->canDo->get('joomla_module_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_module_files_folders_urls.edit.state') || $this->canDo->get('joomla_module_files_folders_urls.edit.created')) : ?> + canDo->get('joomla_module_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_module_files_folders_urls.edit.created') || $this->canDo->get('joomla_module_files_folders_urls.edit.state') || ($this->canDo->get('joomla_module_files_folders_urls.delete') && $this->canDo->get('joomla_module_files_folders_urls.edit.state'))) : ?>
diff --git a/admin/views/joomla_module_updates/tmpl/edit.php b/admin/views/joomla_module_updates/tmpl/edit.php index 7b20ce513..63a069319 100644 --- a/admin/views/joomla_module_updates/tmpl/edit.php +++ b/admin/views/joomla_module_updates/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_module_updatesTab'; ?> - canDo->get('joomla_module_updates.delete') || $this->canDo->get('joomla_module_updates.edit.created_by') || $this->canDo->get('joomla_module_updates.edit.state') || $this->canDo->get('joomla_module_updates.edit.created')) : ?> + canDo->get('joomla_module_updates.edit.created_by') || $this->canDo->get('joomla_module_updates.edit.created') || $this->canDo->get('joomla_module_updates.edit.state') || ($this->canDo->get('joomla_module_updates.delete') && $this->canDo->get('joomla_module_updates.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin/tmpl/edit.php b/admin/views/joomla_plugin/tmpl/edit.php index 2a13e72dc..f173a8107 100644 --- a/admin/views/joomla_plugin/tmpl/edit.php +++ b/admin/views/joomla_plugin/tmpl/edit.php @@ -115,7 +115,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_pluginTab'; ?> - canDo->get('joomla_plugin.delete') || $this->canDo->get('joomla_plugin.edit.created_by') || $this->canDo->get('joomla_plugin.edit.state') || $this->canDo->get('joomla_plugin.edit.created')) : ?> + canDo->get('joomla_plugin.edit.created_by') || $this->canDo->get('joomla_plugin.edit.created') || $this->canDo->get('joomla_plugin.edit.state') || ($this->canDo->get('joomla_plugin.delete') && $this->canDo->get('joomla_plugin.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php b/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php index 49d9563b5..f2df0079b 100644 --- a/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php +++ b/admin/views/joomla_plugin_files_folders_urls/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_plugin_files_folders_urlsTab'; ?> - canDo->get('joomla_plugin_files_folders_urls.delete') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.state') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.created')) : ?> + canDo->get('joomla_plugin_files_folders_urls.edit.created_by') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.created') || $this->canDo->get('joomla_plugin_files_folders_urls.edit.state') || ($this->canDo->get('joomla_plugin_files_folders_urls.delete') && $this->canDo->get('joomla_plugin_files_folders_urls.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin_group/tmpl/edit.php b/admin/views/joomla_plugin_group/tmpl/edit.php index 79a19ad27..d5d007869 100644 --- a/admin/views/joomla_plugin_group/tmpl/edit.php +++ b/admin/views/joomla_plugin_group/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_plugin_groupTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/joomla_plugin_updates/tmpl/edit.php b/admin/views/joomla_plugin_updates/tmpl/edit.php index 7df9551e5..32b180cf0 100644 --- a/admin/views/joomla_plugin_updates/tmpl/edit.php +++ b/admin/views/joomla_plugin_updates/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'joomla_plugin_updatesTab'; ?> - canDo->get('joomla_plugin_updates.delete') || $this->canDo->get('joomla_plugin_updates.edit.created_by') || $this->canDo->get('joomla_plugin_updates.edit.state') || $this->canDo->get('joomla_plugin_updates.edit.created')) : ?> + canDo->get('joomla_plugin_updates.edit.created_by') || $this->canDo->get('joomla_plugin_updates.edit.created') || $this->canDo->get('joomla_plugin_updates.edit.state') || ($this->canDo->get('joomla_plugin_updates.delete') && $this->canDo->get('joomla_plugin_updates.edit.state'))) : ?>
diff --git a/admin/views/language/tmpl/edit.php b/admin/views/language/tmpl/edit.php index 6b770c37d..bacaef603 100644 --- a/admin/views/language/tmpl/edit.php +++ b/admin/views/language/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'languageTab'; ?> - canDo->get('language.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('language.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('language.edit.state') || ($this->canDo->get('language.delete') && $this->canDo->get('language.edit.state'))) : ?>
diff --git a/admin/views/language_translation/tmpl/edit.php b/admin/views/language_translation/tmpl/edit.php index e4ee02085..738c8cdd1 100644 --- a/admin/views/language_translation/tmpl/edit.php +++ b/admin/views/language_translation/tmpl/edit.php @@ -62,7 +62,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'language_translationTab'; ?> - canDo->get('language_translation.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('language_translation.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('language_translation.edit.state') || ($this->canDo->get('language_translation.delete') && $this->canDo->get('language_translation.edit.state'))) : ?>
diff --git a/admin/views/layout/tmpl/edit.php b/admin/views/layout/tmpl/edit.php index 452464484..66561f86c 100644 --- a/admin/views/layout/tmpl/edit.php +++ b/admin/views/layout/tmpl/edit.php @@ -79,7 +79,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'layoutTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/library/tmpl/edit.php b/admin/views/library/tmpl/edit.php index 586572975..1d7cb8eab 100644 --- a/admin/views/library/tmpl/edit.php +++ b/admin/views/library/tmpl/edit.php @@ -99,7 +99,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'libraryTab'; ?> - canDo->get('library.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('library.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('library.edit.state') || ($this->canDo->get('library.delete') && $this->canDo->get('library.edit.state'))) : ?>
diff --git a/admin/views/library_config/tmpl/edit.php b/admin/views/library_config/tmpl/edit.php index 5e6310b08..74fede23e 100644 --- a/admin/views/library_config/tmpl/edit.php +++ b/admin/views/library_config/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'library_configTab'; ?> - canDo->get('library_config.delete') || $this->canDo->get('library_config.edit.created_by') || $this->canDo->get('library_config.edit.state') || $this->canDo->get('library_config.edit.created')) : ?> + canDo->get('library_config.edit.created_by') || $this->canDo->get('library_config.edit.created') || $this->canDo->get('library_config.edit.state') || ($this->canDo->get('library_config.delete') && $this->canDo->get('library_config.edit.state'))) : ?>
diff --git a/admin/views/library_files_folders_urls/tmpl/edit.php b/admin/views/library_files_folders_urls/tmpl/edit.php index c762969d7..604258b5c 100644 --- a/admin/views/library_files_folders_urls/tmpl/edit.php +++ b/admin/views/library_files_folders_urls/tmpl/edit.php @@ -73,7 +73,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'library_files_folders_urlsTab'; ?> - canDo->get('library_files_folders_urls.delete') || $this->canDo->get('library_files_folders_urls.edit.created_by') || $this->canDo->get('library_files_folders_urls.edit.state') || $this->canDo->get('library_files_folders_urls.edit.created')) : ?> + canDo->get('library_files_folders_urls.edit.created_by') || $this->canDo->get('library_files_folders_urls.edit.created') || $this->canDo->get('library_files_folders_urls.edit.state') || ($this->canDo->get('library_files_folders_urls.delete') && $this->canDo->get('library_files_folders_urls.edit.state'))) : ?>
diff --git a/admin/views/placeholder/tmpl/edit.php b/admin/views/placeholder/tmpl/edit.php index 7280fe8f3..090122636 100644 --- a/admin/views/placeholder/tmpl/edit.php +++ b/admin/views/placeholder/tmpl/edit.php @@ -68,7 +68,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'placeholderTab'; ?> - canDo->get('placeholder.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('placeholder.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('placeholder.edit.state') || ($this->canDo->get('placeholder.delete') && $this->canDo->get('placeholder.edit.state'))) : ?>
diff --git a/admin/views/server/tmpl/edit.php b/admin/views/server/tmpl/edit.php index 0de7747cf..f2606fc75 100644 --- a/admin/views/server/tmpl/edit.php +++ b/admin/views/server/tmpl/edit.php @@ -81,7 +81,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'serverTab'; ?> - canDo->get('server.delete') || $this->canDo->get('server.edit.created_by') || $this->canDo->get('server.edit.state') || $this->canDo->get('server.edit.created')) : ?> + canDo->get('server.edit.created_by') || $this->canDo->get('server.edit.created') || $this->canDo->get('server.edit.state') || ($this->canDo->get('server.delete') && $this->canDo->get('server.edit.state'))) : ?>
diff --git a/admin/views/site_view/tmpl/edit.php b/admin/views/site_view/tmpl/edit.php index 5ab65e00e..60a99d2e2 100644 --- a/admin/views/site_view/tmpl/edit.php +++ b/admin/views/site_view/tmpl/edit.php @@ -116,7 +116,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'site_viewTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/snippet/tmpl/edit.php b/admin/views/snippet/tmpl/edit.php index aa1d14287..3ec825be8 100644 --- a/admin/views/snippet/tmpl/edit.php +++ b/admin/views/snippet/tmpl/edit.php @@ -58,7 +58,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'snippetTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/snippet_type/tmpl/edit.php b/admin/views/snippet_type/tmpl/edit.php index 585af49e3..c42121ab3 100644 --- a/admin/views/snippet_type/tmpl/edit.php +++ b/admin/views/snippet_type/tmpl/edit.php @@ -63,7 +63,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'snippet_typeTab'; ?> - canDo->get('snippet_type.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('snippet_type.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('snippet_type.edit.state') || ($this->canDo->get('snippet_type.delete') && $this->canDo->get('snippet_type.edit.state'))) : ?>
diff --git a/admin/views/template/tmpl/edit.php b/admin/views/template/tmpl/edit.php index b0494f9cc..8f7ee22d0 100644 --- a/admin/views/template/tmpl/edit.php +++ b/admin/views/template/tmpl/edit.php @@ -79,7 +79,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'templateTab'; ?> - canDo->get('core.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('core.edit.state') || ($this->canDo->get('core.delete') && $this->canDo->get('core.edit.state'))) : ?>
diff --git a/admin/views/validation_rule/tmpl/edit.php b/admin/views/validation_rule/tmpl/edit.php index 9e7010481..1040aef74 100644 --- a/admin/views/validation_rule/tmpl/edit.php +++ b/admin/views/validation_rule/tmpl/edit.php @@ -69,7 +69,7 @@ $componentParams = $this->params; // will be removed just use $this->params inst tab_name = 'validation_ruleTab'; ?> - canDo->get('validation_rule.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('validation_rule.edit.state') || $this->canDo->get('core.edit.created')) : ?> + canDo->get('core.edit.created_by') || $this->canDo->get('core.edit.created') || $this->canDo->get('validation_rule.edit.state') || ($this->canDo->get('validation_rule.delete') && $this->canDo->get('validation_rule.edit.state'))) : ?>
diff --git a/componentbuilder.xml b/componentbuilder.xml index 43dbca171..4c3480fa0 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 1st June, 2020 + 24th June, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 4f30b3419..0bb18a7b9 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -13,6 +13,7 @@ defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Language\Language; +use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; @@ -5784,6 +5785,18 @@ abstract class ComponentbuilderHelper return date('Y' . $spacer . 'm' . $spacer . 'd', $date); } + /** + * set the date as 03/05/2004 + */ + public static function setDayMonthYear($date, $spacer = '/') + { + if (!self::isValidTimeStamp($date)) + { + $date = strtotime($date); + } + return date('d' . $spacer . 'm' . $spacer . 'Y', $date); + } + /** * Check if string is a valid time stamp */ -- 2.40.1 From 354565d96a26892dfbe66776747f90c69471ab96 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 7 Jul 2020 17:13:04 +0200 Subject: [PATCH 05/14] Major improment to user helper methods. Fixed custom field building options to allow options to be set. Fixed gh-569 to use correct paths in module custom fields and rules. Imporved the fancy date helper methods. Added the new Text::_() languange string search for language strings. Add the option to add header custom code to custom fields. --- README.md | 4 +- admin/README.txt | 4 +- admin/compiler/joomla_3/JFormFieldCustom.php | 4 +- admin/helpers/compiler/a_Get.php | 11 +- admin/helpers/compiler/c_Fields.php | 627 ++++++++++++- admin/helpers/compiler/e_Interpretation.php | 202 +++-- admin/helpers/componentbuilder.php | 132 ++- admin/layouts/fieldtype/fields_fullwidth.php | 2 +- .../server/linked_components_fullwidth.php | 2 +- admin/models/fieldtype.php | 12 +- admin/models/forms/field.js | 417 +++------ admin/models/forms/fieldtype.js | 856 +++++++++--------- admin/models/forms/help_document.js | 306 +++---- admin/models/forms/server.js | 556 ++++++------ admin/models/server.php | 2 +- admin/sql/install.mysql.utf8.sql | 8 +- admin/views/field/tmpl/edit.php | 160 +--- admin/views/fieldtype/tmpl/edit.php | 378 ++++---- admin/views/fieldtype/view.html.php | 2 +- admin/views/help_document/tmpl/edit.php | 90 +- admin/views/server/tmpl/edit.php | 86 +- admin/views/server/view.html.php | 2 +- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 132 ++- 24 files changed, 2242 insertions(+), 1755 deletions(-) diff --git a/README.md b/README.md index 8ab0e94ec..f80f39c77 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*: 24th June, 2020 ++ *Last Build*: 7th July, 2020 + *Version*: 2.11.2 + *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*: **282642** ++ *Line count*: **282473** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index 8ab0e94ec..f80f39c77 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*: 24th June, 2020 ++ *Last Build*: 7th July, 2020 + *Version*: 2.11.2 + *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*: **282642** ++ *Line count*: **282473** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/compiler/joomla_3/JFormFieldCustom.php b/admin/compiler/joomla_3/JFormFieldCustom.php index 85aa5469e..6ab1c0ffb 100644 --- a/admin/compiler/joomla_3/JFormFieldCustom.php +++ b/admin/compiler/joomla_3/JFormFieldCustom.php @@ -17,9 +17,7 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -// import the ###JFORM_extends### field type -jimport('joomla.form.helper'); -JFormHelper::loadFieldClass('###JFORM_extends###'); +###JFORM_TYPE_HEADER### /** * ###Type### Form Field class for the ###Component### component diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 3f3ffa46d..5d618a1a8 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -322,8 +322,8 @@ class Get = array( 'Joomla' . '.JText._(', 'JText:' . ':script(', - 'JText:' . ':_(', - 'JText:' . ':sprintf(', + 'Text:' . ':_(', // namespace and J version will be found + 'Text:' . ':sprintf(', // namespace and J version will be found 'JustTEXT:' . ':_(' ); @@ -1201,7 +1201,7 @@ class Get array(&$this->componentContext, &$component) ); - // set upater + // set updater $updater = array( 'unique' => array( 'addadmin_views' => array('table' => 'component_admin_views', @@ -1281,7 +1281,8 @@ class Get ); // set the add targets - $addArrayF = array('files' => 'files', 'folders' => 'folders', + $addArrayF = array('files' => 'files', + 'folders' => 'folders', 'filesfullpath' => 'files', 'foldersfullpath' => 'folders'); foreach ($addArrayF as $addTarget => $targetHere) @@ -10370,7 +10371,7 @@ class Get $locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," . PHP_EOL . $this->_t(2) . "'" . wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) . - "'));"; + "'))"; } // update the script return $this->setPlaceholders($script, $locker); diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index bb99927e2..e70dc64d8 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2328,6 +2328,7 @@ class Fields extends Structure . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->"; $field .= PHP_EOL . $this->_t(2) . $taber . " $value) { if ($property != 'option') @@ -2335,8 +2336,274 @@ class Fields extends Structure $field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . $property . '="' . $value . '"'; } + elseif ($property === 'option') + { + $optionSet = ''; + if (strtolower($typeName) === 'groupedlist' + && strpos( + $value, ',' + ) !== false + && strpos($value, '@@') !== false) + { + // reset the group temp arrays + $groups_ = array(); + $grouped_ = array('group' => array(), + 'option' => array()); + $order_ = array(); + // mulitpal options + $options = explode(',', $value); + foreach ($options as $option) + { + if (strpos($option, '@@') !== false) + { + // set the group label + $valueKeyArray = explode('@@', $option); + if (count((array) $valueKeyArray) == 2) + { + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $valueKeyArray[0], true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, + $valueKeyArray[0] + ); + // now add group label + $groups_[$valueKeyArray[1]] = PHP_EOL + . $this->_t(1) . $taber . $this->_t(2) + . ''; + // set order + $order_['group' . $valueKeyArray[1]] + = $valueKeyArray[1]; + } + } + elseif (strpos($option, '|') !== false) + { + // has other value then text + $valueKeyArray = explode('|', $option); + if (count((array) $valueKeyArray) == 3) + { + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $valueKeyArray[1], true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, + $valueKeyArray[1] + ); + // now add to option set + $grouped_['group'][$valueKeyArray[2]][] + = PHP_EOL . $this->_t(1) . $taber + . $this->_t(3) . ''; + $optionArray[$valueKeyArray[0]] + = $langValue; + // set order + $order_['group' . $valueKeyArray[2]] + = $valueKeyArray[2]; + } + else + { + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $valueKeyArray[1], true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, + $valueKeyArray[1] + ); + // now add to option set + $grouped_['option'][$valueKeyArray[0]] + = PHP_EOL . $this->_t(1) . $taber + . $this->_t(2) . ''; + $optionArray[$valueKeyArray[0]] + = $langValue; + // set order + $order_['option' . $valueKeyArray[0]] + = $valueKeyArray[0]; + } + } + else + { + // text is also the value + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $option, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $option + ); + // now add to option set + $grouped_['option'][$option] = PHP_EOL + . $this->_t(1) . $taber . $this->_t(2) + . ''; + $optionArray[$option] = $langValue; + // set order + $order_['option' . $option] = $option; + } + } + // now build the groups + foreach ($order_ as $pointer_ => $_id) + { + // load the default key + $key_ = 'group'; + if (strpos($pointer_, 'option') !== false) + { + // load the option field + $key_ = 'option'; + } + // check if this is a group loader + if ('group' === $key_ && isset($groups_[$_id]) + && isset($grouped_[$key_][$_id]) + && ComponentbuilderHelper::checkArray( + $grouped_[$key_][$_id] + )) + { + // set group label + $optionSet .= $groups_[$_id]; + foreach ($grouped_[$key_][$_id] as $option_) + { + $optionSet .= $option_; + } + unset($groups_[$_id]); + unset($grouped_[$key_][$_id]); + // close the group + $optionSet .= PHP_EOL . $this->_t(1) . $taber + . $this->_t(2) . ''; + } + elseif (isset($grouped_[$key_][$_id]) + && ComponentbuilderHelper::checkString( + $grouped_[$key_][$_id] + )) + { + $optionSet .= $grouped_[$key_][$_id]; + } + } + } + elseif (strpos($value, ',') !== false) + { + // mulitpal options + $options = explode(',', $value); + foreach ($options as $option) + { + if (strpos($option, '|') !== false) + { + // has other value then text + list($v, $t) = explode('|', $option); + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $t, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $t + ); + // now add to option set + $optionSet .= PHP_EOL . $this->_t(1) + . $taber . $this->_t(2) . ''; + $optionArray[$v] = $langValue; + } + else + { + // text is also the value + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $option, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $option + ); + // now add to option set + $optionSet .= PHP_EOL . $this->_t(2) + . $taber . $this->_t(1) . ''; + $optionArray[$option] = $langValue; + } + } + } + else + { + // one option + if (strpos($value, '|') !== false) + { + // has other value then text + list($v, $t) = explode('|', $value); + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $t, true + ); + // add to lang array + $this->setLangContent($this->lang, $langValue, $t); + // now add to option set + $optionSet .= PHP_EOL . $this->_t(2) . $taber + . $this->_t(1) . ''; + $optionArray[$v] = $langValue; + } + else + { + // text is also the value + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $value, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $value + ); + // now add to option set + $optionSet .= PHP_EOL . $this->_t(2) + . $taber . $this->_t(1) . ''; + $optionArray[$value] = $langValue; + } + } + } + } + // if options were found + if (ComponentbuilderHelper::checkString($optionSet)) + { + $field .= '>'; + $field .= PHP_EOL . $this->_t(3) . $taber . ""; + $field .= $optionSet; + $field .= PHP_EOL . $this->_t(2) . $taber . ""; + } + // if no options found and must have a list of options + elseif (ComponentbuilderHelper::fieldCheck($typeName, 'list')) + { + $optionArray = false; + $field .= PHP_EOL . $this->_t(2) . $taber . "/>"; + $field .= PHP_EOL . $this->_t(2) . $taber . "" + . PHP_EOL; + } + else + { + $optionArray = false; + $field .= PHP_EOL . $this->_t(2) . $taber . "/>"; } - $field .= PHP_EOL . $this->_t(2) . $taber . "/>"; // incase the field is in the config and has not been set if ('config' === $view_name_single && 'configs' === $view_name_list || (strpos($view_name_single, 'P|uG!n') !== false @@ -3083,6 +3350,244 @@ class Fields extends Structure { $field->fieldXML->addAttribute($property, $value); } + elseif ($property === 'option') + { + ComponentbuilderHelper::xmlComment( + $field->fieldXML, + $this->setLine(__LINE__) . " Option Set." + ); + if (strtolower($typeName) === 'groupedlist' + && strpos( + $value, ',' + ) !== false + && strpos($value, '@@') !== false) + { + // reset the group temp arrays + $groups_ = array(); + $grouped_ = array('group' => array(), + 'option' => array()); + $order_ = array(); + // mulitpal options + $options = explode(',', $value); + foreach ($options as $option) + { + if (strpos($option, '@@') !== false) + { + // set the group label + $valueKeyArray = explode('@@', $option); + if (count((array) $valueKeyArray) == 2) + { + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $valueKeyArray[0], true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, + $valueKeyArray[0] + ); + // now add group label + $groups_[$valueKeyArray[1]] = $langValue; + // set order + $order_['group' . $valueKeyArray[1]] + = $valueKeyArray[1]; + } + } + elseif (strpos($option, '|') !== false) + { + // has other value then text + $valueKeyArray = explode('|', $option); + if (count((array) $valueKeyArray) == 3) + { + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $valueKeyArray[1], true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, + $valueKeyArray[1] + ); + // now add to option set + $grouped_['group'][$valueKeyArray[2]][] + = array('value' => $valueKeyArray[0], + 'text' => $langValue); + $optionArray[$valueKeyArray[0]] + = $langValue; + // set order + $order_['group' . $valueKeyArray[2]] + = $valueKeyArray[2]; + } + else + { + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $valueKeyArray[1], true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, + $valueKeyArray[1] + ); + // now add to option set + $grouped_['option'][$valueKeyArray[0]] + = array('value' => $valueKeyArray[0], + 'text' => $langValue); + $optionArray[$valueKeyArray[0]] + = $langValue; + // set order + $order_['option' . $valueKeyArray[0]] + = $valueKeyArray[0]; + } + } + else + { + // text is also the value + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $option, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $option + ); + // now add to option set + $grouped_['option'][$option] + = array('value' => $option, + 'text' => $langValue); + $optionArray[$option] = $langValue; + // set order + $order_['option' . $option] = $option; + } + } + // now build the groups + foreach ($order_ as $pointer_ => $_id) + { + // load the default key + $key_ = 'group'; + if (strpos($pointer_, 'option') !== false) + { + // load the option field + $key_ = 'option'; + } + // check if this is a group loader + if ('group' === $key_ && isset($groups_[$_id]) + && isset($grouped_[$key_][$_id]) + && ComponentbuilderHelper::checkArray( + $grouped_[$key_][$_id] + )) + { + // set group label + $groupXML = $field->fieldXML->addChild('group'); + $groupXML->addAttribute( + 'label', $groups_[$_id] + ); + + foreach ($grouped_[$key_][$_id] as $option_) + { + $groupOptionXML = $groupXML->addChild( + 'option' + ); + $groupOptionXML->addAttribute( + 'value', $option_['value'] + ); + $groupOptionXML[] = $option_['text']; + } + unset($groups_[$_id]); + unset($grouped_[$key_][$_id]); + } + elseif (isset($grouped_[$key_][$_id]) + && ComponentbuilderHelper::checkString( + $grouped_[$key_][$_id] + )) + { + $optionXML = $field->fieldXML->addChild( + 'option' + ); + $optionXML->addAttribute( + 'value', $grouped_[$key_][$_id]['value'] + ); + $optionXML[] = $grouped_[$key_][$_id]['text']; + } + } + } + elseif (strpos($value, ',') !== false) + { + // mulitpal options + $options = explode(',', $value); + foreach ($options as $option) + { + $optionXML = $field->fieldXML->addChild('option'); + if (strpos($option, '|') !== false) + { + // has other value then text + list($v, $t) = explode('|', $option); + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $t, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $t + ); + // now add to option set + $optionXML->addAttribute('value', $v); + $optionArray[$v] = $langValue; + } + else + { + // text is also the value + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $option, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $option + ); + // now add to option set + $optionXML->addAttribute('value', $option); + $optionArray[$option] = $langValue; + } + $optionXML[] = $langValue; + } + } + else + { + // one option + $optionXML = $field->fieldXML->addChild('option'); + if (strpos($value, '|') !== false) + { + // has other value then text + list($v, $t) = explode('|', $value); + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $t, true + ); + // add to lang array + $this->setLangContent($this->lang, $langValue, $t); + // now add to option set + $optionXML->addAttribute('value', $v); + $optionArray[$v] = $langValue; + } + else + { + // text is also the value + $langValue = $langView . '_' + . ComponentbuilderHelper::safeFieldName( + $value, true + ); + // add to lang array + $this->setLangContent( + $this->lang, $langValue, $value + ); + // now add to option set + $optionXML->addAttribute('value', $value); + $optionArray[$value] = $langValue; + } + $optionXML[] = $langValue; + } + } } // incase the field is in the config and has not been set (or is part of a plugin or module) if (('config' === $view_name_single @@ -4149,9 +4654,10 @@ class Fields extends Structure if ($target_view !== $otherView) { $target_extension = trim(explode('.', $_extension)[0]); - $correction = $target_extension . '.' . $otherView; + $correction = $target_extension . '.' . $otherView; $this->app->enqueueMessage( - JText::sprintf('

Category targeting view mismatch

+ JText::sprintf( + '

Category targeting view mismatch

The category field in (%s) admin view has a mismatching target view.
To correct the mismatch, the extension value %s in the @@ -4160,7 +4666,10 @@ class Fields extends Structure best category integration with Joomla.
Please watch this tutorial before proceeding!!!, - code fix

', $field['field'], $view_name_single, $_extension, $field['field'], $correction), 'Error' + code fix

', + $field['field'], $view_name_single, $_extension, + $field['field'], $correction + ), 'Error' ); } } @@ -4369,15 +4878,15 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform')) { - $this->filterBuilder[$view_name_list][] = array('type' => $typeName, - 'code' => $name, - 'lang' => $listLangName, - 'database' => $view_name_single, - 'function' => ComponentbuilderHelper::safeString( + $this->filterBuilder[$view_name_list][] = array('type' => $typeName, + 'code' => $name, + 'lang' => $listLangName, + 'database' => $view_name_single, + 'function' => ComponentbuilderHelper::safeString( $name, 'F' ), - 'custom' => $custom, - 'options' => $options); + 'custom' => $custom, + 'options' => $options); } // build the layout @@ -4442,21 +4951,21 @@ class Fields extends Structure ); // set the [[[PLACEHOLDER]]] options $replace = array( - $this->bbb . 'JPREFIX' . $this->ddd => $jprefix, + $this->bbb . 'JPREFIX' . $this->ddd => $jprefix, $this->bbb . 'TABLE' - . $this->ddd => $data['custom']['table'], + . $this->ddd => $data['custom']['table'], $this->bbb . 'ID' - . $this->ddd => $data['custom']['id'], + . $this->ddd => $data['custom']['id'], $this->bbb . 'TEXT' - . $this->ddd => $data['custom']['text'], - $this->bbb . 'CODE_TEXT' . $this->ddd => $data['code'] . '_' + . $this->ddd => $data['custom']['text'], + $this->bbb . 'CODE_TEXT' . $this->ddd => $data['code'] . '_' . $data['custom']['text'], - $this->bbb . 'CODE' . $this->ddd => $data['code'], - $this->bbb . 'view_type' . $this->ddd => $view_name_single + $this->bbb . 'CODE' . $this->ddd => $data['code'], + $this->bbb . 'view_type' . $this->ddd => $view_name_single . '_' . $data['type'], - $this->bbb . 'type' . $this->ddd => $data['type'], + $this->bbb . 'type' . $this->ddd => $data['type'], $this->bbb . 'com_component' - . $this->ddd => (isset($data['custom']['component']) + . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString( $data['custom']['component'] )) ? ComponentbuilderHelper::safeString( @@ -4464,19 +4973,19 @@ class Fields extends Structure ) : 'com_' . $this->componentCodeName, // set the generic values $this->bbb . 'component' - . $this->ddd => $this->componentCodeName, + . $this->ddd => $this->componentCodeName, $this->bbb . 'Component' - . $this->ddd => $this->fileContentStatic[$this->hhh + . $this->ddd => $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->bbb . 'view' - . $this->ddd => (isset($data['custom']['view']) + . $this->ddd => (isset($data['custom']['view']) && ComponentbuilderHelper::checkString( $data['custom']['view'] )) ? ComponentbuilderHelper::safeString( $data['custom']['view'] ) : $view_name_single, $this->bbb . 'views' - . $this->ddd => (isset($data['custom']['views']) + . $this->ddd => (isset($data['custom']['views']) && ComponentbuilderHelper::checkString( $data['custom']['views'] )) ? ComponentbuilderHelper::safeString( @@ -4544,12 +5053,21 @@ class Fields extends Structure $this->buildDynamique( $target, 'fieldcustom', $data['custom']['type'] ); + // get the extends name + $JFORM_extends = ComponentbuilderHelper::safeString( + $data['custom']['extends'] + ); + // JFORM_TYPE_HEADER <<>> + $add_default_header = true; + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' . $this->hhh] + = "//" . $this->setLine( + __LINE__ + ) . " Import the " . $JFORM_extends . " field type classes needed"; // JFORM_extens <<>> $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'JFORM_extends' . $this->hhh] - = ComponentbuilderHelper::safeString( - $data['custom']['extends'] - ); + = $JFORM_extends; // JFORM_EXTENDS <<>> $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'JFORM_EXTENDS' . $this->hhh] @@ -4582,15 +5100,56 @@ class Fields extends Structure ); } } - // JFORM_TYPE_PHP <<>> - $this->fileContentDynamic['customfield_' - . $data['type']][$this->hhh . 'JFORM_TYPE_PHP' - . $this->hhh] - .= PHP_EOL . $this->setPlaceholders( - $phpBucket, $replace - ); + // check if this is header text + if('HEADER' === $x) + { + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' + . $this->hhh] + .= PHP_EOL . $this->setPlaceholders( + $phpBucket, $replace + ); + // stop default headers from loading + $add_default_header = false; + } + else + { + // JFORM_TYPE_PHP <<>> + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_PHP' + . $this->hhh] + .= PHP_EOL . $this->setPlaceholders( + $phpBucket, $replace + ); + } } } + // check if we should add default header + if ($add_default_header) + { + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' + . $this->hhh] + .= PHP_EOL . "jimport('joomla.form.helper');"; + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' + . $this->hhh] + .= PHP_EOL . "JFormHelper::loadFieldClass('" + . $JFORM_extends . "');"; + } + // check the the JFormHelper::loadFieldClass(..) was set + elseif (strpos( + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' + . $this->hhh], 'JFormHelper::loadFieldClass(' + ) === false) + { + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' + . $this->hhh] + .= PHP_EOL . "JFormHelper::loadFieldClass('" + . $JFORM_extends . "');"; + } } else { diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 14f012682..c1bd7ea1e 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1849,9 +1849,20 @@ class Interpretation extends Fields $method = array(); $method[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**"; $method[] = $this->_t(1) . " * Greate user and update given table"; + $method[] = $this->_t(1) . " *"; + $method[] = $this->_t(1) . " * @param array \$credentials Array('name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string)"; + $method[] = $this->_t(1) . " * @param int \$autologin"; + $method[] = $this->_t(1) . " * @param array \$params Array('useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int)"; + $method[] = $this->_t(1) . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration"; + $method[] = $this->_t(1) . " *"; + $method[] = $this->_t(1) . " * @return int|Error User ID on success, or an error."; $method[] = $this->_t(1) . " */"; $method[] = $this->_t(1) - . "public static function createUser(\$new)"; + . "public static function createUser(\$credentials, \$autologin = 0,"; + $method[] = $this->_t(2) . "\$params = array("; + $method[] = $this->_t(3) . "'useractivation' => 0, 'sendpassword' => 1"; + $method[] = $this->_t(2) . "), \$mode = 1"; + $method[] = $this->_t(1) . ")"; $method[] = $this->_t(1) . "{"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " load the user component language files if there is an error."; @@ -1864,75 +1875,144 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " load the user regestration model"; - $method[] = $this->_t(2) - . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');"; - $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " make sure no activation is needed"; - $method[] = $this->_t(2) - . "\$useractivation = self::setParams('com_users','useractivation',0);"; - $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " make sure password is send"; - $method[] = $this->_t(2) - . "\$sendpassword = self::setParams('com_users','sendpassword',1);"; - $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " Check if password was set"; - $method[] = $this->_t(2) - . "if (isset(\$new['password']) && isset(\$new['password2']) && self::checkString(\$new['password']) && self::checkString(\$new['password2']))"; + . " Load the correct user model."; + $method[] = $this->_t(2) . "if (\$mode == 1)"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Use the users passwords"; - $method[] = $this->_t(3) . "\$password = \$new['password'];"; - $method[] = $this->_t(3) . "\$password2 = \$new['password2'];"; + . " Load the backend-user model"; + $method[] = $this->_t(3) + . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "else"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Set random password"; - $method[] = $this->_t(3) . "\$password = self::randomkey(8);"; - $method[] = $this->_t(3) . "\$password2 = \$password;"; + . " Load the user site-registration model"; + $method[] = $this->_t(3) + . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " set username if not set"; + . " Check if we have params/config"; + $method[] = $this->_t(2) . "if (self::checkArray(\$params))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Make changes to user config"; + $method[] = $this->_t(3) + . "foreach (\$params as \$param => \$set)"; + $method[] = $this->_t(3) . "{"; + $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) + . " If you know of a better path, let me know"; + $method[] = $this->_t(4) + ."\$params[\$param] = self::setParams('com_users', \$param, \$set);"; + $method[] = $this->_t(3) . "}"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Set username to email if not set"; $method[] = $this->_t(2) - . "if (!isset(\$new['username']) || !self::checkString(\$new['username']))"; + . "if (!isset(\$credentials['username']) || !self::checkString(\$credentials['username']))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) - . "\$new['username'] = self::safeString(\$new['name']);"; + . "\$credentials['username'] = \$credentials['email'];"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " linup new user data"; + . " Lineup new user data array"; $method[] = $this->_t(2) . "\$data = array("; - $method[] = $this->_t(3) . "'username' => \$new['username'],"; - $method[] = $this->_t(3) . "'name' => \$new['name'],"; - $method[] = $this->_t(3) . "'email1' => \$new['email'],"; - $method[] = $this->_t(3) - . "'password1' => \$password, // First password field"; - $method[] = $this->_t(3) - . "'password2' => \$password2, // Confirm password field"; + $method[] = $this->_t(3) . "'username' => \$credentials['username'],"; + $method[] = $this->_t(3) . "'name' => \$credentials['name']"; $method[] = $this->_t(3) . "'block' => 0 );"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " register the new user"; - $method[] = $this->_t(2) . "\$userId = \$model->register(\$data);"; + . " Added details based on mode"; + $method[] = $this->_t(2) . "if (\$mode == 1)"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Site-registration mode"; + $method[] = $this->_t(3) . "\$data['email1'] = \$credentials['email'];"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "else"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Admin-registration mode"; + $method[] = $this->_t(3) . "\$data['email'] = \$credentials['email'];"; + $method[] = $this->_t(3) . "\$data['registerDate'] = JFactory::getDate()->toSql();"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " set activation back to default"; + . " Check if password was set"; $method[] = $this->_t(2) - . "self::setParams('com_users','useractivation',\$useractivation);"; + . "if (\$mode = 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Set random password when empty password was submitted,"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " and we are using the site-registration mode"; + $method[] = $this->_t(3) . "\$credentials['password'] = self::randomkey(8);"; + $method[] = $this->_t(3) . "\$credentials['password2'] = \$credentials['password'];"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " set send password back to default"; + . " Now Add password if set"; $method[] = $this->_t(2) - . "self::setParams('com_users','sendpassword',\$sendpassword);"; + . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2'])))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "if (\$mode = 1)"; + $method[] = $this->_t(3) . "{"; + $method[] = $this->_t(4) . "\$data['password1'] = \$credentials['password'];"; + $method[] = $this->_t(3) . "}"; + $method[] = $this->_t(3) . "else"; + $method[] = $this->_t(3) . "{"; + $method[] = $this->_t(4) . "\$data['password'] = \$credentials['password'];"; + $method[] = $this->_t(3) . "}"; + $method[] = $this->_t(3) . "\$data['password2'] = \$credentials['password2'];"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Create the new user"; + $method[] = $this->_t(2) . "if (\$mode = 1)"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Site-registration mode"; + $method[] = $this->_t(3) . "\$userId = \$model->register(\$data);"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "else"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Admin-registration mode"; + $method[] = $this->_t(3) . "\$model->save(\$data);"; + $method[] = $this->_t(3) . "\$userId = \$model->getState('user.id', 0);"; + $method[] = $this->_t(2) . "}"; + + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Check if we have params"; + $method[] = $this->_t(2) . "if (self::checkArray(\$params))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Change user params/config back"; + $method[] = $this->_t(3) + . "foreach (\$params as \$param => \$set)"; + $method[] = $this->_t(3) . "{"; + $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) + . " If you know of a better path, let me know"; + $method[] = $this->_t(4) + ."self::setParams('com_users', \$param, \$set);"; + $method[] = $this->_t(3) . "}"; + $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " if user is created"; $method[] = $this->_t(2) . "if (\$userId > 0)"; $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Auto Login if Needed"; + $method[] = $this->_t(3) . "if (\$autologin && isset(\$credentials['password']))"; + $method[] = $this->_t(3) . "{"; + $method[] = $this->_t(4) . "JFactory::getApplication()->login(\$credentials);"; + $method[] = $this->_t(3) . "}"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Return ID"; $method[] = $this->_t(3) . "return \$userId;"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "return \$model->getError();"; $method[] = $this->_t(1) . "}"; $method[] = PHP_EOL . $this->_t(1) - . "protected static function setParams(\$component,\$target,\$value)"; + . "public static function setParams(\$component,\$target,\$value)"; $method[] = $this->_t(1) . "{"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the params and set the new values"; @@ -5663,10 +5743,16 @@ class Interpretation extends Fields // return buttons if they were build if (ComponentbuilderHelper::checkArray($buttons)) { - // set the custom get form method JAVASCRIPT_FOR_BUTTONS - $this->fileContentDynamic[$view['settings']->code][$this->hhh - . $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh] - = $this->setJavaScriptForButtons(); + // just to check if the submission script is manually added + if (!isset($view['settings']->php_document) || + strpos(implode(' ', $view['settings']->php_document), + '/submitbutton.js') === false) + { + // set the custom get form method JAVASCRIPT_FOR_BUTTONS + $this->fileContentDynamic[$view['settings']->code][$this->hhh + . $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh] + = $this->setJavaScriptForButtons(); + } // insure the form is added (only if no form exist) if (isset($view['settings']->default) && strpos( @@ -26396,10 +26482,10 @@ function vdm_dkim() { $xml .= PHP_EOL . $this->_t(1) . '_t(2) . 'addrulepath="/administrator/components/com_' - . $this->componentCodeName . '/modules/rules"'; + . $this->componentCodeName . '/models/rules"'; $xml .= PHP_EOL . $this->_t(2) . 'addfieldpath="/administrator/components/com_' - . $this->componentCodeName . '/modules/fields"'; + . $this->componentCodeName . '/models/fields"'; $xml .= PHP_EOL . $this->_t(1) . '>'; } else @@ -26432,12 +26518,24 @@ function vdm_dkim() { . $fieldset . ' fieldset points to the module -->'; $xml .= PHP_EOL . $this->_t(1) . '
_t(2) - . 'addrulepath="/modules/' . $module->file_name - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/modules/' . $module->file_name - . '/fields"'; + if ($module->target == 2) + { + $xml .= PHP_EOL . $this->_t(2) + . 'addrulepath="/administrator/modules/' . $module->file_name + . '/rules"'; + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="/administrator/modules/' . $module->file_name + . '/fields"'; + } + else + { + $xml .= PHP_EOL . $this->_t(2) + . 'addrulepath="/modules/' . $module->file_name + . '/rules"'; + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="/modules/' . $module->file_name + . '/fields"'; + } $xml .= PHP_EOL . $this->_t(1) . '>'; } else diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 7656d19ca..0454e54b1 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -5535,14 +5535,61 @@ abstract class ComponentbuilderHelper * */ public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true) + { + // build record + $record = new stdClass(); + // check if user can edit + if (self::canEditItem($record, $item, $view, $views, $component)) + { + // set the edit link + if ($jRoute) + { + return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref); + } + return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref; + } + return false; + } + + /** + * Can Edit (either any, or own) + * + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $views The list view controller name + * @param string $component The component these views belong to + * + * @return bool if user can edit returns true els + * + */ + public static function allowEdit(&$item, $view, $views, $component = 'com_componentbuilder') + { + // build record + $record = new stdClass(); + return self::canEditItem($record, $item, $view, $views, $component); + } + + + /** + * Can Edit (either any, or own) + * + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $views The list view controller name + * @param string $component The component these views belong to + * + * @return bool if user can edit returns true els + * + */ + protected static function canEditItem(&$record, &$item, $view, $views, $component = 'com_componentbuilder') { // make sure the user has access to view if (!JFactory::getUser()->authorise($view. '.access', $component)) { return false; } - // build record - $record = new stdClass(); + // we start with false. + $can_edit = false; // check that we have the ID if (self::checkObject($item) && isset($item->id)) { @@ -5572,25 +5619,14 @@ abstract class ComponentbuilderHelper // get user action permission to edit $action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component)); // check if the view permission is set - if (($edit = $action->get($view . '.edit', 'none-set')) === 'none-set') + if (($can_edit = $action->get($view . '.edit', 'none-set')) === 'none-set') { - // fall back on the core permission then - $edit = $action->get('core.edit', 'none-set'); - } - // can edit - if ($edit) - { - // set the edit link - if ($jRoute) - { - return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref); - } - return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref; + // fall back on the core permission then (this can be an issue) + $can_edit = ($action->get('core.edit', false) || $action->get('core.edit.own', false)); } } - return false; + return $can_edit; } - /** * set subform type table @@ -5633,9 +5669,9 @@ abstract class ComponentbuilderHelper /** * Change to nice fancy date */ - public static function fancyDate($date) + public static function fancyDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5645,9 +5681,9 @@ abstract class ComponentbuilderHelper /** * get date based in period past */ - public static function fancyDynamicDate($date) + public static function fancyDynamicDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5671,9 +5707,9 @@ abstract class ComponentbuilderHelper /** * Change to nice fancy day time and date */ - public static function fancyDayTimeDate($time) + public static function fancyDayTimeDate($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -5683,9 +5719,9 @@ abstract class ComponentbuilderHelper /** * Change to nice fancy time and date */ - public static function fancyDateTime($time) + public static function fancyDateTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -5695,9 +5731,9 @@ abstract class ComponentbuilderHelper /** * Change to nice hour:minutes time */ - public static function fancyTime($time) + public static function fancyTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -5707,9 +5743,9 @@ abstract class ComponentbuilderHelper /** * set the date day as Sunday through Saturday */ - public static function setDayName($date) + public static function setDayName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5719,9 +5755,9 @@ abstract class ComponentbuilderHelper /** * set the date month as January through December */ - public static function setMonthName($date) + public static function setMonthName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5731,9 +5767,9 @@ abstract class ComponentbuilderHelper /** * set the date day as 1st */ - public static function setDay($date) + public static function setDay($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5743,9 +5779,9 @@ abstract class ComponentbuilderHelper /** * set the date month as 5 */ - public static function setMonth($date) + public static function setMonth($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5755,9 +5791,9 @@ abstract class ComponentbuilderHelper /** * set the date year as 2004 (for charts) */ - public static function setYear($date) + public static function setYear($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5767,9 +5803,9 @@ abstract class ComponentbuilderHelper /** * set the date as 2004/05 (for charts) */ - public static function setYearMonth($date, $spacer = '/') + public static function setYearMonth($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5779,9 +5815,9 @@ abstract class ComponentbuilderHelper /** * set the date as 2004/05/03 (for charts) */ - public static function setYearMonthDay($date, $spacer = '/') + public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5791,9 +5827,9 @@ abstract class ComponentbuilderHelper /** * set the date as 03/05/2004 */ - public static function setDayMonthYear($date, $spacer = '/') + public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5810,6 +5846,16 @@ abstract class ComponentbuilderHelper && ($timestamp >= ~PHP_INT_MAX); } + /** + * Check if string is a valid date + * https://www.php.net/manual/en/function.checkdate.php#113205 + */ + public static function isValidateDate($date, $format = 'Y-m-d H:i:s') + { + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + /** * Load the Composer Vendors diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index b8fba47f6..3a4179ca2 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyffields; +$items = $displayData->vycfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 6c2657c4a..daa8d8f7c 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyplinked_components; +$items = $displayData->vymlinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 1693a7b6d..d129cd98b 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -249,7 +249,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyffields() + public function getVycfields() { // Get the user object. $user = JFactory::getUser(); @@ -337,13 +337,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVyffields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVycfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVyffields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVycfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVyffields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVycfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVyffields($item->store, 'store'); + $item->store = $this->selectionTranslationVycfields($item->store, 'store'); } } @@ -357,7 +357,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVyffields($value,$name) + public function selectionTranslationVycfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 140839784..963e061c9 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -13,11 +13,8 @@ jform_vvvvwczvxo_required = false; jform_vvvvwdavxp_required = false; jform_vvvvwdbvxq_required = false; jform_vvvvwdcvxr_required = false; -jform_vvvvwddvxs_required = false; -jform_vvvvwdgvxt_required = false; -jform_vvvvwdgvxu_required = false; -jform_vvvvwdhvxv_required = false; -jform_vvvvwdhvxw_required = false; +jform_vvvvwdfvxs_required = false; +jform_vvvvwdfvxt_required = false; // Initial Script jQuery(document).ready(function() @@ -34,32 +31,24 @@ jQuery(document).ready(function() var datatype_vvvvwdc = jQuery("#jform_datatype").val(); vvvvwdc(datatype_vvvvwdc); + var store_vvvvwdd = jQuery("#jform_store").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val(); - vvvvwdd(datatype_vvvvwdd); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); + var store_vvvvwdf = jQuery("#jform_store").val(); + vvvvwdf(store_vvvvwdf); - var store_vvvvwdg = jQuery("#jform_store").val(); - var datatype_vvvvwdg = jQuery("#jform_datatype").val(); - vvvvwdg(store_vvvvwdg,datatype_vvvvwdg); + var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwdg(add_css_view_vvvvwdg); - var datatype_vvvvwdh = jQuery("#jform_datatype").val(); - var store_vvvvwdh = jQuery("#jform_store").val(); - vvvvwdh(datatype_vvvvwdh,store_vvvvwdh); + var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwdh(add_css_views_vvvvwdh); - var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwdi(add_css_view_vvvvwdi); + var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwdi(add_javascript_view_footer_vvvvwdi); - var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwdj(add_css_views_vvvvwdj); - - var add_javascript_view_footer_vvvvwdk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwdk(add_javascript_view_footer_vvvvwdk); - - var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwdl(add_javascript_views_footer_vvvvwdl); + var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwdj(add_javascript_views_footer_vvvvwdj); }); // the vvvvwcz function @@ -289,8 +278,20 @@ function datatype_vvvvwdc_SomeFunc(datatype_vvvvwdc) } // the vvvvwdd function -function vvvvwdd(datatype_vvvvwdd) +function vvvvwdd(store_vvvvwdd,datatype_vvvvwdd) { + if (isSet(store_vvvvwdd) && store_vvvvwdd.constructor !== Array) + { + var temp_vvvvwdd = store_vvvvwdd; + var store_vvvvwdd = []; + store_vvvvwdd.push(temp_vvvvwdd); + } + else if (!isSet(store_vvvvwdd)) + { + var store_vvvvwdd = []; + } + var store = store_vvvvwdd.some(store_vvvvwdd_SomeFunc); + if (isSet(datatype_vvvvwdd) && datatype_vvvvwdd.constructor !== Array) { var temp_vvvvwdd = datatype_vvvvwdd; @@ -305,34 +306,27 @@ function vvvvwdd(datatype_vvvvwdd) // set this function logic - if (datatype) + if (store && datatype) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwddvxs_required) - { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwddvxs_required = false; - } + jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwddvxs_required) - { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwddvxs_required = true; - } + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } +// the vvvvwdd Some function +function store_vvvvwdd_SomeFunc(store_vvvvwdd) +{ + // set the function logic + if (store_vvvvwdd == 4) + { + return true; + } + return false; +} + // the vvvvwdd Some function function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd) { @@ -344,61 +338,82 @@ function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd) return false; } -// the vvvvwde function -function vvvvwde(store_vvvvwde,datatype_vvvvwde) +// the vvvvwdf function +function vvvvwdf(store_vvvvwdf) { - if (isSet(store_vvvvwde) && store_vvvvwde.constructor !== Array) + if (isSet(store_vvvvwdf) && store_vvvvwdf.constructor !== Array) { - var temp_vvvvwde = store_vvvvwde; - var store_vvvvwde = []; - store_vvvvwde.push(temp_vvvvwde); + var temp_vvvvwdf = store_vvvvwdf; + var store_vvvvwdf = []; + store_vvvvwdf.push(temp_vvvvwdf); } - else if (!isSet(store_vvvvwde)) + else if (!isSet(store_vvvvwdf)) { - var store_vvvvwde = []; + var store_vvvvwdf = []; } - var store = store_vvvvwde.some(store_vvvvwde_SomeFunc); - - if (isSet(datatype_vvvvwde) && datatype_vvvvwde.constructor !== Array) - { - var temp_vvvvwde = datatype_vvvvwde; - var datatype_vvvvwde = []; - datatype_vvvvwde.push(temp_vvvvwde); - } - else if (!isSet(datatype_vvvvwde)) - { - var datatype_vvvvwde = []; - } - var datatype = datatype_vvvvwde.some(datatype_vvvvwde_SomeFunc); + var store = store_vvvvwdf.some(store_vvvvwdf_SomeFunc); // set this function logic - if (store && datatype) + if (store) { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); + jQuery('#jform_initiator_on_get_model').closest('.control-group').show(); + jQuery('#jform_initiator_on_save_model').closest('.control-group').show(); + jQuery('.note_expert_field_save_mode').closest('.control-group').show(); + jQuery('#jform_on_get_model_field').closest('.control-group').show(); + // add required attribute to on_get_model_field field + if (jform_vvvvwdfvxs_required) + { + updateFieldRequired('on_get_model_field',0); + jQuery('#jform_on_get_model_field').prop('required','required'); + jQuery('#jform_on_get_model_field').attr('aria-required',true); + jQuery('#jform_on_get_model_field').addClass('required'); + jform_vvvvwdfvxs_required = false; + } + jQuery('#jform_on_save_model_field').closest('.control-group').show(); + // add required attribute to on_save_model_field field + if (jform_vvvvwdfvxt_required) + { + updateFieldRequired('on_save_model_field',0); + jQuery('#jform_on_save_model_field').prop('required','required'); + jQuery('#jform_on_save_model_field').attr('aria-required',true); + jQuery('#jform_on_save_model_field').addClass('required'); + jform_vvvvwdfvxt_required = false; + } } else { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + jQuery('#jform_initiator_on_get_model').closest('.control-group').hide(); + jQuery('#jform_initiator_on_save_model').closest('.control-group').hide(); + jQuery('.note_expert_field_save_mode').closest('.control-group').hide(); + jQuery('#jform_on_get_model_field').closest('.control-group').hide(); + // remove required attribute from on_get_model_field field + if (!jform_vvvvwdfvxs_required) + { + updateFieldRequired('on_get_model_field',1); + jQuery('#jform_on_get_model_field').removeAttr('required'); + jQuery('#jform_on_get_model_field').removeAttr('aria-required'); + jQuery('#jform_on_get_model_field').removeClass('required'); + jform_vvvvwdfvxs_required = true; + } + jQuery('#jform_on_save_model_field').closest('.control-group').hide(); + // remove required attribute from on_save_model_field field + if (!jform_vvvvwdfvxt_required) + { + updateFieldRequired('on_save_model_field',1); + jQuery('#jform_on_save_model_field').removeAttr('required'); + jQuery('#jform_on_save_model_field').removeAttr('aria-required'); + jQuery('#jform_on_save_model_field').removeClass('required'); + jform_vvvvwdfvxt_required = true; + } } } -// the vvvvwde Some function -function store_vvvvwde_SomeFunc(store_vvvvwde) +// the vvvvwdf Some function +function store_vvvvwdf_SomeFunc(store_vvvvwdf) { // set the function logic - if (store_vvvvwde == 4) - { - return true; - } - return false; -} - -// the vvvvwde Some function -function datatype_vvvvwde_SomeFunc(datatype_vvvvwde) -{ - // set the function logic - if (datatype_vvvvwde == 'CHAR' || datatype_vvvvwde == 'VARCHAR' || datatype_vvvvwde == 'TEXT' || datatype_vvvvwde == 'MEDIUMTEXT' || datatype_vvvvwde == 'LONGTEXT' || datatype_vvvvwde == 'BLOB' || datatype_vvvvwde == 'TINYBLOB' || datatype_vvvvwde == 'MEDIUMBLOB' || datatype_vvvvwde == 'LONGBLOB') + if (store_vvvvwdf == 6) { return true; } @@ -406,220 +421,10 @@ function datatype_vvvvwde_SomeFunc(datatype_vvvvwde) } // the vvvvwdg function -function vvvvwdg(store_vvvvwdg,datatype_vvvvwdg) -{ - if (isSet(store_vvvvwdg) && store_vvvvwdg.constructor !== Array) - { - var temp_vvvvwdg = store_vvvvwdg; - var store_vvvvwdg = []; - store_vvvvwdg.push(temp_vvvvwdg); - } - else if (!isSet(store_vvvvwdg)) - { - var store_vvvvwdg = []; - } - var store = store_vvvvwdg.some(store_vvvvwdg_SomeFunc); - - if (isSet(datatype_vvvvwdg) && datatype_vvvvwdg.constructor !== Array) - { - var temp_vvvvwdg = datatype_vvvvwdg; - var datatype_vvvvwdg = []; - datatype_vvvvwdg.push(temp_vvvvwdg); - } - else if (!isSet(datatype_vvvvwdg)) - { - var datatype_vvvvwdg = []; - } - var datatype = datatype_vvvvwdg.some(datatype_vvvvwdg_SomeFunc); - - - // set this function logic - if (store && datatype) - { - jQuery('#jform_initiator_on_get_model').closest('.control-group').show(); - jQuery('#jform_initiator_on_save_model').closest('.control-group').show(); - jQuery('#jform_on_save_model_field').closest('.control-group').show(); - // add required attribute to on_save_model_field field - if (jform_vvvvwdgvxt_required) - { - updateFieldRequired('on_save_model_field',0); - jQuery('#jform_on_save_model_field').prop('required','required'); - jQuery('#jform_on_save_model_field').attr('aria-required',true); - jQuery('#jform_on_save_model_field').addClass('required'); - jform_vvvvwdgvxt_required = false; - } - jQuery('.note_expert_field_save_mode').closest('.control-group').show(); - jQuery('#jform_on_get_model_field').closest('.control-group').show(); - // add required attribute to on_get_model_field field - if (jform_vvvvwdgvxu_required) - { - updateFieldRequired('on_get_model_field',0); - jQuery('#jform_on_get_model_field').prop('required','required'); - jQuery('#jform_on_get_model_field').attr('aria-required',true); - jQuery('#jform_on_get_model_field').addClass('required'); - jform_vvvvwdgvxu_required = false; - } - } - else - { - jQuery('#jform_initiator_on_get_model').closest('.control-group').hide(); - jQuery('#jform_initiator_on_save_model').closest('.control-group').hide(); - jQuery('#jform_on_save_model_field').closest('.control-group').hide(); - // remove required attribute from on_save_model_field field - if (!jform_vvvvwdgvxt_required) - { - updateFieldRequired('on_save_model_field',1); - jQuery('#jform_on_save_model_field').removeAttr('required'); - jQuery('#jform_on_save_model_field').removeAttr('aria-required'); - jQuery('#jform_on_save_model_field').removeClass('required'); - jform_vvvvwdgvxt_required = true; - } - jQuery('.note_expert_field_save_mode').closest('.control-group').hide(); - jQuery('#jform_on_get_model_field').closest('.control-group').hide(); - // remove required attribute from on_get_model_field field - if (!jform_vvvvwdgvxu_required) - { - updateFieldRequired('on_get_model_field',1); - jQuery('#jform_on_get_model_field').removeAttr('required'); - jQuery('#jform_on_get_model_field').removeAttr('aria-required'); - jQuery('#jform_on_get_model_field').removeClass('required'); - jform_vvvvwdgvxu_required = true; - } - } -} - -// the vvvvwdg Some function -function store_vvvvwdg_SomeFunc(store_vvvvwdg) +function vvvvwdg(add_css_view_vvvvwdg) { // set the function logic - if (store_vvvvwdg == 6) - { - return true; - } - return false; -} - -// the vvvvwdg Some function -function datatype_vvvvwdg_SomeFunc(datatype_vvvvwdg) -{ - // set the function logic - if (datatype_vvvvwdg == 'CHAR' || datatype_vvvvwdg == 'VARCHAR' || datatype_vvvvwdg == 'TEXT' || datatype_vvvvwdg == 'MEDIUMTEXT' || datatype_vvvvwdg == 'LONGTEXT' || datatype_vvvvwdg == 'BLOB' || datatype_vvvvwdg == 'TINYBLOB' || datatype_vvvvwdg == 'MEDIUMBLOB' || datatype_vvvvwdg == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwdh function -function vvvvwdh(datatype_vvvvwdh,store_vvvvwdh) -{ - if (isSet(datatype_vvvvwdh) && datatype_vvvvwdh.constructor !== Array) - { - var temp_vvvvwdh = datatype_vvvvwdh; - var datatype_vvvvwdh = []; - datatype_vvvvwdh.push(temp_vvvvwdh); - } - else if (!isSet(datatype_vvvvwdh)) - { - var datatype_vvvvwdh = []; - } - var datatype = datatype_vvvvwdh.some(datatype_vvvvwdh_SomeFunc); - - if (isSet(store_vvvvwdh) && store_vvvvwdh.constructor !== Array) - { - var temp_vvvvwdh = store_vvvvwdh; - var store_vvvvwdh = []; - store_vvvvwdh.push(temp_vvvvwdh); - } - else if (!isSet(store_vvvvwdh)) - { - var store_vvvvwdh = []; - } - var store = store_vvvvwdh.some(store_vvvvwdh_SomeFunc); - - - // set this function logic - if (datatype && store) - { - jQuery('#jform_initiator_on_get_model').closest('.control-group').show(); - jQuery('#jform_initiator_on_save_model').closest('.control-group').show(); - jQuery('#jform_on_save_model_field').closest('.control-group').show(); - // add required attribute to on_save_model_field field - if (jform_vvvvwdhvxv_required) - { - updateFieldRequired('on_save_model_field',0); - jQuery('#jform_on_save_model_field').prop('required','required'); - jQuery('#jform_on_save_model_field').attr('aria-required',true); - jQuery('#jform_on_save_model_field').addClass('required'); - jform_vvvvwdhvxv_required = false; - } - jQuery('.note_expert_field_save_mode').closest('.control-group').show(); - jQuery('#jform_on_get_model_field').closest('.control-group').show(); - // add required attribute to on_get_model_field field - if (jform_vvvvwdhvxw_required) - { - updateFieldRequired('on_get_model_field',0); - jQuery('#jform_on_get_model_field').prop('required','required'); - jQuery('#jform_on_get_model_field').attr('aria-required',true); - jQuery('#jform_on_get_model_field').addClass('required'); - jform_vvvvwdhvxw_required = false; - } - } - else - { - jQuery('#jform_initiator_on_get_model').closest('.control-group').hide(); - jQuery('#jform_initiator_on_save_model').closest('.control-group').hide(); - jQuery('#jform_on_save_model_field').closest('.control-group').hide(); - // remove required attribute from on_save_model_field field - if (!jform_vvvvwdhvxv_required) - { - updateFieldRequired('on_save_model_field',1); - jQuery('#jform_on_save_model_field').removeAttr('required'); - jQuery('#jform_on_save_model_field').removeAttr('aria-required'); - jQuery('#jform_on_save_model_field').removeClass('required'); - jform_vvvvwdhvxv_required = true; - } - jQuery('.note_expert_field_save_mode').closest('.control-group').hide(); - jQuery('#jform_on_get_model_field').closest('.control-group').hide(); - // remove required attribute from on_get_model_field field - if (!jform_vvvvwdhvxw_required) - { - updateFieldRequired('on_get_model_field',1); - jQuery('#jform_on_get_model_field').removeAttr('required'); - jQuery('#jform_on_get_model_field').removeAttr('aria-required'); - jQuery('#jform_on_get_model_field').removeClass('required'); - jform_vvvvwdhvxw_required = true; - } - } -} - -// the vvvvwdh Some function -function datatype_vvvvwdh_SomeFunc(datatype_vvvvwdh) -{ - // set the function logic - if (datatype_vvvvwdh == 'CHAR' || datatype_vvvvwdh == 'VARCHAR' || datatype_vvvvwdh == 'TEXT' || datatype_vvvvwdh == 'MEDIUMTEXT' || datatype_vvvvwdh == 'LONGTEXT' || datatype_vvvvwdh == 'BLOB' || datatype_vvvvwdh == 'TINYBLOB' || datatype_vvvvwdh == 'MEDIUMBLOB' || datatype_vvvvwdh == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwdh Some function -function store_vvvvwdh_SomeFunc(store_vvvvwdh) -{ - // set the function logic - if (store_vvvvwdh == 6) - { - return true; - } - return false; -} - -// the vvvvwdi function -function vvvvwdi(add_css_view_vvvvwdi) -{ - // set the function logic - if (add_css_view_vvvvwdi == 1) + if (add_css_view_vvvvwdg == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -629,11 +434,11 @@ function vvvvwdi(add_css_view_vvvvwdi) } } -// the vvvvwdj function -function vvvvwdj(add_css_views_vvvvwdj) +// the vvvvwdh function +function vvvvwdh(add_css_views_vvvvwdh) { // set the function logic - if (add_css_views_vvvvwdj == 1) + if (add_css_views_vvvvwdh == 1) { jQuery('#jform_css_views-lbl').closest('.control-group').show(); } @@ -643,11 +448,11 @@ function vvvvwdj(add_css_views_vvvvwdj) } } -// the vvvvwdk function -function vvvvwdk(add_javascript_view_footer_vvvvwdk) +// the vvvvwdi function +function vvvvwdi(add_javascript_view_footer_vvvvwdi) { // set the function logic - if (add_javascript_view_footer_vvvvwdk == 1) + if (add_javascript_view_footer_vvvvwdi == 1) { jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); } @@ -657,11 +462,11 @@ function vvvvwdk(add_javascript_view_footer_vvvvwdk) } } -// the vvvvwdl function -function vvvvwdl(add_javascript_views_footer_vvvvwdl) +// the vvvvwdj function +function vvvvwdj(add_javascript_views_footer_vvvvwdj) { // set the function logic - if (add_javascript_views_footer_vvvvwdl == 1) + if (add_javascript_views_footer_vvvvwdj == 1) { jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); } diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index 7db12fdef..e4c46f1d3 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,75 +9,154 @@ */ // Some Global Values -jform_vvvvwdmvxx_required = false; -jform_vvvvwdovxy_required = false; -jform_vvvvwdqvxz_required = false; -jform_vvvvwdsvya_required = false; -jform_vvvvwdtvyb_required = false; -jform_vvvvwduvyc_required = false; -jform_vvvvwdzvyd_required = false; -jform_vvvvwdzvye_required = false; +jform_vvvvwdkvxu_required = false; +jform_vvvvwdmvxv_required = false; +jform_vvvvwdovxw_required = false; +jform_vvvvwdqvxx_required = false; +jform_vvvvwdrvxy_required = false; +jform_vvvvwdsvxz_required = false; +jform_vvvvwdxvya_required = false; +jform_vvvvwdxvyb_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwdm = jQuery("#jform_datalenght").val(); - var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm); + var datalenght_vvvvwdk = jQuery("#jform_datalenght").val(); + var has_defaults_vvvvwdk = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk); - var datadefault_vvvvwdo = jQuery("#jform_datadefault").val(); + var datadefault_vvvvwdm = jQuery("#jform_datadefault").val(); + var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm); + + var datatype_vvvvwdo = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo); + vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo); var datatype_vvvvwdq = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdq = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq); + var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + var datatype_vvvvwdr = jQuery("#jform_datatype").val(); + vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr); + var datatype_vvvvwds = jQuery("#jform_datatype").val(); var has_defaults_vvvvwds = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds); - var has_defaults_vvvvwdt = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var datatype_vvvvwdt = jQuery("#jform_datatype").val(); - vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt); - + var store_vvvvwdu = jQuery("#jform_store").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu); + vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu); + var datatype_vvvvwdv = jQuery("#jform_datatype").val(); + var store_vvvvwdv = jQuery("#jform_store").val(); + var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val(); + vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv); + + var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var store_vvvvwdw = jQuery("#jform_store").val(); var datatype_vvvvwdw = jQuery("#jform_datatype").val(); - var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw); + vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw); - var datatype_vvvvwdx = jQuery("#jform_datatype").val(); - var store_vvvvwdx = jQuery("#jform_store").val(); var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx); - - var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - var store_vvvvwdy = jQuery("#jform_store").val(); - var datatype_vvvvwdy = jQuery("#jform_datatype").val(); - vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy); - - var has_defaults_vvvvwdz = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdz(has_defaults_vvvvwdz); + vvvvwdx(has_defaults_vvvvwdx); }); -// the vvvvwdm function -function vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm) +// the vvvvwdk function +function vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk) { - if (isSet(datalenght_vvvvwdm) && datalenght_vvvvwdm.constructor !== Array) + if (isSet(datalenght_vvvvwdk) && datalenght_vvvvwdk.constructor !== Array) { - var temp_vvvvwdm = datalenght_vvvvwdm; - var datalenght_vvvvwdm = []; - datalenght_vvvvwdm.push(temp_vvvvwdm); + var temp_vvvvwdk = datalenght_vvvvwdk; + var datalenght_vvvvwdk = []; + datalenght_vvvvwdk.push(temp_vvvvwdk); } - else if (!isSet(datalenght_vvvvwdm)) + else if (!isSet(datalenght_vvvvwdk)) { - var datalenght_vvvvwdm = []; + var datalenght_vvvvwdk = []; } - var datalenght = datalenght_vvvvwdm.some(datalenght_vvvvwdm_SomeFunc); + var datalenght = datalenght_vvvvwdk.some(datalenght_vvvvwdk_SomeFunc); + + if (isSet(has_defaults_vvvvwdk) && has_defaults_vvvvwdk.constructor !== Array) + { + var temp_vvvvwdk = has_defaults_vvvvwdk; + var has_defaults_vvvvwdk = []; + has_defaults_vvvvwdk.push(temp_vvvvwdk); + } + else if (!isSet(has_defaults_vvvvwdk)) + { + var has_defaults_vvvvwdk = []; + } + var has_defaults = has_defaults_vvvvwdk.some(has_defaults_vvvvwdk_SomeFunc); + + + // set this function logic + if (datalenght && has_defaults) + { + jQuery('#jform_datalenght_other').closest('.control-group').show(); + // add required attribute to datalenght_other field + if (jform_vvvvwdkvxu_required) + { + updateFieldRequired('datalenght_other',0); + jQuery('#jform_datalenght_other').prop('required','required'); + jQuery('#jform_datalenght_other').attr('aria-required',true); + jQuery('#jform_datalenght_other').addClass('required'); + jform_vvvvwdkvxu_required = false; + } + } + else + { + jQuery('#jform_datalenght_other').closest('.control-group').hide(); + // remove required attribute from datalenght_other field + if (!jform_vvvvwdkvxu_required) + { + updateFieldRequired('datalenght_other',1); + jQuery('#jform_datalenght_other').removeAttr('required'); + jQuery('#jform_datalenght_other').removeAttr('aria-required'); + jQuery('#jform_datalenght_other').removeClass('required'); + jform_vvvvwdkvxu_required = true; + } + } +} + +// the vvvvwdk Some function +function datalenght_vvvvwdk_SomeFunc(datalenght_vvvvwdk) +{ + // set the function logic + if (datalenght_vvvvwdk == 'Other') + { + return true; + } + return false; +} + +// the vvvvwdk Some function +function has_defaults_vvvvwdk_SomeFunc(has_defaults_vvvvwdk) +{ + // set the function logic + if (has_defaults_vvvvwdk == 1) + { + return true; + } + return false; +} + +// the vvvvwdm function +function vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm) +{ + if (isSet(datadefault_vvvvwdm) && datadefault_vvvvwdm.constructor !== Array) + { + var temp_vvvvwdm = datadefault_vvvvwdm; + var datadefault_vvvvwdm = []; + datadefault_vvvvwdm.push(temp_vvvvwdm); + } + else if (!isSet(datadefault_vvvvwdm)) + { + var datadefault_vvvvwdm = []; + } + var datadefault = datadefault_vvvvwdm.some(datadefault_vvvvwdm_SomeFunc); if (isSet(has_defaults_vvvvwdm) && has_defaults_vvvvwdm.constructor !== Array) { @@ -93,39 +172,39 @@ function vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm) // set this function logic - if (datalenght && has_defaults) + if (datadefault && has_defaults) { - jQuery('#jform_datalenght_other').closest('.control-group').show(); - // add required attribute to datalenght_other field - if (jform_vvvvwdmvxx_required) + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field + if (jform_vvvvwdmvxv_required) { - updateFieldRequired('datalenght_other',0); - jQuery('#jform_datalenght_other').prop('required','required'); - jQuery('#jform_datalenght_other').attr('aria-required',true); - jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvwdmvxx_required = false; + updateFieldRequired('datadefault_other',0); + jQuery('#jform_datadefault_other').prop('required','required'); + jQuery('#jform_datadefault_other').attr('aria-required',true); + jQuery('#jform_datadefault_other').addClass('required'); + jform_vvvvwdmvxv_required = false; } } else { - jQuery('#jform_datalenght_other').closest('.control-group').hide(); - // remove required attribute from datalenght_other field - if (!jform_vvvvwdmvxx_required) + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field + if (!jform_vvvvwdmvxv_required) { - updateFieldRequired('datalenght_other',1); - jQuery('#jform_datalenght_other').removeAttr('required'); - jQuery('#jform_datalenght_other').removeAttr('aria-required'); - jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvwdmvxx_required = true; + updateFieldRequired('datadefault_other',1); + jQuery('#jform_datadefault_other').removeAttr('required'); + jQuery('#jform_datadefault_other').removeAttr('aria-required'); + jQuery('#jform_datadefault_other').removeClass('required'); + jform_vvvvwdmvxv_required = true; } } } // the vvvvwdm Some function -function datalenght_vvvvwdm_SomeFunc(datalenght_vvvvwdm) +function datadefault_vvvvwdm_SomeFunc(datadefault_vvvvwdm) { // set the function logic - if (datalenght_vvvvwdm == 'Other') + if (datadefault_vvvvwdm == 'Other') { return true; } @@ -144,19 +223,19 @@ function has_defaults_vvvvwdm_SomeFunc(has_defaults_vvvvwdm) } // the vvvvwdo function -function vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo) +function vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo) { - if (isSet(datadefault_vvvvwdo) && datadefault_vvvvwdo.constructor !== Array) + if (isSet(datatype_vvvvwdo) && datatype_vvvvwdo.constructor !== Array) { - var temp_vvvvwdo = datadefault_vvvvwdo; - var datadefault_vvvvwdo = []; - datadefault_vvvvwdo.push(temp_vvvvwdo); + var temp_vvvvwdo = datatype_vvvvwdo; + var datatype_vvvvwdo = []; + datatype_vvvvwdo.push(temp_vvvvwdo); } - else if (!isSet(datadefault_vvvvwdo)) + else if (!isSet(datatype_vvvvwdo)) { - var datadefault_vvvvwdo = []; + var datatype_vvvvwdo = []; } - var datadefault = datadefault_vvvvwdo.some(datadefault_vvvvwdo_SomeFunc); + var datatype = datatype_vvvvwdo.some(datatype_vvvvwdo_SomeFunc); if (isSet(has_defaults_vvvvwdo) && has_defaults_vvvvwdo.constructor !== Array) { @@ -172,39 +251,39 @@ function vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo) // set this function logic - if (datadefault && has_defaults) + if (datatype && has_defaults) { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwdovxy_required) + jQuery('#jform_datalenght').closest('.control-group').show(); + // add required attribute to datalenght field + if (jform_vvvvwdovxw_required) { - updateFieldRequired('datadefault_other',0); - jQuery('#jform_datadefault_other').prop('required','required'); - jQuery('#jform_datadefault_other').attr('aria-required',true); - jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvwdovxy_required = false; + updateFieldRequired('datalenght',0); + jQuery('#jform_datalenght').prop('required','required'); + jQuery('#jform_datalenght').attr('aria-required',true); + jQuery('#jform_datalenght').addClass('required'); + jform_vvvvwdovxw_required = false; } } else { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwdovxy_required) + jQuery('#jform_datalenght').closest('.control-group').hide(); + // remove required attribute from datalenght field + if (!jform_vvvvwdovxw_required) { - updateFieldRequired('datadefault_other',1); - jQuery('#jform_datadefault_other').removeAttr('required'); - jQuery('#jform_datadefault_other').removeAttr('aria-required'); - jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvwdovxy_required = true; + updateFieldRequired('datalenght',1); + jQuery('#jform_datalenght').removeAttr('required'); + jQuery('#jform_datalenght').removeAttr('aria-required'); + jQuery('#jform_datalenght').removeClass('required'); + jform_vvvvwdovxw_required = true; } } } // the vvvvwdo Some function -function datadefault_vvvvwdo_SomeFunc(datadefault_vvvvwdo) +function datatype_vvvvwdo_SomeFunc(datatype_vvvvwdo) { // set the function logic - if (datadefault_vvvvwdo == 'Other') + if (datatype_vvvvwdo == 'CHAR' || datatype_vvvvwdo == 'VARCHAR' || datatype_vvvvwdo == 'INT' || datatype_vvvvwdo == 'TINYINT' || datatype_vvvvwdo == 'BIGINT' || datatype_vvvvwdo == 'FLOAT' || datatype_vvvvwdo == 'DECIMAL' || datatype_vvvvwdo == 'DOUBLE') { return true; } @@ -253,28 +332,30 @@ function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq) // set this function logic if (datatype && has_defaults) { - jQuery('#jform_datalenght').closest('.control-group').show(); - // add required attribute to datalenght field - if (jform_vvvvwdqvxz_required) + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwdqvxx_required) { - updateFieldRequired('datalenght',0); - jQuery('#jform_datalenght').prop('required','required'); - jQuery('#jform_datalenght').attr('aria-required',true); - jQuery('#jform_datalenght').addClass('required'); - jform_vvvvwdqvxz_required = false; + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwdqvxx_required = false; } } else { - jQuery('#jform_datalenght').closest('.control-group').hide(); - // remove required attribute from datalenght field - if (!jform_vvvvwdqvxz_required) + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwdqvxx_required) { - updateFieldRequired('datalenght',1); - jQuery('#jform_datalenght').removeAttr('required'); - jQuery('#jform_datalenght').removeAttr('aria-required'); - jQuery('#jform_datalenght').removeClass('required'); - jform_vvvvwdqvxz_required = true; + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwdqvxx_required = true; } } } @@ -283,7 +364,7 @@ function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq) function datatype_vvvvwdq_SomeFunc(datatype_vvvvwdq) { // set the function logic - if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq == 'VARCHAR' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq == 'TINYINT' || datatype_vvvvwdq == 'BIGINT' || datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq == 'DECIMAL' || datatype_vvvvwdq == 'DOUBLE') + if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq == 'VARCHAR' || datatype_vvvvwdq == 'DATETIME' || datatype_vvvvwdq == 'DATE' || datatype_vvvvwdq == 'TIME' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq == 'TINYINT' || datatype_vvvvwdq == 'BIGINT' || datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq == 'DECIMAL' || datatype_vvvvwdq == 'DOUBLE') { return true; } @@ -301,6 +382,87 @@ function has_defaults_vvvvwdq_SomeFunc(has_defaults_vvvvwdq) return false; } +// the vvvvwdr function +function vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr) +{ + if (isSet(has_defaults_vvvvwdr) && has_defaults_vvvvwdr.constructor !== Array) + { + var temp_vvvvwdr = has_defaults_vvvvwdr; + var has_defaults_vvvvwdr = []; + has_defaults_vvvvwdr.push(temp_vvvvwdr); + } + else if (!isSet(has_defaults_vvvvwdr)) + { + var has_defaults_vvvvwdr = []; + } + var has_defaults = has_defaults_vvvvwdr.some(has_defaults_vvvvwdr_SomeFunc); + + if (isSet(datatype_vvvvwdr) && datatype_vvvvwdr.constructor !== Array) + { + var temp_vvvvwdr = datatype_vvvvwdr; + var datatype_vvvvwdr = []; + datatype_vvvvwdr.push(temp_vvvvwdr); + } + else if (!isSet(datatype_vvvvwdr)) + { + var datatype_vvvvwdr = []; + } + var datatype = datatype_vvvvwdr.some(datatype_vvvvwdr_SomeFunc); + + + // set this function logic + if (has_defaults && datatype) + { + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwdrvxy_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwdrvxy_required = false; + } + } + else + { + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwdrvxy_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwdrvxy_required = true; + } + } +} + +// the vvvvwdr Some function +function has_defaults_vvvvwdr_SomeFunc(has_defaults_vvvvwdr) +{ + // set the function logic + if (has_defaults_vvvvwdr == 1) + { + return true; + } + return false; +} + +// the vvvvwdr Some function +function datatype_vvvvwdr_SomeFunc(datatype_vvvvwdr) +{ + // set the function logic + if (datatype_vvvvwdr == 'CHAR' || datatype_vvvvwdr == 'VARCHAR' || datatype_vvvvwdr == 'DATETIME' || datatype_vvvvwdr == 'DATE' || datatype_vvvvwdr == 'TIME' || datatype_vvvvwdr == 'INT' || datatype_vvvvwdr == 'TINYINT' || datatype_vvvvwdr == 'BIGINT' || datatype_vvvvwdr == 'FLOAT' || datatype_vvvvwdr == 'DECIMAL' || datatype_vvvvwdr == 'DOUBLE') + { + return true; + } + return false; +} + // the vvvvwds function function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) { @@ -332,30 +494,28 @@ function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) // set this function logic if (datatype && has_defaults) { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwdsvya_required) + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwdsvxz_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwdsvya_required = false; + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwdsvxz_required = false; } } else { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwdsvya_required) + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwdsvxz_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwdsvya_required = true; + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwdsvxz_required = true; } } } @@ -364,7 +524,7 @@ function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) function datatype_vvvvwds_SomeFunc(datatype_vvvvwds) { // set the function logic - if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'DATETIME' || datatype_vvvvwds == 'DATE' || datatype_vvvvwds == 'TIME' || datatype_vvvvwds == 'INT' || datatype_vvvvwds == 'TINYINT' || datatype_vvvvwds == 'BIGINT' || datatype_vvvvwds == 'FLOAT' || datatype_vvvvwds == 'DECIMAL' || datatype_vvvvwds == 'DOUBLE') + if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'TEXT' || datatype_vvvvwds == 'MEDIUMTEXT' || datatype_vvvvwds == 'LONGTEXT' || datatype_vvvvwds == 'BLOB' || datatype_vvvvwds == 'TINYBLOB' || datatype_vvvvwds == 'MEDIUMBLOB' || datatype_vvvvwds == 'LONGBLOB') { return true; } @@ -382,90 +542,21 @@ function has_defaults_vvvvwds_SomeFunc(has_defaults_vvvvwds) return false; } -// the vvvvwdt function -function vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt) -{ - if (isSet(has_defaults_vvvvwdt) && has_defaults_vvvvwdt.constructor !== Array) - { - var temp_vvvvwdt = has_defaults_vvvvwdt; - var has_defaults_vvvvwdt = []; - has_defaults_vvvvwdt.push(temp_vvvvwdt); - } - else if (!isSet(has_defaults_vvvvwdt)) - { - var has_defaults_vvvvwdt = []; - } - var has_defaults = has_defaults_vvvvwdt.some(has_defaults_vvvvwdt_SomeFunc); - - if (isSet(datatype_vvvvwdt) && datatype_vvvvwdt.constructor !== Array) - { - var temp_vvvvwdt = datatype_vvvvwdt; - var datatype_vvvvwdt = []; - datatype_vvvvwdt.push(temp_vvvvwdt); - } - else if (!isSet(datatype_vvvvwdt)) - { - var datatype_vvvvwdt = []; - } - var datatype = datatype_vvvvwdt.some(datatype_vvvvwdt_SomeFunc); - - - // set this function logic - if (has_defaults && datatype) - { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwdtvyb_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwdtvyb_required = false; - } - } - else - { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwdtvyb_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwdtvyb_required = true; - } - } -} - -// the vvvvwdt Some function -function has_defaults_vvvvwdt_SomeFunc(has_defaults_vvvvwdt) -{ - // set the function logic - if (has_defaults_vvvvwdt == 1) - { - return true; - } - return false; -} - -// the vvvvwdt Some function -function datatype_vvvvwdt_SomeFunc(datatype_vvvvwdt) -{ - // set the function logic - if (datatype_vvvvwdt == 'CHAR' || datatype_vvvvwdt == 'VARCHAR' || datatype_vvvvwdt == 'DATETIME' || datatype_vvvvwdt == 'DATE' || datatype_vvvvwdt == 'TIME' || datatype_vvvvwdt == 'INT' || datatype_vvvvwdt == 'TINYINT' || datatype_vvvvwdt == 'BIGINT' || datatype_vvvvwdt == 'FLOAT' || datatype_vvvvwdt == 'DECIMAL' || datatype_vvvvwdt == 'DOUBLE') - { - return true; - } - return false; -} - // the vvvvwdu function -function vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu) +function vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu) { + if (isSet(store_vvvvwdu) && store_vvvvwdu.constructor !== Array) + { + var temp_vvvvwdu = store_vvvvwdu; + var store_vvvvwdu = []; + store_vvvvwdu.push(temp_vvvvwdu); + } + else if (!isSet(store_vvvvwdu)) + { + var store_vvvvwdu = []; + } + var store = store_vvvvwdu.some(store_vvvvwdu_SomeFunc); + if (isSet(datatype_vvvvwdu) && datatype_vvvvwdu.constructor !== Array) { var temp_vvvvwdu = datatype_vvvvwdu; @@ -492,34 +583,27 @@ function vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu) // set this function logic - if (datatype && has_defaults) + if (store && datatype && has_defaults) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwduvyc_required) - { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwduvyc_required = false; - } + jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwduvyc_required) - { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwduvyc_required = true; - } + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } +// the vvvvwdu Some function +function store_vvvvwdu_SomeFunc(store_vvvvwdu) +{ + // set the function logic + if (store_vvvvwdu == 4) + { + return true; + } + return false; +} + // the vvvvwdu Some function function datatype_vvvvwdu_SomeFunc(datatype_vvvvwdu) { @@ -542,9 +626,105 @@ function has_defaults_vvvvwdu_SomeFunc(has_defaults_vvvvwdu) return false; } -// the vvvvwdw function -function vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw) +// the vvvvwdv function +function vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv) { + if (isSet(datatype_vvvvwdv) && datatype_vvvvwdv.constructor !== Array) + { + var temp_vvvvwdv = datatype_vvvvwdv; + var datatype_vvvvwdv = []; + datatype_vvvvwdv.push(temp_vvvvwdv); + } + else if (!isSet(datatype_vvvvwdv)) + { + var datatype_vvvvwdv = []; + } + var datatype = datatype_vvvvwdv.some(datatype_vvvvwdv_SomeFunc); + + if (isSet(store_vvvvwdv) && store_vvvvwdv.constructor !== Array) + { + var temp_vvvvwdv = store_vvvvwdv; + var store_vvvvwdv = []; + store_vvvvwdv.push(temp_vvvvwdv); + } + else if (!isSet(store_vvvvwdv)) + { + var store_vvvvwdv = []; + } + var store = store_vvvvwdv.some(store_vvvvwdv_SomeFunc); + + if (isSet(has_defaults_vvvvwdv) && has_defaults_vvvvwdv.constructor !== Array) + { + var temp_vvvvwdv = has_defaults_vvvvwdv; + var has_defaults_vvvvwdv = []; + has_defaults_vvvvwdv.push(temp_vvvvwdv); + } + else if (!isSet(has_defaults_vvvvwdv)) + { + var has_defaults_vvvvwdv = []; + } + var has_defaults = has_defaults_vvvvwdv.some(has_defaults_vvvvwdv_SomeFunc); + + + // set this function logic + if (datatype && store && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwdv Some function +function datatype_vvvvwdv_SomeFunc(datatype_vvvvwdv) +{ + // set the function logic + if (datatype_vvvvwdv == 'CHAR' || datatype_vvvvwdv == 'VARCHAR' || datatype_vvvvwdv == 'TEXT' || datatype_vvvvwdv == 'MEDIUMTEXT' || datatype_vvvvwdv == 'LONGTEXT' || datatype_vvvvwdv == 'BLOB' || datatype_vvvvwdv == 'TINYBLOB' || datatype_vvvvwdv == 'MEDIUMBLOB' || datatype_vvvvwdv == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwdv Some function +function store_vvvvwdv_SomeFunc(store_vvvvwdv) +{ + // set the function logic + if (store_vvvvwdv == 4) + { + return true; + } + return false; +} + +// the vvvvwdv Some function +function has_defaults_vvvvwdv_SomeFunc(has_defaults_vvvvwdv) +{ + // set the function logic + if (has_defaults_vvvvwdv == 1) + { + return true; + } + return false; +} + +// the vvvvwdw function +function vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw) +{ + if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array) + { + var temp_vvvvwdw = has_defaults_vvvvwdw; + var has_defaults_vvvvwdw = []; + has_defaults_vvvvwdw.push(temp_vvvvwdw); + } + else if (!isSet(has_defaults_vvvvwdw)) + { + var has_defaults_vvvvwdw = []; + } + var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc); + if (isSet(store_vvvvwdw) && store_vvvvwdw.constructor !== Array) { var temp_vvvvwdw = store_vvvvwdw; @@ -569,21 +749,9 @@ function vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw) } var datatype = datatype_vvvvwdw.some(datatype_vvvvwdw_SomeFunc); - if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array) - { - var temp_vvvvwdw = has_defaults_vvvvwdw; - var has_defaults_vvvvwdw = []; - has_defaults_vvvvwdw.push(temp_vvvvwdw); - } - else if (!isSet(has_defaults_vvvvwdw)) - { - var has_defaults_vvvvwdw = []; - } - var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc); - // set this function logic - if (store && datatype && has_defaults) + if (has_defaults && store && datatype) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } @@ -593,6 +761,17 @@ function vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw) } } +// the vvvvwdw Some function +function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw) +{ + // set the function logic + if (has_defaults_vvvvwdw == 1) + { + return true; + } + return false; +} + // the vvvvwdw Some function function store_vvvvwdw_SomeFunc(store_vvvvwdw) { @@ -615,233 +794,54 @@ function datatype_vvvvwdw_SomeFunc(datatype_vvvvwdw) return false; } -// the vvvvwdw Some function -function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw) -{ - // set the function logic - if (has_defaults_vvvvwdw == 1) - { - return true; - } - return false; -} - // the vvvvwdx function -function vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx) -{ - if (isSet(datatype_vvvvwdx) && datatype_vvvvwdx.constructor !== Array) - { - var temp_vvvvwdx = datatype_vvvvwdx; - var datatype_vvvvwdx = []; - datatype_vvvvwdx.push(temp_vvvvwdx); - } - else if (!isSet(datatype_vvvvwdx)) - { - var datatype_vvvvwdx = []; - } - var datatype = datatype_vvvvwdx.some(datatype_vvvvwdx_SomeFunc); - - if (isSet(store_vvvvwdx) && store_vvvvwdx.constructor !== Array) - { - var temp_vvvvwdx = store_vvvvwdx; - var store_vvvvwdx = []; - store_vvvvwdx.push(temp_vvvvwdx); - } - else if (!isSet(store_vvvvwdx)) - { - var store_vvvvwdx = []; - } - var store = store_vvvvwdx.some(store_vvvvwdx_SomeFunc); - - if (isSet(has_defaults_vvvvwdx) && has_defaults_vvvvwdx.constructor !== Array) - { - var temp_vvvvwdx = has_defaults_vvvvwdx; - var has_defaults_vvvvwdx = []; - has_defaults_vvvvwdx.push(temp_vvvvwdx); - } - else if (!isSet(has_defaults_vvvvwdx)) - { - var has_defaults_vvvvwdx = []; - } - var has_defaults = has_defaults_vvvvwdx.some(has_defaults_vvvvwdx_SomeFunc); - - - // set this function logic - if (datatype && store && has_defaults) - { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); - } - else - { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); - } -} - -// the vvvvwdx Some function -function datatype_vvvvwdx_SomeFunc(datatype_vvvvwdx) -{ - // set the function logic - if (datatype_vvvvwdx == 'CHAR' || datatype_vvvvwdx == 'VARCHAR' || datatype_vvvvwdx == 'TEXT' || datatype_vvvvwdx == 'MEDIUMTEXT' || datatype_vvvvwdx == 'LONGTEXT' || datatype_vvvvwdx == 'BLOB' || datatype_vvvvwdx == 'TINYBLOB' || datatype_vvvvwdx == 'MEDIUMBLOB' || datatype_vvvvwdx == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwdx Some function -function store_vvvvwdx_SomeFunc(store_vvvvwdx) -{ - // set the function logic - if (store_vvvvwdx == 4) - { - return true; - } - return false; -} - -// the vvvvwdx Some function -function has_defaults_vvvvwdx_SomeFunc(has_defaults_vvvvwdx) +function vvvvwdx(has_defaults_vvvvwdx) { // set the function logic if (has_defaults_vvvvwdx == 1) - { - return true; - } - return false; -} - -// the vvvvwdy function -function vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy) -{ - if (isSet(has_defaults_vvvvwdy) && has_defaults_vvvvwdy.constructor !== Array) - { - var temp_vvvvwdy = has_defaults_vvvvwdy; - var has_defaults_vvvvwdy = []; - has_defaults_vvvvwdy.push(temp_vvvvwdy); - } - else if (!isSet(has_defaults_vvvvwdy)) - { - var has_defaults_vvvvwdy = []; - } - var has_defaults = has_defaults_vvvvwdy.some(has_defaults_vvvvwdy_SomeFunc); - - if (isSet(store_vvvvwdy) && store_vvvvwdy.constructor !== Array) - { - var temp_vvvvwdy = store_vvvvwdy; - var store_vvvvwdy = []; - store_vvvvwdy.push(temp_vvvvwdy); - } - else if (!isSet(store_vvvvwdy)) - { - var store_vvvvwdy = []; - } - var store = store_vvvvwdy.some(store_vvvvwdy_SomeFunc); - - if (isSet(datatype_vvvvwdy) && datatype_vvvvwdy.constructor !== Array) - { - var temp_vvvvwdy = datatype_vvvvwdy; - var datatype_vvvvwdy = []; - datatype_vvvvwdy.push(temp_vvvvwdy); - } - else if (!isSet(datatype_vvvvwdy)) - { - var datatype_vvvvwdy = []; - } - var datatype = datatype_vvvvwdy.some(datatype_vvvvwdy_SomeFunc); - - - // set this function logic - if (has_defaults && store && datatype) - { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); - } - else - { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); - } -} - -// the vvvvwdy Some function -function has_defaults_vvvvwdy_SomeFunc(has_defaults_vvvvwdy) -{ - // set the function logic - if (has_defaults_vvvvwdy == 1) - { - return true; - } - return false; -} - -// the vvvvwdy Some function -function store_vvvvwdy_SomeFunc(store_vvvvwdy) -{ - // set the function logic - if (store_vvvvwdy == 4) - { - return true; - } - return false; -} - -// the vvvvwdy Some function -function datatype_vvvvwdy_SomeFunc(datatype_vvvvwdy) -{ - // set the function logic - if (datatype_vvvvwdy == 'CHAR' || datatype_vvvvwdy == 'VARCHAR' || datatype_vvvvwdy == 'TEXT' || datatype_vvvvwdy == 'MEDIUMTEXT' || datatype_vvvvwdy == 'LONGTEXT' || datatype_vvvvwdy == 'BLOB' || datatype_vvvvwdy == 'TINYBLOB' || datatype_vvvvwdy == 'MEDIUMBLOB' || datatype_vvvvwdy == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwdz function -function vvvvwdz(has_defaults_vvvvwdz) -{ - // set the function logic - if (has_defaults_vvvvwdz == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwdzvyd_required) + if (jform_vvvvwdxvya_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwdzvyd_required = false; + jform_vvvvwdxvya_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwdzvye_required) + if (jform_vvvvwdxvyb_required) { updateFieldRequired('null_switch',0); jQuery('#jform_null_switch').prop('required','required'); jQuery('#jform_null_switch').attr('aria-required',true); jQuery('#jform_null_switch').addClass('required'); - jform_vvvvwdzvye_required = false; + jform_vvvvwdxvyb_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwdzvyd_required) + if (!jform_vvvvwdxvya_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwdzvyd_required = true; + jform_vvvvwdxvya_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwdzvye_required) + if (!jform_vvvvwdxvyb_required) { updateFieldRequired('null_switch',1); jQuery('#jform_null_switch').removeAttr('required'); jQuery('#jform_null_switch').removeAttr('aria-required'); jQuery('#jform_null_switch').removeClass('required'); - jform_vvvvwdzvye_required = true; + jform_vvvvwdxvyb_required = true; } } } diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 172e0ac98..0b1d12134 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,98 +9,210 @@ */ // Some Global Values -jform_vvvvwekvyq_required = false; -jform_vvvvwelvyr_required = false; -jform_vvvvwemvys_required = false; -jform_vvvvwenvyt_required = false; -jform_vvvvwepvyu_required = false; +jform_vvvvweivyn_required = false; +jform_vvvvwejvyo_required = false; +jform_vvvvwekvyp_required = false; +jform_vvvvwelvyq_required = false; +jform_vvvvwenvyr_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwek = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwek(location_vvvvwek); + var location_vvvvwei = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwei(location_vvvvwei); - var location_vvvvwel = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwel(location_vvvvwel); + var location_vvvvwej = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwej(location_vvvvwej); + + var type_vvvvwek = jQuery("#jform_type").val(); + vvvvwek(type_vvvvwek); + + var type_vvvvwel = jQuery("#jform_type").val(); + vvvvwel(type_vvvvwel); var type_vvvvwem = jQuery("#jform_type").val(); vvvvwem(type_vvvvwem); - var type_vvvvwen = jQuery("#jform_type").val(); - vvvvwen(type_vvvvwen); - - var type_vvvvweo = jQuery("#jform_type").val(); - vvvvweo(type_vvvvweo); - - var target_vvvvwep = jQuery("#jform_target input[type='radio']:checked").val(); - vvvvwep(target_vvvvwep); + var target_vvvvwen = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwen(target_vvvvwen); }); -// the vvvvwek function -function vvvvwek(location_vvvvwek) +// the vvvvwei function +function vvvvwei(location_vvvvwei) { // set the function logic - if (location_vvvvwek == 1) + if (location_vvvvwei == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwekvyq_required) + if (jform_vvvvweivyn_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwekvyq_required = false; + jform_vvvvweivyn_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwekvyq_required) + if (!jform_vvvvweivyn_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwekvyq_required = true; + jform_vvvvweivyn_required = true; } } } -// the vvvvwel function -function vvvvwel(location_vvvvwel) +// the vvvvwej function +function vvvvwej(location_vvvvwej) { // set the function logic - if (location_vvvvwel == 2) + if (location_vvvvwej == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwelvyr_required) + if (jform_vvvvwejvyo_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwelvyr_required = false; + jform_vvvvwejvyo_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwelvyr_required) + if (!jform_vvvvwejvyo_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); - jform_vvvvwelvyr_required = true; + jform_vvvvwejvyo_required = true; } } } +// the vvvvwek function +function vvvvwek(type_vvvvwek) +{ + if (isSet(type_vvvvwek) && type_vvvvwek.constructor !== Array) + { + var temp_vvvvwek = type_vvvvwek; + var type_vvvvwek = []; + type_vvvvwek.push(temp_vvvvwek); + } + else if (!isSet(type_vvvvwek)) + { + var type_vvvvwek = []; + } + var type = type_vvvvwek.some(type_vvvvwek_SomeFunc); + + + // set this function logic + if (type) + { + jQuery('#jform_url').closest('.control-group').show(); + // add required attribute to url field + if (jform_vvvvwekvyp_required) + { + updateFieldRequired('url',0); + jQuery('#jform_url').prop('required','required'); + jQuery('#jform_url').attr('aria-required',true); + jQuery('#jform_url').addClass('required'); + jform_vvvvwekvyp_required = false; + } + } + else + { + jQuery('#jform_url').closest('.control-group').hide(); + // remove required attribute from url field + if (!jform_vvvvwekvyp_required) + { + updateFieldRequired('url',1); + jQuery('#jform_url').removeAttr('required'); + jQuery('#jform_url').removeAttr('aria-required'); + jQuery('#jform_url').removeClass('required'); + jform_vvvvwekvyp_required = true; + } + } +} + +// the vvvvwek Some function +function type_vvvvwek_SomeFunc(type_vvvvwek) +{ + // set the function logic + if (type_vvvvwek == 3) + { + return true; + } + return false; +} + +// the vvvvwel function +function vvvvwel(type_vvvvwel) +{ + if (isSet(type_vvvvwel) && type_vvvvwel.constructor !== Array) + { + var temp_vvvvwel = type_vvvvwel; + var type_vvvvwel = []; + type_vvvvwel.push(temp_vvvvwel); + } + else if (!isSet(type_vvvvwel)) + { + var type_vvvvwel = []; + } + var type = type_vvvvwel.some(type_vvvvwel_SomeFunc); + + + // set this function logic + if (type) + { + jQuery('#jform_article').closest('.control-group').show(); + // add required attribute to article field + if (jform_vvvvwelvyq_required) + { + updateFieldRequired('article',0); + jQuery('#jform_article').prop('required','required'); + jQuery('#jform_article').attr('aria-required',true); + jQuery('#jform_article').addClass('required'); + jform_vvvvwelvyq_required = false; + } + } + else + { + jQuery('#jform_article').closest('.control-group').hide(); + // remove required attribute from article field + if (!jform_vvvvwelvyq_required) + { + updateFieldRequired('article',1); + jQuery('#jform_article').removeAttr('required'); + jQuery('#jform_article').removeAttr('aria-required'); + jQuery('#jform_article').removeClass('required'); + jform_vvvvwelvyq_required = true; + } + } +} + +// the vvvvwel Some function +function type_vvvvwel_SomeFunc(type_vvvvwel) +{ + // set the function logic + if (type_vvvvwel == 1) + { + return true; + } + return false; +} + // the vvvvwem function function vvvvwem(type_vvvvwem) { @@ -117,118 +229,6 @@ function vvvvwem(type_vvvvwem) var type = type_vvvvwem.some(type_vvvvwem_SomeFunc); - // set this function logic - if (type) - { - jQuery('#jform_url').closest('.control-group').show(); - // add required attribute to url field - if (jform_vvvvwemvys_required) - { - updateFieldRequired('url',0); - jQuery('#jform_url').prop('required','required'); - jQuery('#jform_url').attr('aria-required',true); - jQuery('#jform_url').addClass('required'); - jform_vvvvwemvys_required = false; - } - } - else - { - jQuery('#jform_url').closest('.control-group').hide(); - // remove required attribute from url field - if (!jform_vvvvwemvys_required) - { - updateFieldRequired('url',1); - jQuery('#jform_url').removeAttr('required'); - jQuery('#jform_url').removeAttr('aria-required'); - jQuery('#jform_url').removeClass('required'); - jform_vvvvwemvys_required = true; - } - } -} - -// the vvvvwem Some function -function type_vvvvwem_SomeFunc(type_vvvvwem) -{ - // set the function logic - if (type_vvvvwem == 3) - { - return true; - } - return false; -} - -// the vvvvwen function -function vvvvwen(type_vvvvwen) -{ - if (isSet(type_vvvvwen) && type_vvvvwen.constructor !== Array) - { - var temp_vvvvwen = type_vvvvwen; - var type_vvvvwen = []; - type_vvvvwen.push(temp_vvvvwen); - } - else if (!isSet(type_vvvvwen)) - { - var type_vvvvwen = []; - } - var type = type_vvvvwen.some(type_vvvvwen_SomeFunc); - - - // set this function logic - if (type) - { - jQuery('#jform_article').closest('.control-group').show(); - // add required attribute to article field - if (jform_vvvvwenvyt_required) - { - updateFieldRequired('article',0); - jQuery('#jform_article').prop('required','required'); - jQuery('#jform_article').attr('aria-required',true); - jQuery('#jform_article').addClass('required'); - jform_vvvvwenvyt_required = false; - } - } - else - { - jQuery('#jform_article').closest('.control-group').hide(); - // remove required attribute from article field - if (!jform_vvvvwenvyt_required) - { - updateFieldRequired('article',1); - jQuery('#jform_article').removeAttr('required'); - jQuery('#jform_article').removeAttr('aria-required'); - jQuery('#jform_article').removeClass('required'); - jform_vvvvwenvyt_required = true; - } - } -} - -// the vvvvwen Some function -function type_vvvvwen_SomeFunc(type_vvvvwen) -{ - // set the function logic - if (type_vvvvwen == 1) - { - return true; - } - return false; -} - -// the vvvvweo function -function vvvvweo(type_vvvvweo) -{ - if (isSet(type_vvvvweo) && type_vvvvweo.constructor !== Array) - { - var temp_vvvvweo = type_vvvvweo; - var type_vvvvweo = []; - type_vvvvweo.push(temp_vvvvweo); - } - else if (!isSet(type_vvvvweo)) - { - var type_vvvvweo = []; - } - var type = type_vvvvweo.some(type_vvvvweo_SomeFunc); - - // set this function logic if (type) { @@ -240,45 +240,45 @@ function vvvvweo(type_vvvvweo) } } -// the vvvvweo Some function -function type_vvvvweo_SomeFunc(type_vvvvweo) +// the vvvvwem Some function +function type_vvvvwem_SomeFunc(type_vvvvwem) { // set the function logic - if (type_vvvvweo == 2) + if (type_vvvvwem == 2) { return true; } return false; } -// the vvvvwep function -function vvvvwep(target_vvvvwep) +// the vvvvwen function +function vvvvwen(target_vvvvwen) { // set the function logic - if (target_vvvvwep == 1) + if (target_vvvvwen == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwepvyu_required) + if (jform_vvvvwenvyr_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwepvyu_required = false; + jform_vvvvwenvyr_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwepvyu_required) + if (!jform_vvvvwenvyr_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwepvyu_required = true; + jform_vvvvwenvyr_required = true; } } } diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index 0e8d5c6a4..603cace0d 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -9,24 +9,28 @@ */ // Some Global Values -jform_vvvvweavyg_required = false; -jform_vvvvweavyh_required = false; -jform_vvvvweavyi_required = false; +jform_vvvvwdyvyd_required = false; +jform_vvvvwdyvye_required = false; +jform_vvvvwdyvyf_required = false; +jform_vvvvwdyvyg_required = false; +jform_vvvvwdyvyh_required = false; +jform_vvvvwdzvyi_required = false; jform_vvvvweavyj_required = false; -jform_vvvvweavyk_required = false; -jform_vvvvwebvyl_required = false; -jform_vvvvwecvym_required = false; -jform_vvvvweevyn_required = false; -jform_vvvvwegvyo_required = false; +jform_vvvvwecvyk_required = false; +jform_vvvvweevyl_required = false; // Initial Script jQuery(document).ready(function() { - var protocol_vvvvwea = jQuery("#jform_protocol").val(); - vvvvwea(protocol_vvvvwea); + var protocol_vvvvwdy = jQuery("#jform_protocol").val(); + vvvvwdy(protocol_vvvvwdy); - var protocol_vvvvweb = jQuery("#jform_protocol").val(); - vvvvweb(protocol_vvvvweb); + var protocol_vvvvwdz = jQuery("#jform_protocol").val(); + vvvvwdz(protocol_vvvvwdz); + + var protocol_vvvvwea = jQuery("#jform_protocol").val(); + var authentication_vvvvwea = jQuery("#jform_authentication").val(); + vvvvwea(protocol_vvvvwea,authentication_vvvvwea); var protocol_vvvvwec = jQuery("#jform_protocol").val(); var authentication_vvvvwec = jQuery("#jform_authentication").val(); @@ -39,14 +43,206 @@ jQuery(document).ready(function() var protocol_vvvvweg = jQuery("#jform_protocol").val(); var authentication_vvvvweg = jQuery("#jform_authentication").val(); vvvvweg(protocol_vvvvweg,authentication_vvvvweg); - - var protocol_vvvvwei = jQuery("#jform_protocol").val(); - var authentication_vvvvwei = jQuery("#jform_authentication").val(); - vvvvwei(protocol_vvvvwei,authentication_vvvvwei); }); +// the vvvvwdy function +function vvvvwdy(protocol_vvvvwdy) +{ + if (isSet(protocol_vvvvwdy) && protocol_vvvvwdy.constructor !== Array) + { + var temp_vvvvwdy = protocol_vvvvwdy; + var protocol_vvvvwdy = []; + protocol_vvvvwdy.push(temp_vvvvwdy); + } + else if (!isSet(protocol_vvvvwdy)) + { + var protocol_vvvvwdy = []; + } + var protocol = protocol_vvvvwdy.some(protocol_vvvvwdy_SomeFunc); + + + // set this function logic + if (protocol) + { + jQuery('#jform_authentication').closest('.control-group').show(); + // add required attribute to authentication field + if (jform_vvvvwdyvyd_required) + { + updateFieldRequired('authentication',0); + jQuery('#jform_authentication').prop('required','required'); + jQuery('#jform_authentication').attr('aria-required',true); + jQuery('#jform_authentication').addClass('required'); + jform_vvvvwdyvyd_required = false; + } + jQuery('#jform_host').closest('.control-group').show(); + // add required attribute to host field + if (jform_vvvvwdyvye_required) + { + updateFieldRequired('host',0); + jQuery('#jform_host').prop('required','required'); + jQuery('#jform_host').attr('aria-required',true); + jQuery('#jform_host').addClass('required'); + jform_vvvvwdyvye_required = false; + } + jQuery('#jform_port').closest('.control-group').show(); + // add required attribute to port field + if (jform_vvvvwdyvyf_required) + { + updateFieldRequired('port',0); + jQuery('#jform_port').prop('required','required'); + jQuery('#jform_port').attr('aria-required',true); + jQuery('#jform_port').addClass('required'); + jform_vvvvwdyvyf_required = false; + } + jQuery('#jform_path').closest('.control-group').show(); + // add required attribute to path field + if (jform_vvvvwdyvyg_required) + { + updateFieldRequired('path',0); + jQuery('#jform_path').prop('required','required'); + jQuery('#jform_path').attr('aria-required',true); + jQuery('#jform_path').addClass('required'); + jform_vvvvwdyvyg_required = false; + } + jQuery('.note_ssh_security').closest('.control-group').show(); + jQuery('#jform_username').closest('.control-group').show(); + // add required attribute to username field + if (jform_vvvvwdyvyh_required) + { + updateFieldRequired('username',0); + jQuery('#jform_username').prop('required','required'); + jQuery('#jform_username').attr('aria-required',true); + jQuery('#jform_username').addClass('required'); + jform_vvvvwdyvyh_required = false; + } + } + else + { + jQuery('#jform_authentication').closest('.control-group').hide(); + // remove required attribute from authentication field + if (!jform_vvvvwdyvyd_required) + { + updateFieldRequired('authentication',1); + jQuery('#jform_authentication').removeAttr('required'); + jQuery('#jform_authentication').removeAttr('aria-required'); + jQuery('#jform_authentication').removeClass('required'); + jform_vvvvwdyvyd_required = true; + } + jQuery('#jform_host').closest('.control-group').hide(); + // remove required attribute from host field + if (!jform_vvvvwdyvye_required) + { + updateFieldRequired('host',1); + jQuery('#jform_host').removeAttr('required'); + jQuery('#jform_host').removeAttr('aria-required'); + jQuery('#jform_host').removeClass('required'); + jform_vvvvwdyvye_required = true; + } + jQuery('#jform_port').closest('.control-group').hide(); + // remove required attribute from port field + if (!jform_vvvvwdyvyf_required) + { + updateFieldRequired('port',1); + jQuery('#jform_port').removeAttr('required'); + jQuery('#jform_port').removeAttr('aria-required'); + jQuery('#jform_port').removeClass('required'); + jform_vvvvwdyvyf_required = true; + } + jQuery('#jform_path').closest('.control-group').hide(); + // remove required attribute from path field + if (!jform_vvvvwdyvyg_required) + { + updateFieldRequired('path',1); + jQuery('#jform_path').removeAttr('required'); + jQuery('#jform_path').removeAttr('aria-required'); + jQuery('#jform_path').removeClass('required'); + jform_vvvvwdyvyg_required = true; + } + jQuery('.note_ssh_security').closest('.control-group').hide(); + jQuery('#jform_username').closest('.control-group').hide(); + // remove required attribute from username field + if (!jform_vvvvwdyvyh_required) + { + updateFieldRequired('username',1); + jQuery('#jform_username').removeAttr('required'); + jQuery('#jform_username').removeAttr('aria-required'); + jQuery('#jform_username').removeClass('required'); + jform_vvvvwdyvyh_required = true; + } + } +} + +// the vvvvwdy Some function +function protocol_vvvvwdy_SomeFunc(protocol_vvvvwdy) +{ + // set the function logic + if (protocol_vvvvwdy == 2) + { + return true; + } + return false; +} + +// the vvvvwdz function +function vvvvwdz(protocol_vvvvwdz) +{ + if (isSet(protocol_vvvvwdz) && protocol_vvvvwdz.constructor !== Array) + { + var temp_vvvvwdz = protocol_vvvvwdz; + var protocol_vvvvwdz = []; + protocol_vvvvwdz.push(temp_vvvvwdz); + } + else if (!isSet(protocol_vvvvwdz)) + { + var protocol_vvvvwdz = []; + } + var protocol = protocol_vvvvwdz.some(protocol_vvvvwdz_SomeFunc); + + + // set this function logic + if (protocol) + { + jQuery('.note_ftp_signature').closest('.control-group').show(); + jQuery('#jform_signature').closest('.control-group').show(); + // add required attribute to signature field + if (jform_vvvvwdzvyi_required) + { + updateFieldRequired('signature',0); + jQuery('#jform_signature').prop('required','required'); + jQuery('#jform_signature').attr('aria-required',true); + jQuery('#jform_signature').addClass('required'); + jform_vvvvwdzvyi_required = false; + } + } + else + { + jQuery('.note_ftp_signature').closest('.control-group').hide(); + jQuery('#jform_signature').closest('.control-group').hide(); + // remove required attribute from signature field + if (!jform_vvvvwdzvyi_required) + { + updateFieldRequired('signature',1); + jQuery('#jform_signature').removeAttr('required'); + jQuery('#jform_signature').removeAttr('aria-required'); + jQuery('#jform_signature').removeClass('required'); + jform_vvvvwdzvyi_required = true; + } + } +} + +// the vvvvwdz Some function +function protocol_vvvvwdz_SomeFunc(protocol_vvvvwdz) +{ + // set the function logic + if (protocol_vvvvwdz == 1) + { + return true; + } + return false; +} + // the vvvvwea function -function vvvvwea(protocol_vvvvwea) +function vvvvwea(protocol_vvvvwea,authentication_vvvvwea) { if (isSet(protocol_vvvvwea) && protocol_vvvvwea.constructor !== Array) { @@ -60,115 +256,45 @@ function vvvvwea(protocol_vvvvwea) } var protocol = protocol_vvvvwea.some(protocol_vvvvwea_SomeFunc); + if (isSet(authentication_vvvvwea) && authentication_vvvvwea.constructor !== Array) + { + var temp_vvvvwea = authentication_vvvvwea; + var authentication_vvvvwea = []; + authentication_vvvvwea.push(temp_vvvvwea); + } + else if (!isSet(authentication_vvvvwea)) + { + var authentication_vvvvwea = []; + } + var authentication = authentication_vvvvwea.some(authentication_vvvvwea_SomeFunc); + // set this function logic - if (protocol) + if (protocol && authentication) { - jQuery('#jform_authentication').closest('.control-group').show(); - // add required attribute to authentication field - if (jform_vvvvweavyg_required) - { - updateFieldRequired('authentication',0); - jQuery('#jform_authentication').prop('required','required'); - jQuery('#jform_authentication').attr('aria-required',true); - jQuery('#jform_authentication').addClass('required'); - jform_vvvvweavyg_required = false; - } - jQuery('#jform_host').closest('.control-group').show(); - // add required attribute to host field - if (jform_vvvvweavyh_required) - { - updateFieldRequired('host',0); - jQuery('#jform_host').prop('required','required'); - jQuery('#jform_host').attr('aria-required',true); - jQuery('#jform_host').addClass('required'); - jform_vvvvweavyh_required = false; - } - jQuery('#jform_port').closest('.control-group').show(); - // add required attribute to port field - if (jform_vvvvweavyi_required) - { - updateFieldRequired('port',0); - jQuery('#jform_port').prop('required','required'); - jQuery('#jform_port').attr('aria-required',true); - jQuery('#jform_port').addClass('required'); - jform_vvvvweavyi_required = false; - } - jQuery('#jform_path').closest('.control-group').show(); - // add required attribute to path field + jQuery('#jform_password').closest('.control-group').show(); + // add required attribute to password field if (jform_vvvvweavyj_required) { - updateFieldRequired('path',0); - jQuery('#jform_path').prop('required','required'); - jQuery('#jform_path').attr('aria-required',true); - jQuery('#jform_path').addClass('required'); + updateFieldRequired('password',0); + jQuery('#jform_password').prop('required','required'); + jQuery('#jform_password').attr('aria-required',true); + jQuery('#jform_password').addClass('required'); jform_vvvvweavyj_required = false; } - jQuery('.note_ssh_security').closest('.control-group').show(); - jQuery('#jform_username').closest('.control-group').show(); - // add required attribute to username field - if (jform_vvvvweavyk_required) - { - updateFieldRequired('username',0); - jQuery('#jform_username').prop('required','required'); - jQuery('#jform_username').attr('aria-required',true); - jQuery('#jform_username').addClass('required'); - jform_vvvvweavyk_required = false; - } } else { - jQuery('#jform_authentication').closest('.control-group').hide(); - // remove required attribute from authentication field - if (!jform_vvvvweavyg_required) - { - updateFieldRequired('authentication',1); - jQuery('#jform_authentication').removeAttr('required'); - jQuery('#jform_authentication').removeAttr('aria-required'); - jQuery('#jform_authentication').removeClass('required'); - jform_vvvvweavyg_required = true; - } - jQuery('#jform_host').closest('.control-group').hide(); - // remove required attribute from host field - if (!jform_vvvvweavyh_required) - { - updateFieldRequired('host',1); - jQuery('#jform_host').removeAttr('required'); - jQuery('#jform_host').removeAttr('aria-required'); - jQuery('#jform_host').removeClass('required'); - jform_vvvvweavyh_required = true; - } - jQuery('#jform_port').closest('.control-group').hide(); - // remove required attribute from port field - if (!jform_vvvvweavyi_required) - { - updateFieldRequired('port',1); - jQuery('#jform_port').removeAttr('required'); - jQuery('#jform_port').removeAttr('aria-required'); - jQuery('#jform_port').removeClass('required'); - jform_vvvvweavyi_required = true; - } - jQuery('#jform_path').closest('.control-group').hide(); - // remove required attribute from path field + jQuery('#jform_password').closest('.control-group').hide(); + // remove required attribute from password field if (!jform_vvvvweavyj_required) { - updateFieldRequired('path',1); - jQuery('#jform_path').removeAttr('required'); - jQuery('#jform_path').removeAttr('aria-required'); - jQuery('#jform_path').removeClass('required'); + updateFieldRequired('password',1); + jQuery('#jform_password').removeAttr('required'); + jQuery('#jform_password').removeAttr('aria-required'); + jQuery('#jform_password').removeClass('required'); jform_vvvvweavyj_required = true; } - jQuery('.note_ssh_security').closest('.control-group').hide(); - jQuery('#jform_username').closest('.control-group').hide(); - // remove required attribute from username field - if (!jform_vvvvweavyk_required) - { - updateFieldRequired('username',1); - jQuery('#jform_username').removeAttr('required'); - jQuery('#jform_username').removeAttr('aria-required'); - jQuery('#jform_username').removeClass('required'); - jform_vvvvweavyk_required = true; - } } } @@ -183,58 +309,11 @@ function protocol_vvvvwea_SomeFunc(protocol_vvvvwea) return false; } -// the vvvvweb function -function vvvvweb(protocol_vvvvweb) -{ - if (isSet(protocol_vvvvweb) && protocol_vvvvweb.constructor !== Array) - { - var temp_vvvvweb = protocol_vvvvweb; - var protocol_vvvvweb = []; - protocol_vvvvweb.push(temp_vvvvweb); - } - else if (!isSet(protocol_vvvvweb)) - { - var protocol_vvvvweb = []; - } - var protocol = protocol_vvvvweb.some(protocol_vvvvweb_SomeFunc); - - - // set this function logic - if (protocol) - { - jQuery('.note_ftp_signature').closest('.control-group').show(); - jQuery('#jform_signature').closest('.control-group').show(); - // add required attribute to signature field - if (jform_vvvvwebvyl_required) - { - updateFieldRequired('signature',0); - jQuery('#jform_signature').prop('required','required'); - jQuery('#jform_signature').attr('aria-required',true); - jQuery('#jform_signature').addClass('required'); - jform_vvvvwebvyl_required = false; - } - } - else - { - jQuery('.note_ftp_signature').closest('.control-group').hide(); - jQuery('#jform_signature').closest('.control-group').hide(); - // remove required attribute from signature field - if (!jform_vvvvwebvyl_required) - { - updateFieldRequired('signature',1); - jQuery('#jform_signature').removeAttr('required'); - jQuery('#jform_signature').removeAttr('aria-required'); - jQuery('#jform_signature').removeClass('required'); - jform_vvvvwebvyl_required = true; - } - } -} - -// the vvvvweb Some function -function protocol_vvvvweb_SomeFunc(protocol_vvvvweb) +// the vvvvwea Some function +function authentication_vvvvwea_SomeFunc(authentication_vvvvwea) { // set the function logic - if (protocol_vvvvweb == 1) + if (authentication_vvvvwea == 1 || authentication_vvvvwea == 3 || authentication_vvvvwea == 5) { return true; } @@ -272,28 +351,28 @@ function vvvvwec(protocol_vvvvwec,authentication_vvvvwec) // set this function logic if (protocol && authentication) { - jQuery('#jform_password').closest('.control-group').show(); - // add required attribute to password field - if (jform_vvvvwecvym_required) + jQuery('#jform_private').closest('.control-group').show(); + // add required attribute to private field + if (jform_vvvvwecvyk_required) { - updateFieldRequired('password',0); - jQuery('#jform_password').prop('required','required'); - jQuery('#jform_password').attr('aria-required',true); - jQuery('#jform_password').addClass('required'); - jform_vvvvwecvym_required = false; + updateFieldRequired('private',0); + jQuery('#jform_private').prop('required','required'); + jQuery('#jform_private').attr('aria-required',true); + jQuery('#jform_private').addClass('required'); + jform_vvvvwecvyk_required = false; } } else { - jQuery('#jform_password').closest('.control-group').hide(); - // remove required attribute from password field - if (!jform_vvvvwecvym_required) + jQuery('#jform_private').closest('.control-group').hide(); + // remove required attribute from private field + if (!jform_vvvvwecvyk_required) { - updateFieldRequired('password',1); - jQuery('#jform_password').removeAttr('required'); - jQuery('#jform_password').removeAttr('aria-required'); - jQuery('#jform_password').removeClass('required'); - jform_vvvvwecvym_required = true; + updateFieldRequired('private',1); + jQuery('#jform_private').removeAttr('required'); + jQuery('#jform_private').removeAttr('aria-required'); + jQuery('#jform_private').removeClass('required'); + jform_vvvvwecvyk_required = true; } } } @@ -313,7 +392,7 @@ function protocol_vvvvwec_SomeFunc(protocol_vvvvwec) function authentication_vvvvwec_SomeFunc(authentication_vvvvwec) { // set the function logic - if (authentication_vvvvwec == 1 || authentication_vvvvwec == 3 || authentication_vvvvwec == 5) + if (authentication_vvvvwec == 2 || authentication_vvvvwec == 3) { return true; } @@ -351,28 +430,28 @@ function vvvvwee(protocol_vvvvwee,authentication_vvvvwee) // set this function logic if (protocol && authentication) { - jQuery('#jform_private').closest('.control-group').show(); - // add required attribute to private field - if (jform_vvvvweevyn_required) + jQuery('#jform_private_key').closest('.control-group').show(); + // add required attribute to private_key field + if (jform_vvvvweevyl_required) { - updateFieldRequired('private',0); - jQuery('#jform_private').prop('required','required'); - jQuery('#jform_private').attr('aria-required',true); - jQuery('#jform_private').addClass('required'); - jform_vvvvweevyn_required = false; + updateFieldRequired('private_key',0); + jQuery('#jform_private_key').prop('required','required'); + jQuery('#jform_private_key').attr('aria-required',true); + jQuery('#jform_private_key').addClass('required'); + jform_vvvvweevyl_required = false; } } else { - jQuery('#jform_private').closest('.control-group').hide(); - // remove required attribute from private field - if (!jform_vvvvweevyn_required) + jQuery('#jform_private_key').closest('.control-group').hide(); + // remove required attribute from private_key field + if (!jform_vvvvweevyl_required) { - updateFieldRequired('private',1); - jQuery('#jform_private').removeAttr('required'); - jQuery('#jform_private').removeAttr('aria-required'); - jQuery('#jform_private').removeClass('required'); - jform_vvvvweevyn_required = true; + updateFieldRequired('private_key',1); + jQuery('#jform_private_key').removeAttr('required'); + jQuery('#jform_private_key').removeAttr('aria-required'); + jQuery('#jform_private_key').removeClass('required'); + jform_vvvvweevyl_required = true; } } } @@ -392,7 +471,7 @@ function protocol_vvvvwee_SomeFunc(protocol_vvvvwee) function authentication_vvvvwee_SomeFunc(authentication_vvvvwee) { // set the function logic - if (authentication_vvvvwee == 2 || authentication_vvvvwee == 3) + if (authentication_vvvvwee == 4 || authentication_vvvvwee == 5) { return true; } @@ -430,29 +509,11 @@ function vvvvweg(protocol_vvvvweg,authentication_vvvvweg) // set this function logic if (protocol && authentication) { - jQuery('#jform_private_key').closest('.control-group').show(); - // add required attribute to private_key field - if (jform_vvvvwegvyo_required) - { - updateFieldRequired('private_key',0); - jQuery('#jform_private_key').prop('required','required'); - jQuery('#jform_private_key').attr('aria-required',true); - jQuery('#jform_private_key').addClass('required'); - jform_vvvvwegvyo_required = false; - } + jQuery('#jform_secret').closest('.control-group').show(); } else { - jQuery('#jform_private_key').closest('.control-group').hide(); - // remove required attribute from private_key field - if (!jform_vvvvwegvyo_required) - { - updateFieldRequired('private_key',1); - jQuery('#jform_private_key').removeAttr('required'); - jQuery('#jform_private_key').removeAttr('aria-required'); - jQuery('#jform_private_key').removeClass('required'); - jform_vvvvwegvyo_required = true; - } + jQuery('#jform_secret').closest('.control-group').hide(); } } @@ -471,68 +532,7 @@ function protocol_vvvvweg_SomeFunc(protocol_vvvvweg) function authentication_vvvvweg_SomeFunc(authentication_vvvvweg) { // set the function logic - if (authentication_vvvvweg == 4 || authentication_vvvvweg == 5) - { - return true; - } - return false; -} - -// the vvvvwei function -function vvvvwei(protocol_vvvvwei,authentication_vvvvwei) -{ - if (isSet(protocol_vvvvwei) && protocol_vvvvwei.constructor !== Array) - { - var temp_vvvvwei = protocol_vvvvwei; - var protocol_vvvvwei = []; - protocol_vvvvwei.push(temp_vvvvwei); - } - else if (!isSet(protocol_vvvvwei)) - { - var protocol_vvvvwei = []; - } - var protocol = protocol_vvvvwei.some(protocol_vvvvwei_SomeFunc); - - if (isSet(authentication_vvvvwei) && authentication_vvvvwei.constructor !== Array) - { - var temp_vvvvwei = authentication_vvvvwei; - var authentication_vvvvwei = []; - authentication_vvvvwei.push(temp_vvvvwei); - } - else if (!isSet(authentication_vvvvwei)) - { - var authentication_vvvvwei = []; - } - var authentication = authentication_vvvvwei.some(authentication_vvvvwei_SomeFunc); - - - // set this function logic - if (protocol && authentication) - { - jQuery('#jform_secret').closest('.control-group').show(); - } - else - { - jQuery('#jform_secret').closest('.control-group').hide(); - } -} - -// the vvvvwei Some function -function protocol_vvvvwei_SomeFunc(protocol_vvvvwei) -{ - // set the function logic - if (protocol_vvvvwei == 2) - { - return true; - } - return false; -} - -// the vvvvwei Some function -function authentication_vvvvwei_SomeFunc(authentication_vvvvwei) -{ - // set the function logic - if (authentication_vvvvwei == 2 || authentication_vvvvwei == 3 || authentication_vvvvwei == 4 || authentication_vvvvwei == 5) + if (authentication_vvvvweg == 2 || authentication_vvvvweg == 3 || authentication_vvvvweg == 4 || authentication_vvvvweg == 5) { return true; } diff --git a/admin/models/server.php b/admin/models/server.php index e81331f46..7411bbbb8 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -191,7 +191,7 @@ class ComponentbuilderModelServer extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyplinked_components() + public function getVymlinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 737375ae9..6f7d3298f 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2129,7 +2129,7 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, -- INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name`, `properties`, `short_description`, `params`, `published`, `version`, `hits`, `ordering`, `guid`) VALUES -(1, '', 'The calendar form field type provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value. If the field has a saved value this is shown in the text box. Otherwis', 'Calendar', '{\"properties0\":{\"name\":\"type\",\"example\":\"calendar\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be calendar.\"},\"properties1\":{\"name\":\"name\",\"example\":\"date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"NOW\",\"adjustable\":\"1\",\"description\":\"(optional) is the default date. This must be given in the same format as specified by the format argument. You can put \\\"NOW\\\" to have current time.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the text box.\"},\"properties5\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is read-only (true or false). If the text box is read-only, the date cannot be changed, but can be selected and copied. No calendar icon will be shown.\"},\"properties6\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is disabled (true or false). If the text box is disabled, the date cannot be changed, selected or copied.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"format\",\"example\":\"%d-%m-%Y\",\"adjustable\":\"1\",\"description\":\"(optional) is the date format to be used. This is in the format used by PHP to specify date string formats (see below). If no format argument is given, \'%Y-%m-%d\' is assumed (giving dates like \'2008-04-16\').\"},\"properties9\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is time zone to be used. There are two values; server_utc and user_utc. The first one is server time zone and the later is user time zone as configured in global configuration and user information respectively.\"},\"properties10\":{\"name\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional)\"},\"properties11\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"translateformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true, the calendar will use a language string to determine the format. The `format` attribute is ignored. If false, the `format` attribute is used (same behaviour as today). (starting with 3.7.0)\"},\"properties14\":{\"name\":\"showtime\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true and translateformat is true, the language key DATE_FORMAT_CALENDAR_DATETIME is used, otherwise DATE_FORMAT_CALENDAR_DATE. (starting with 3.7.0)\"},\"properties15\":{\"name\":\"timeformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): can be set to 12 (and specify AM or PM) or 24 (starting with 3.7.0)\"},\"properties16\":{\"name\":\"singleheader\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to false, the year and the month selection will be set on two separates lines, with independant selection (starting with 3.7.0)\"},\"properties17\":{\"name\":\"todaybutton\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a button is added at the bottom of the datePicker to select the date of the current day (starting with 3.7.0)\"},\"properties18\":{\"name\":\"weeknumbers\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a column is added at the left of the datePicker to display the number of the week in the current year (starting with 3.7.0)\"},\"properties19\":{\"name\":\"filltable\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, dates of the previous and next month is added at the top and the bottom of the current month to fill the grid (starting with 3.7.0)\"},\"properties20\":{\"name\":\"minyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative lower limit for the year selection. The user could not select a year before your limit (starting with 3.7.0)\"},\"properties21\":{\"name\":\"maxyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative upper limit for the year selection. The user could not select a year after your limit (starting with 3.7.0)\"}}', 'provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value.', '', 1, 7, '', '', '6cf5a33f-cb25-4a58-bfec-7e1511896402'), +(1, '', 'The calendar form field type provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value. If the field has a saved value this is shown in the text box. Otherwis', 'Calendar', '{\"properties0\":{\"name\":\"type\",\"example\":\"calendar\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be calendar.\"},\"properties1\":{\"name\":\"name\",\"example\":\"date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"NOW\",\"adjustable\":\"1\",\"description\":\"(optional) is the default date. This must be given in the same format as specified by the format argument. You can put \\\"NOW\\\" to have current time.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the text box.\"},\"properties5\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is read-only (true or false). If the text box is read-only, the date cannot be changed, but can be selected and copied. No calendar icon will be shown.\"},\"properties6\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is disabled (true or false). If the text box is disabled, the date cannot be changed, selected or copied.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"format\",\"example\":\"%d-%m-%Y\",\"adjustable\":\"1\",\"description\":\"(optional) is the date format to be used. This is in the format used by PHP to specify date string formats (see below). If no format argument is given, \'%Y-%m-%d\' is assumed (giving dates like \'2008-04-16\').\"},\"properties9\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is time zone to be used. There are two values; server_utc and user_utc. The first one is server time zone and the later is user time zone as configured in global configuration and user information respectively.\"},\"properties10\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties23\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties11\":{\"name\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional)\"},\"properties12\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"translateformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true, the calendar will use a language string to determine the format. The `format` attribute is ignored. If false, the `format` attribute is used (same behaviour as today). (starting with 3.7.0)\"},\"properties15\":{\"name\":\"showtime\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true and translateformat is true, the language key DATE_FORMAT_CALENDAR_DATETIME is used, otherwise DATE_FORMAT_CALENDAR_DATE. (starting with 3.7.0)\"},\"properties16\":{\"name\":\"timeformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): can be set to 12 (and specify AM or PM) or 24 (starting with 3.7.0)\"},\"properties17\":{\"name\":\"singleheader\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to false, the year and the month selection will be set on two separates lines, with independant selection (starting with 3.7.0)\"},\"properties18\":{\"name\":\"todaybutton\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a button is added at the bottom of the datePicker to select the date of the current day (starting with 3.7.0)\"},\"properties19\":{\"name\":\"weeknumbers\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a column is added at the left of the datePicker to display the number of the week in the current year (starting with 3.7.0)\"},\"properties20\":{\"name\":\"filltable\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, dates of the previous and next month is added at the top and the bottom of the current month to fill the grid (starting with 3.7.0)\"},\"properties21\":{\"name\":\"minyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative lower limit for the year selection. The user could not select a year before your limit (starting with 3.7.0)\"},\"properties22\":{\"name\":\"maxyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative upper limit for the year selection. The user could not select a year after your limit (starting with 3.7.0)\"}}', 'provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value.', '', 1, 9, '', '', '6cf5a33f-cb25-4a58-bfec-7e1511896402'), (2, '', 'The category form field type provides a drop down list of all published categories for a certain extension. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected. If the show_root', 'Category', '{\"properties0\":{\"name\":\"type\",\"example\":\"category\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be category.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mycategory\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a category\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"extension\",\"example\":\"com_content\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the name of the extension for which the categories will be retrieved. For example, to list content categories, use the value \'com_content\'. You can add also target one view, use the value \'com_component.view\'.\"},\"properties4\":{\"name\":\"scope\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is an alias for extension.\"},\"properties5\":{\"name\":\"required\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"show_root\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) is whether a choice representing the root category will be shown. Remove completely if it is not to be shown.\"},\"properties7\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default category ID number.\"},\"properties8\":{\"name\":\"description\",\"example\":\"select one of the following categories\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties10\":{\"name\":\"published\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) (1\\/0\\/2\\/-2) is whether the drop down will show only published (1), unpublished (0), archived (2) or trashed (-2) categories. It is possible to combine different publishing status by entering the list of the corresponding numbers separated by comma (e.g. \\\"0,2,-2\\\" will display only unpublished, archived and trashed categories in the drop-down).\"},\"properties11\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides a drop down list of categories for an extension.', '', 1, 11, '', '', 'f70346b3-2096-4f44-8b26-01ab87da7d1e'), (3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 7, '', '', '10066262-b6e3-4f82-941e-cbe4f61ddd6c'), (4, '', 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of ', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides unlimited checkboxes that can be used for multi-select.', '', 1, 4, '', '', 'ac10859b-58da-4584-9682-36a6c2c8d04d'), @@ -2144,7 +2144,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name (13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a meter to show value in a range.', '', 1, 3, '', '', '81668284-e572-4e17-927b-ba697fc64bd0'), (14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without having to rely on the tooltips). Or adding any other text you want.', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'supports a one line text field.', '', 1, 5, '', '', 'f9ecacd0-8481-4157-8c71-d7aaefc2b7c3'), (15, '', 'Provides a one line text box with up-down handles to set a number in the field.', 'Number', '{\"properties0\":{\"name\":\"type\",\"example\":\"number\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be number.\"},\"properties1\":{\"name\":\"name\",\"example\":\"number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties8\":{\"name\":\"max\",\"example\":\"40\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties9\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Javascript that should run on changing of the value.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a one line text box with up-down handles to set a number in the field.', '', 1, 4, '', '', '5abd2b73-643b-4273-841a-787991aad968'), -(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties13\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Password Here\",\"adjustable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"autocomplete\",\"example\":\"off\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties17\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 9, '', '', '0022598d-0ee1-44f2-aa94-c2eb47595f73'), +(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties13\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Password Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"autocomplete\",\"example\":\"off\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties17\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 10, '', '', '0022598d-0ee1-44f2-aa94-c2eb47595f73'), (17, '', 'The radio form field type provides radio buttons to select different options. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Radio', '{\"properties0\":{\"name\":\"type\",\"example\":\"radio\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be radio.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myradiovalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"btn-group btn-group-yesno\",\"adjustable\":\"1\",\"description\":\"(optional) New in Joomla 3, if set to class=\\\"btn-group btn-group-yesno\\\" will show the nice coloured buttons\"},\"properties5\":{\"name\":\"option\",\"example\":\"1|Yes,0|No\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties6\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default radio button item value.\"},\"properties7\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides radio buttons to select different options.', '', 1, 18, '', '', 'b868ed59-4208-4206-8504-95a35a74a11c'), (18, '', 'Provides a horizontal scroll bar to specify a value in a range.', 'Range', '{\"properties0\":{\"name\":\"type\",\"example\":\"range\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be range.\"},\"properties1\":{\"name\":\"name\",\"example\":\"range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties8\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties9\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"onchange\",\"example\":\"jQuery(\'#jform_range\').closest(\'.controls\').find(\'span\').remove(); var value = jQuery(\'#jform_range\').val();jQuery(\'#jform_range\').closest(\'.controls\').append(\' \'+value+\'\');\",\"adjustable\":\"1\",\"description\":\"(optional) javascript to run when the range is changed\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a horizontal scroll bar to specify a value in a range.', '', 1, 5, '', '', '627d3845-7273-4f75-8e63-7b3a319a42c8'), (19, '', 'Provides a modal with rows of formfields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Repeatable', '{\"properties0\":{\"name\":\"type\",\"example\":\"repeatable\",\"adjustable\":\"1\",\"description\":\"(mandatory) must be repeatable.\"},\"properties1\":{\"name\":\"name\",\"example\":\"repeatable_list\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Repeatable List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties5\":{\"name\":\"id\",\"example\":\"aid\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) id of the hidden from field. (the modal will have this id with an added suffix of \\\"_modal\\\" and the table within the modal will have this id with a suffix of _modal_table\\\")\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) class of the table.\"},\"properties7\":{\"name\":\"select\",\"example\":\"Click here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) The text to show on the modal button.\"},\"properties8\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties9\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties10\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 5, '', '', '05bf68d4-52f9-4705-8ae7-cba137fce0ad'), @@ -2415,7 +2415,9 @@ INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, (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:\\/\\/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), -(7, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdn.jsdelivr.net\\/npm\\/vue\",\"type\":3}}', 10, '', 1, '2020-06-05 13:11:54', '0000-00-00 00:00:00', 1, '', 6); +(7, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdn.jsdelivr.net\\/npm\\/vue\",\"type\":3}}', 10, '', 1, '2020-06-05 13:11:54', '0000-00-00 00:00:00', 1, '', 6), +(8, '{}', '{}', '{\"addurls2\":{\"url\":\"https:\\/\\/cdn.datatables.net\\/1.10.21\\/js\\/jquery.dataTables.min.js\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/cdn.datatables.net\\/1.10.21\\/css\\/dataTables.uikit.min.css\",\"type\":2}}', 11, '', 1, '2020-06-27 21:34:44', '0000-00-00 00:00:00', 1, '', 7), +(9, '{}', '{}', '{\"addurls3\":{\"url\":\"http:\\/\\/code.jquery.com\\/ui\\/1.11.1\\/themes\\/smoothness\\/jquery-ui.css\",\"type\":2},\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/jquery-ui-timepicker-addon\\/1.6.3\\/jquery-ui-timepicker-addon.min.css\",\"type\":2},\"addurls1\":{\"url\":\"http:\\/\\/code.jquery.com\\/ui\\/1.11.1\\/jquery-ui.min.js\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/jquery-ui-timepicker-addon\\/1.6.3\\/jquery-ui-timepicker-addon.min.js\",\"type\":2}}', 12, '', 1, '2020-06-29 00:00:44', '2020-06-29 04:32:57', 4, '', 8); CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 30641b09a..ad01f1828 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -207,180 +207,112 @@ jQuery('#adminForm').on('change', '#jform_datatype',function (e) }); +// #jform_store listeners for store_vvvvwdd function +jQuery('#jform_store').on('keyup',function() +{ + var store_vvvvwdd = jQuery("#jform_store").val(); + var datatype_vvvvwdd = jQuery("#jform_datatype").val(); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); + +}); +jQuery('#adminForm').on('change', '#jform_store',function (e) +{ + e.preventDefault(); + var store_vvvvwdd = jQuery("#jform_store").val(); + var datatype_vvvvwdd = jQuery("#jform_datatype").val(); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); + +}); + // #jform_datatype listeners for datatype_vvvvwdd function jQuery('#jform_datatype').on('keyup',function() { + var store_vvvvwdd = jQuery("#jform_store").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val(); - vvvvwdd(datatype_vvvvwdd); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); }); jQuery('#adminForm').on('change', '#jform_datatype',function (e) { e.preventDefault(); + var store_vvvvwdd = jQuery("#jform_store").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val(); - vvvvwdd(datatype_vvvvwdd); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); }); -// #jform_store listeners for store_vvvvwde function +// #jform_store listeners for store_vvvvwdf function jQuery('#jform_store').on('keyup',function() { - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); + var store_vvvvwdf = jQuery("#jform_store").val(); + vvvvwdf(store_vvvvwdf); }); jQuery('#adminForm').on('change', '#jform_store',function (e) { e.preventDefault(); - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); + var store_vvvvwdf = jQuery("#jform_store").val(); + vvvvwdf(store_vvvvwdf); }); -// #jform_datatype listeners for datatype_vvvvwde function -jQuery('#jform_datatype').on('keyup',function() -{ - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); - -}); -jQuery('#adminForm').on('change', '#jform_datatype',function (e) -{ - e.preventDefault(); - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); - -}); - -// #jform_store listeners for store_vvvvwdg function -jQuery('#jform_store').on('keyup',function() -{ - var store_vvvvwdg = jQuery("#jform_store").val(); - var datatype_vvvvwdg = jQuery("#jform_datatype").val(); - vvvvwdg(store_vvvvwdg,datatype_vvvvwdg); - -}); -jQuery('#adminForm').on('change', '#jform_store',function (e) -{ - e.preventDefault(); - var store_vvvvwdg = jQuery("#jform_store").val(); - var datatype_vvvvwdg = jQuery("#jform_datatype").val(); - vvvvwdg(store_vvvvwdg,datatype_vvvvwdg); - -}); - -// #jform_datatype listeners for datatype_vvvvwdg function -jQuery('#jform_datatype').on('keyup',function() -{ - var store_vvvvwdg = jQuery("#jform_store").val(); - var datatype_vvvvwdg = jQuery("#jform_datatype").val(); - vvvvwdg(store_vvvvwdg,datatype_vvvvwdg); - -}); -jQuery('#adminForm').on('change', '#jform_datatype',function (e) -{ - e.preventDefault(); - var store_vvvvwdg = jQuery("#jform_store").val(); - var datatype_vvvvwdg = jQuery("#jform_datatype").val(); - vvvvwdg(store_vvvvwdg,datatype_vvvvwdg); - -}); - -// #jform_datatype listeners for datatype_vvvvwdh function -jQuery('#jform_datatype').on('keyup',function() -{ - var datatype_vvvvwdh = jQuery("#jform_datatype").val(); - var store_vvvvwdh = jQuery("#jform_store").val(); - vvvvwdh(datatype_vvvvwdh,store_vvvvwdh); - -}); -jQuery('#adminForm').on('change', '#jform_datatype',function (e) -{ - e.preventDefault(); - var datatype_vvvvwdh = jQuery("#jform_datatype").val(); - var store_vvvvwdh = jQuery("#jform_store").val(); - vvvvwdh(datatype_vvvvwdh,store_vvvvwdh); - -}); - -// #jform_store listeners for store_vvvvwdh function -jQuery('#jform_store').on('keyup',function() -{ - var datatype_vvvvwdh = jQuery("#jform_datatype").val(); - var store_vvvvwdh = jQuery("#jform_store").val(); - vvvvwdh(datatype_vvvvwdh,store_vvvvwdh); - -}); -jQuery('#adminForm').on('change', '#jform_store',function (e) -{ - e.preventDefault(); - var datatype_vvvvwdh = jQuery("#jform_datatype").val(); - var store_vvvvwdh = jQuery("#jform_store").val(); - vvvvwdh(datatype_vvvvwdh,store_vvvvwdh); - -}); - -// #jform_add_css_view listeners for add_css_view_vvvvwdi function +// #jform_add_css_view listeners for add_css_view_vvvvwdg function jQuery('#jform_add_css_view').on('keyup',function() { - var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwdi(add_css_view_vvvvwdi); + var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwdg(add_css_view_vvvvwdg); }); jQuery('#adminForm').on('change', '#jform_add_css_view',function (e) { e.preventDefault(); - var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwdi(add_css_view_vvvvwdi); + var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwdg(add_css_view_vvvvwdg); }); -// #jform_add_css_views listeners for add_css_views_vvvvwdj function +// #jform_add_css_views listeners for add_css_views_vvvvwdh function jQuery('#jform_add_css_views').on('keyup',function() { - var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwdj(add_css_views_vvvvwdj); + var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwdh(add_css_views_vvvvwdh); }); jQuery('#adminForm').on('change', '#jform_add_css_views',function (e) { e.preventDefault(); - var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwdj(add_css_views_vvvvwdj); + var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwdh(add_css_views_vvvvwdh); }); -// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwdk function +// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwdi function jQuery('#jform_add_javascript_view_footer').on('keyup',function() { - var add_javascript_view_footer_vvvvwdk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwdk(add_javascript_view_footer_vvvvwdk); + var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwdi(add_javascript_view_footer_vvvvwdi); }); jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e) { e.preventDefault(); - var add_javascript_view_footer_vvvvwdk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); - vvvvwdk(add_javascript_view_footer_vvvvwdk); + var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwdi(add_javascript_view_footer_vvvvwdi); }); -// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwdl function +// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwdj function jQuery('#jform_add_javascript_views_footer').on('keyup',function() { - var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwdl(add_javascript_views_footer_vvvvwdl); + var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwdj(add_javascript_views_footer_vvvvwdj); }); jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e) { e.preventDefault(); - var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwdl(add_javascript_views_footer_vvvvwdl); + var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwdj(add_javascript_views_footer_vvvvwdj); }); diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 2096e9020..39f606a97 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -136,71 +136,105 @@ $componentParams = $this->params; // will be removed just use $this->params inst diff --git a/admin/views/server/view.html.php b/admin/views/server/view.html.php index 2cfef1666..6284eda18 100644 --- a/admin/views/server/view.html.php +++ b/admin/views/server/view.html.php @@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy } // Get Linked view data - $this->vyplinked_components = $this->get('Vyplinked_components'); + $this->vymlinked_components = $this->get('Vymlinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/componentbuilder.xml b/componentbuilder.xml index 4c3480fa0..39bd367af 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 24th June, 2020 + 7th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 0bb18a7b9..81594fcb7 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -5532,14 +5532,61 @@ abstract class ComponentbuilderHelper * */ public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true) + { + // build record + $record = new stdClass(); + // check if user can edit + if (self::canEditItem($record, $item, $view, $views, $component)) + { + // set the edit link + if ($jRoute) + { + return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref); + } + return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref; + } + return false; + } + + /** + * Can Edit (either any, or own) + * + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $views The list view controller name + * @param string $component The component these views belong to + * + * @return bool if user can edit returns true els + * + */ + public static function allowEdit(&$item, $view, $views, $component = 'com_componentbuilder') + { + // build record + $record = new stdClass(); + return self::canEditItem($record, $item, $view, $views, $component); + } + + + /** + * Can Edit (either any, or own) + * + * @param int $item The item to edit + * @param string $view The type of item to edit + * @param string $views The list view controller name + * @param string $component The component these views belong to + * + * @return bool if user can edit returns true els + * + */ + protected static function canEditItem(&$record, &$item, $view, $views, $component = 'com_componentbuilder') { // make sure the user has access to view if (!JFactory::getUser()->authorise($view. '.access', $component)) { return false; } - // build record - $record = new stdClass(); + // we start with false. + $can_edit = false; // check that we have the ID if (self::checkObject($item) && isset($item->id)) { @@ -5569,25 +5616,14 @@ abstract class ComponentbuilderHelper // get user action permission to edit $action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component)); // check if the view permission is set - if (($edit = $action->get($view . '.edit', 'none-set')) === 'none-set') + if (($can_edit = $action->get($view . '.edit', 'none-set')) === 'none-set') { - // fall back on the core permission then - $edit = $action->get('core.edit', 'none-set'); - } - // can edit - if ($edit) - { - // set the edit link - if ($jRoute) - { - return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref); - } - return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref; + // fall back on the core permission then (this can be an issue) + $can_edit = ($action->get('core.edit', false) || $action->get('core.edit.own', false)); } } - return false; + return $can_edit; } - /** * set subform type table @@ -5630,9 +5666,9 @@ abstract class ComponentbuilderHelper /** * Change to nice fancy date */ - public static function fancyDate($date) + public static function fancyDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5642,9 +5678,9 @@ abstract class ComponentbuilderHelper /** * get date based in period past */ - public static function fancyDynamicDate($date) + public static function fancyDynamicDate($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5668,9 +5704,9 @@ abstract class ComponentbuilderHelper /** * Change to nice fancy day time and date */ - public static function fancyDayTimeDate($time) + public static function fancyDayTimeDate($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -5680,9 +5716,9 @@ abstract class ComponentbuilderHelper /** * Change to nice fancy time and date */ - public static function fancyDateTime($time) + public static function fancyDateTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -5692,9 +5728,9 @@ abstract class ComponentbuilderHelper /** * Change to nice hour:minutes time */ - public static function fancyTime($time) + public static function fancyTime($time, $check_stamp = true) { - if (!self::isValidTimeStamp($time)) + if ($check_stamp && !self::isValidTimeStamp($time)) { $time = strtotime($time); } @@ -5704,9 +5740,9 @@ abstract class ComponentbuilderHelper /** * set the date day as Sunday through Saturday */ - public static function setDayName($date) + public static function setDayName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5716,9 +5752,9 @@ abstract class ComponentbuilderHelper /** * set the date month as January through December */ - public static function setMonthName($date) + public static function setMonthName($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5728,9 +5764,9 @@ abstract class ComponentbuilderHelper /** * set the date day as 1st */ - public static function setDay($date) + public static function setDay($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5740,9 +5776,9 @@ abstract class ComponentbuilderHelper /** * set the date month as 5 */ - public static function setMonth($date) + public static function setMonth($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5752,9 +5788,9 @@ abstract class ComponentbuilderHelper /** * set the date year as 2004 (for charts) */ - public static function setYear($date) + public static function setYear($date, $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5764,9 +5800,9 @@ abstract class ComponentbuilderHelper /** * set the date as 2004/05 (for charts) */ - public static function setYearMonth($date, $spacer = '/') + public static function setYearMonth($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5776,9 +5812,9 @@ abstract class ComponentbuilderHelper /** * set the date as 2004/05/03 (for charts) */ - public static function setYearMonthDay($date, $spacer = '/') + public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5788,9 +5824,9 @@ abstract class ComponentbuilderHelper /** * set the date as 03/05/2004 */ - public static function setDayMonthYear($date, $spacer = '/') + public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true) { - if (!self::isValidTimeStamp($date)) + if ($check_stamp && !self::isValidTimeStamp($date)) { $date = strtotime($date); } @@ -5807,6 +5843,16 @@ abstract class ComponentbuilderHelper && ($timestamp >= ~PHP_INT_MAX); } + /** + * Check if string is a valid date + * https://www.php.net/manual/en/function.checkdate.php#113205 + */ + public static function isValidateDate($date, $format = 'Y-m-d H:i:s') + { + $d = DateTime::createFromFormat($format, $date); + return $d && $d->format($format) == $date; + } + /** * Load the Composer Vendors -- 2.40.1 From a394638aff8e9bddb8ff3c2087ec91bc43b2a234 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 7 Jul 2020 21:42:43 +0200 Subject: [PATCH 06/14] Fixed gh-570 to add the correct custom field placeholder type, which is PHP and not HTML. --- admin/helpers/compiler/a_Get.php | 2 ++ admin/helpers/compiler/e_Interpretation.php | 23 +++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 5d618a1a8..3da405a7c 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -8729,6 +8729,8 @@ class Get 'php_method'); $addScriptTypes = array('install', 'update', 'uninstall'); + // the next are php placeholders + $guiMapper['type'] = 'php'; foreach ($addScriptMethods as $scriptMethod) { foreach ($addScriptTypes as $scriptType) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index c1bd7ea1e..f477e7df1 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1917,7 +1917,7 @@ class Interpretation extends Fields . " Lineup new user data array"; $method[] = $this->_t(2) . "\$data = array("; $method[] = $this->_t(3) . "'username' => \$credentials['username'],"; - $method[] = $this->_t(3) . "'name' => \$credentials['name']"; + $method[] = $this->_t(3) . "'name' => \$credentials['name'],"; $method[] = $this->_t(3) . "'block' => 0 );"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Added details based on mode"; @@ -1951,7 +1951,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Now Add password if set"; $method[] = $this->_t(2) - . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2'])))"; + . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2']))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "if (\$mode = 1)"; $method[] = $this->_t(3) . "{"; @@ -1963,6 +1963,14 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "}"; $method[] = $this->_t(3) . "\$data['password2'] = \$credentials['password2'];"; $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Load the group/s value if set, only for Admin Registration (\$mode == 0)"; + $method[] = $this->_t(2) + . "if (\$mode == 0 && isset(\$credentials['groups']) && self::checkArray(\$credentials['groups']))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) + . "\$data['groups'] = \$credentials['groups'];"; + $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Create the new user"; $method[] = $this->_t(2) . "if (\$mode = 1)"; @@ -2002,7 +2010,14 @@ class Interpretation extends Fields . " Auto Login if Needed"; $method[] = $this->_t(3) . "if (\$autologin && isset(\$credentials['password']))"; $method[] = $this->_t(3) . "{"; - $method[] = $this->_t(4) . "JFactory::getApplication()->login(\$credentials);"; + $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) + . " Try to login"; + $method[] = $this->_t(4) . "try{"; + $method[] = $this->_t(5) . "JFactory::getApplication()->login(\$credentials);"; + $method[] = $this->_t(4) . "} catch (Exception \$exception){"; + $method[] = $this->_t(5) . "//" . $this->setLine(__LINE__) + . " Do noting for now, may want to set redirect."; + $method[] = $this->_t(4) . "}"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Return ID"; @@ -2037,7 +2052,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Execute the query"; $method[] = $this->_t(3) . "\$db->setQuery(\$query);"; - $method[] = $this->_t(3) . "\$db->query();"; + $method[] = $this->_t(3) . "\$db->execute();"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "return \$was;"; $method[] = $this->_t(1) . "}"; -- 2.40.1 From 25afc31e7f2d2ba73ec5e90525663676f0116671 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 11 Jul 2020 02:51:45 +0200 Subject: [PATCH 07/14] fixed greateUser logic to use the admin and site creation modes in correct way. Fixed language import issue that cause header mismatching. Added the option to add header values to the custom-custom fields. --- README.md | 4 +-- admin/README.txt | 4 +-- admin/helpers/compiler/e_Interpretation.php | 30 +++++++++---------- admin/helpers/componentbuilder.php | 12 ++++++-- admin/models/import.php | 10 ++++++- admin/models/import_language_translations.php | 16 ++++++++-- componentbuilder.xml | 2 +- site/helpers/componentbuilder.php | 12 ++++++-- 8 files changed, 63 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f80f39c77..a6ac9c86c 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*: 7th July, 2020 ++ *Last Build*: 11th July, 2020 + *Version*: 2.11.2 + *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*: **282473** ++ *Line count*: **282509** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index f80f39c77..a6ac9c86c 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*: 7th July, 2020 ++ *Last Build*: 11th July, 2020 + *Version*: 2.11.2 + *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*: **282473** ++ *Line count*: **282509** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index f477e7df1..caf861940 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1876,20 +1876,22 @@ class Interpretation extends Fields . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Load the correct user model."; - $method[] = $this->_t(2) . "if (\$mode == 1)"; - $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Load the backend-user model"; - $method[] = $this->_t(3) - . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; - $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "else"; + $method[] = $this->_t(2) . "if (\$mode == 1) //" . $this->setLine(__LINE__) + . " 1 = Site Registrations"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Load the user site-registration model"; $method[] = $this->_t(3) . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');"; $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__) + . " 0 = Admin Registration"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Load the backend-user model"; + $method[] = $this->_t(3) + . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; + $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if we have params/config"; $method[] = $this->_t(2) . "if (self::checkArray(\$params))"; @@ -1921,16 +1923,14 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "'block' => 0 );"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Added details based on mode"; - $method[] = $this->_t(2) . "if (\$mode == 1)"; + $method[] = $this->_t(2) . "if (\$mode == 1) //". $this->setLine(__LINE__) + . " 1 = Site-registration mode"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Site-registration mode"; $method[] = $this->_t(3) . "\$data['email1'] = \$credentials['email'];"; $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "else"; + $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__) + . " 0 = Admin-registration mode"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Admin-registration mode"; $method[] = $this->_t(3) . "\$data['email'] = \$credentials['email'];"; $method[] = $this->_t(3) . "\$data['registerDate'] = JFactory::getDate()->toSql();"; $method[] = $this->_t(2) . "}"; @@ -1943,7 +1943,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set random password when empty password was submitted,"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " and we are using the site-registration mode"; + . " when using the 1 = site-registration mode"; $method[] = $this->_t(3) . "\$credentials['password'] = self::randomkey(8);"; $method[] = $this->_t(3) . "\$credentials['password2'] = \$credentials['password'];"; $method[] = $this->_t(2) . "}"; diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 0454e54b1..171b27dbd 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -57,7 +57,7 @@ abstract class ComponentbuilderHelper /** * Array of php fields Allowed (16) **/ - public static $phpFieldArray = array('', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'x'); + public static $phpFieldArray = array('', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'x', 'HEADER'); /** * The global params @@ -2965,7 +2965,15 @@ abstract class ComponentbuilderHelper $script['setdata'][] = self::_t(3) . "\$jinput = JFactory::getApplication()->input;"; $script['setdata'][] = self::_t(3) . "foreach(\$target_headers as \$header)"; $script['setdata'][] = self::_t(3) . "{"; - $script['setdata'][] = self::_t(4) . "\$data['target_headers'][\$header] = \$jinput->getString(\$header, null);"; + $script['setdata'][] = self::_t(4) . "if ((\$column = \$jinput->getString(\$header, false)) !== false ||"; + $script['setdata'][] = self::_t(5) . "(\$column = \$jinput->getString(strtolower(\$header), false)) !== false)"; + $script['setdata'][] = self::_t(4) . "{"; + $script['setdata'][] = self::_t(5) . "\$data['target_headers'][\$header] = \$column;"; + $script['setdata'][] = self::_t(4) . "}"; + $script['setdata'][] = self::_t(4) . "else"; + $script['setdata'][] = self::_t(4) . "{"; + $script['setdata'][] = self::_t(5) . "\$data['target_headers'][\$header] = null;"; + $script['setdata'][] = self::_t(4) . "}"; $script['setdata'][] = self::_t(3) . "}"; $script['setdata'][] = self::_t(3) . "// set the data"; $script['setdata'][] = self::_t(3) . "if(isset(\$package['dir']))"; diff --git a/admin/models/import.php b/admin/models/import.php index 71b78bc15..fb6e19c80 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -426,7 +426,15 @@ class ComponentbuilderModelImport extends JModelLegacy $jinput = JFactory::getApplication()->input; foreach($target_headers as $header) { - $data['target_headers'][$header] = $jinput->getString($header, null); + if (($column = $jinput->getString($header, false)) !== false || + ($column = $jinput->getString(strtolower($header), false)) !== false) + { + $data['target_headers'][$header] = $column; + } + else + { + $data['target_headers'][$header] = null; + } } // set the data if(isset($package['dir'])) diff --git a/admin/models/import_language_translations.php b/admin/models/import_language_translations.php index 9f36e3076..90dfb4e63 100644 --- a/admin/models/import_language_translations.php +++ b/admin/models/import_language_translations.php @@ -424,7 +424,15 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy $jinput = JFactory::getApplication()->input; foreach($target_headers as $header) { - $data['target_headers'][$header] = $jinput->getString(strtolower($header), null); + if (($column = $jinput->getString($header, false)) !== false || + ($column = $jinput->getString(strtolower($header), false)) !== false) + { + $data['target_headers'][$header] = $column; + } + else + { + $data['target_headers'][$header] = null; + } } // set the data if(isset($package['dir'])) @@ -463,10 +471,14 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy { $source_key = $data['target_headers']['Source']; } - else + elseif (isset($data['target_headers']['English'])) { $source_key = $data['target_headers']['English']; } + else + { + $source_key = null; + } // get the first array set $firstSet = reset($data['array']); // check if first array is a header array and remove if true diff --git a/componentbuilder.xml b/componentbuilder.xml index 39bd367af..bd08cb429 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 7th July, 2020 + 11th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 81594fcb7..30406c90c 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -54,7 +54,7 @@ abstract class ComponentbuilderHelper /** * Array of php fields Allowed (16) **/ - public static $phpFieldArray = array('', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'x'); + public static $phpFieldArray = array('', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'x', 'HEADER'); /** * The global params @@ -2962,7 +2962,15 @@ abstract class ComponentbuilderHelper $script['setdata'][] = self::_t(3) . "\$jinput = JFactory::getApplication()->input;"; $script['setdata'][] = self::_t(3) . "foreach(\$target_headers as \$header)"; $script['setdata'][] = self::_t(3) . "{"; - $script['setdata'][] = self::_t(4) . "\$data['target_headers'][\$header] = \$jinput->getString(\$header, null);"; + $script['setdata'][] = self::_t(4) . "if ((\$column = \$jinput->getString(\$header, false)) !== false ||"; + $script['setdata'][] = self::_t(5) . "(\$column = \$jinput->getString(strtolower(\$header), false)) !== false)"; + $script['setdata'][] = self::_t(4) . "{"; + $script['setdata'][] = self::_t(5) . "\$data['target_headers'][\$header] = \$column;"; + $script['setdata'][] = self::_t(4) . "}"; + $script['setdata'][] = self::_t(4) . "else"; + $script['setdata'][] = self::_t(4) . "{"; + $script['setdata'][] = self::_t(5) . "\$data['target_headers'][\$header] = null;"; + $script['setdata'][] = self::_t(4) . "}"; $script['setdata'][] = self::_t(3) . "}"; $script['setdata'][] = self::_t(3) . "// set the data"; $script['setdata'][] = self::_t(3) . "if(isset(\$package['dir']))"; -- 2.40.1 From 3a5681ce4336c5658d3cabb9994e6eac718e6892 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 13 Jul 2020 04:52:06 +0200 Subject: [PATCH 08/14] Added option to dynamicly set the sub-form layout from global options. Fixed bug in compiler that caused index warning. --- README.md | 6 +- admin/README.txt | 6 +- admin/config.xml | 65 +++++++++++++++++++ admin/helpers/compiler.php | 8 +-- admin/helpers/compiler/a_Get.php | 8 +-- admin/helpers/compiler/c_Fields.php | 15 ++--- admin/helpers/compiler/e_Interpretation.php | 4 +- admin/helpers/compiler/f_Infusion.php | 8 +-- admin/helpers/componentbuilder.php | 41 ++++++++++++ .../en-GB/en-GB.com_componentbuilder.ini | 16 +++++ admin/models/admin_custom_tabs.php | 3 + admin/models/admin_fields.php | 3 + admin/models/admin_fields_conditions.php | 3 + admin/models/admin_fields_relations.php | 3 + admin/models/component_admin_views.php | 3 + admin/models/component_custom_admin_views.php | 3 + admin/models/component_site_views.php | 3 + admin/models/dynamic_get.php | 6 ++ componentbuilder.xml | 2 +- script.php | 2 +- site/helpers/componentbuilder.php | 41 ++++++++++++ 21 files changed, 219 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index a6ac9c86c..c687a1110 100644 --- a/README.md +++ b/README.md @@ -144,12 +144,12 @@ 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*: 11th July, 2020 ++ *Last Build*: 13th July, 2020 + *Version*: 2.11.2 + *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*: **282509** -+ *Field count*: **1522** ++ *Line count*: **282699** ++ *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index a6ac9c86c..c687a1110 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,12 +144,12 @@ 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*: 11th July, 2020 ++ *Last Build*: 13th July, 2020 + *Version*: 2.11.2 + *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*: **282509** -+ *Field count*: **1522** ++ *Line count*: **282699** ++ *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/config.xml b/admin/config.xml index 7cc153967..0421e9f60 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -47,6 +47,71 @@ /> + + + + triggerEvent( 'jcb_ce_onBeforeUpdateFiles', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); // now update the files if (!$this->updateFiles()) @@ -121,7 +121,7 @@ class Compiler extends Infusion // Trigger Event: jcb_ce_onBeforeGetCustomCode $this->triggerEvent( 'jcb_ce_onBeforeGetCustomCode', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); // now insert into the new files if ($this->getCustomCode()) @@ -129,7 +129,7 @@ class Compiler extends Infusion // Trigger Event: jcb_ce_onBeforeAddCustomCode $this->triggerEvent( 'jcb_ce_onBeforeAddCustomCode', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); $this->addCustomCode(); @@ -137,7 +137,7 @@ class Compiler extends Infusion // Trigger Event: jcb_ce_onBeforeSetLangFileData $this->triggerEvent( 'jcb_ce_onBeforeSetLangFileData', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); // set the lang data now $this->setLangFileData(); diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 3da405a7c..abac157a0 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -835,7 +835,7 @@ class Get } } // Trigger Event: jcb_ce_onBeforeGet - $this->triggerEvent('jcb_ce_onBeforeGet', array(&$config, $this)); + $this->triggerEvent('jcb_ce_onBeforeGet', array(&$config, &$this)); // set the Joomla version $this->joomlaVersion = $config['version']; // set the minfy switch of the JavaScript @@ -923,14 +923,14 @@ class Get // Trigger Event: jcb_ce_onBeforeGetComponentData $this->triggerEvent( 'jcb_ce_onBeforeGetComponentData', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); // get the component data $this->componentData = $this->getComponentData(); // Trigger Event: jcb_ce_onAfterGetComponentData $this->triggerEvent( 'jcb_ce_onAfterGetComponentData', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); // make sure we have a version if (strpos($this->componentData->component_version, '.') @@ -969,7 +969,7 @@ class Get // Trigger Event: jcb_ce_onBeforeGet $this->triggerEvent( - 'jcb_ce_onAfterGet', array(&$this->componentContext, $this) + 'jcb_ce_onAfterGet', array(&$this->componentContext, &$this) ); return true; diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index e70dc64d8..4f82d27e8 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -4194,7 +4194,7 @@ class Fields extends Structure = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB'; foreach ($phpTracker as $searchKey => $phpKey) { - // we must search for more code in the xml just incase + // we must search for more code in the xml just encase foreach (range(2, 30) as $phpLine) { $get_ = $searchKey . '_' . $phpLine; @@ -4953,17 +4953,16 @@ class Fields extends Structure $replace = array( $this->bbb . 'JPREFIX' . $this->ddd => $jprefix, $this->bbb . 'TABLE' - . $this->ddd => $data['custom']['table'], + . $this->ddd => (isset($data['custom']['table'])) ? $data['custom']['table'] :'', $this->bbb . 'ID' - . $this->ddd => $data['custom']['id'], + . $this->ddd => (isset($data['custom']['id'])) ? $data['custom']['id'] :'', $this->bbb . 'TEXT' - . $this->ddd => $data['custom']['text'], - $this->bbb . 'CODE_TEXT' . $this->ddd => $data['code'] . '_' - . $data['custom']['text'], - $this->bbb . 'CODE' . $this->ddd => $data['code'], + . $this->ddd => (isset($data['custom']['text'])) ? $data['custom']['text'] :'', + $this->bbb . 'CODE_TEXT' . $this->ddd => (isset($data['code'], $data['custom']['text'])) ? $data['code'] . '_' . $data['custom']['text'] :'', + $this->bbb . 'CODE' . $this->ddd => (isset($data['code'])) ? $data['code'] :'', $this->bbb . 'view_type' . $this->ddd => $view_name_single . '_' . $data['type'], - $this->bbb . 'type' . $this->ddd => $data['type'], + $this->bbb . 'type' . $this->ddd => (isset($data['type'])) ? $data['type'] :'', $this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString( diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index caf861940..b6f3f68b6 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -25193,7 +25193,7 @@ function vdm_dkim() { // Trigger Event: jcb_ce_onBeforeBuildAccessSections $this->triggerEvent( 'jcb_ce_onBeforeBuildAccessSections', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); $this->componentHead[] = '
'; @@ -25620,7 +25620,7 @@ function vdm_dkim() { // Trigger Event: jcb_ce_onAfterBuildAccessSections $this->triggerEvent( 'jcb_ce_onAfterBuildAccessSections', - array(&$this->componentContext, $this) + array(&$this->componentContext, &$this) ); // set the views permissions now diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index f0f9689f4..fa2ea1d98 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -1934,7 +1934,7 @@ class Infusion extends Interpretation // Trigger Event: jcb_ce_onBeforeInfuseModuleData $this->triggerEvent( 'jcb_ce_onBeforeInfuseModuleData', - array(&$this->componentContext, &$module, $this) + array(&$this->componentContext, &$module, &$this) ); $this->target = $module->key; $this->lang = $module->key; @@ -1998,7 +1998,7 @@ class Infusion extends Interpretation // Trigger Event: jcb_ce_onAfterInfuseModuleData $this->triggerEvent( 'jcb_ce_onAfterInfuseModuleData', - array(&$this->componentContext, &$module, $this) + array(&$this->componentContext, &$module, &$this) ); } } @@ -2013,7 +2013,7 @@ class Infusion extends Interpretation // Trigger Event: jcb_ce_onBeforeInfusePluginData $this->triggerEvent( 'jcb_ce_onBeforeInfusePluginData', - array(&$this->componentContext, &$plugin, $this) + array(&$this->componentContext, &$plugin, &$this) ); $this->target = $plugin->key; $this->lang = $plugin->key; @@ -2060,7 +2060,7 @@ class Infusion extends Interpretation // Trigger Event: jcb_ce_onAfterInfusePluginData $this->triggerEvent( 'jcb_ce_onAfterInfusePluginData', - array(&$this->componentContext, &$plugin, $this) + array(&$this->componentContext, &$plugin, &$this) ); } } diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 171b27dbd..8cafa3d41 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -5864,6 +5864,47 @@ abstract class ComponentbuilderHelper return $d && $d->format($format) == $date; } + + /** + * The subform layouts + **/ + protected static $subformLayouts = false; + + /** + * get the subform layout + * + * @input string The view name + * @input string The string name + * + * @returns string on success + **/ + public static function getSubformLayout($view, $field, $default = 'repeatablejcb') + { + // get global values + if (self::$subformLayouts === false) + { + self::$subformLayouts = JComponentHelper::getParams('com_componentbuilder')->get('subform_layouts', false); + } + // check what we found (else) return default + if (self::checkObject(self::$subformLayouts)) + { + // looking for + $target = $view . '.' . $field; + foreach (self::$subformLayouts as $subform) + { + if ($target === $subform->view_field) + { + return $subform->layout; + } + elseif ('default' === $subform->view_field) + { + $default = $subform->layout; + } + } + } + return $default; + } + /** * Load the Composer Vendors diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 3d23dd41b..47c181c89 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3235,6 +3235,10 @@ COM_COMPONENTBUILDER_CONDITIONS="Conditions" COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active" COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components" COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix" +COM_COMPONENTBUILDER_CONFIG_ADMIN_CUSTOM_TABS_TABS="Admin Custom Tabs (tabs)" +COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_ADDFIELDS="Admin Fields (addfields)" +COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Admin Fields Conditions (addconditions)" +COM_COMPONENTBUILDER_CONFIG_ADMIN_FIELDS_RELATIONS_ADDRELATIONS="Admin Fields Relations (addrelations)" COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat" COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric" COM_COMPONENTBUILDER_CONFIG_ALPHANUMERICDOT="Alphanumeric+dot" @@ -3336,7 +3340,10 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION="Select the plugin you would like to use in JCB's compiler" COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL="Activate Compiler Plugins" COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component" +COM_COMPONENTBUILDER_CONFIG_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS="Component Admin Views (addadmin_views)" +COM_COMPONENTBUILDER_CONFIG_COMPONENT_CUSTOM_ADMIN_VIEWS_ADDCUSTOM_ADMIN_VIEWS="Component Custom Admin Views (addcustom_admin_views)" COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component" +COM_COMPONENTBUILDER_CONFIG_COMPONENT_SITE_VIEWS_ADDSITE_VIEWS="Component Site Views (addsite_views)" COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to." COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_HINT="/home/user/fullbackup" COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_LABEL="Cronjob Backup Folder Path" @@ -3379,6 +3386,8 @@ COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_DESCRIPTION="This is the TXT value to use COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_HINT="v=DKIM1;k=rsa;g=*;s=email;h=sha1;t=s;p=PUBLICKEY" COM_COMPONENTBUILDER_CONFIG_DKIM_VALUE_LABEL="Value" COM_COMPONENTBUILDER_CONFIG_DONT_LOAD="Not" +COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_DB_TABLE="Dynamic Get (join_db_table)" +COM_COMPONENTBUILDER_CONFIG_DYNAMIC_GET_JOIN_VIEW_TABLE="Dynamic Get (join_view_table)" COM_COMPONENTBUILDER_CONFIG_EDITOR_DESCRIPTION="Select the editor you would like to use as the JCB global editor for all custom coding areas." COM_COMPONENTBUILDER_CONFIG_EDITOR_LABEL="Select an editor" COM_COMPONENTBUILDER_CONFIG_EMAILFROM_DESCRIPTION="The global email address that will be used to send system email." @@ -3486,6 +3495,7 @@ COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages" COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area." COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories" COM_COMPONENTBUILDER_CONFIG_LANGUAGE_LABEL="Language" +COM_COMPONENTBUILDER_CONFIG_LAYOUT_LABEL="Layout" COM_COMPONENTBUILDER_CONFIG_LOCAL_FOLDER="Local Folder" COM_COMPONENTBUILDER_CONFIG_MAILER_DESCRIPTION="Select what mailer you would like to use to send emails." COM_COMPONENTBUILDER_CONFIG_MAILER_LABEL="Mailer" @@ -3568,6 +3578,9 @@ COM_COMPONENTBUILDER_CONFIG_PHP_MAIL="PHP Mail" COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION="Should JCB insert the custom code placeholders? This is only applicable if this component has custom code." COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL="Add Custom Code Placeholders" COM_COMPONENTBUILDER_CONFIG_REMOTE_SERVER="Remote Server" +COM_COMPONENTBUILDER_CONFIG_REPEATABLETABLE_JOOMLA="Repeatable-table (joomla)" +COM_COMPONENTBUILDER_CONFIG_REPEATABLE_JOOMLA="Repeatable (Joomla)" +COM_COMPONENTBUILDER_CONFIG_REPEATABLE_UIKIT="Repeatable (UIkit)" COM_COMPONENTBUILDER_CONFIG_REPLYNAME_DESCRIPTION="Text displayed in the header "Reply To:" field when replying to the site email. Usually the the person that receives the response. (leave blank for none)" COM_COMPONENTBUILDER_CONFIG_REPLYNAME_HINT="Reply Name Here" COM_COMPONENTBUILDER_CONFIG_REPLYNAME_LABEL="Reply to Name" @@ -3603,6 +3616,8 @@ COM_COMPONENTBUILDER_CONFIG_SSL="SSL" COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION="How long should the data that is stored in the browser memory remain unchanged before it is removed and updated." COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle" COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation" +COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION="Select the sub-form layouts you would like to use." +COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_LABEL="Sub-form Layouts" COM_COMPONENTBUILDER_CONFIG_TLS="TLS" COM_COMPONENTBUILDER_CONFIG_TRUE="True" COM_COMPONENTBUILDER_CONFIG_TYPE_NAME_BUILDER_DESCRIPTION="The default option only uses alphabetical characters and converts all numbers in field names to the English equivalent like 1 becomes one.
Alphanumeric+dot keeps the numbers unconverted unless it is at the beginning of the field name, and allows for a dot (.) to be used in the type name for namespacing." @@ -3617,6 +3632,7 @@ COM_COMPONENTBUILDER_CONFIG_UIKIT_MIN_LABEL="Load Minified" COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_DESC="Set the css style that should be used." COM_COMPONENTBUILDER_CONFIG_UIKIT_STYLE_LABEL="css Style" COM_COMPONENTBUILDER_CONFIG_VDM_PACKAGES="VDM Packages" +COM_COMPONENTBUILDER_CONFIG_VIEW_FIELD_LABEL="View & Field" COM_COMPONENTBUILDER_CONFIG_YES="Yes" COM_COMPONENTBUILDER_CONFIRMATION_STEP_BEFORE_IMPORTING="Confirmation Step Before Importing!" COM_COMPONENTBUILDER_CONTEXT="Context" diff --git a/admin/models/admin_custom_tabs.php b/admin/models/admin_custom_tabs.php index 0a4eb6efb..7d409ed04 100644 --- a/admin/models/admin_custom_tabs.php +++ b/admin/models/admin_custom_tabs.php @@ -225,6 +225,9 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the tabs (sub form) layout + $form->setFieldAttribute('tabs', 'layout', ComponentbuilderHelper::getSubformLayout('admin_custom_tabs', 'tabs')); return $form; } diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index 821abede9..9b8950388 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -246,6 +246,9 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the addfields (sub form) layout + $form->setFieldAttribute('addfields', 'layout', ComponentbuilderHelper::getSubformLayout('admin_fields', 'addfields')); return $form; } diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index 082d0a4ee..4888089d9 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -246,6 +246,9 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the addconditions (sub form) layout + $form->setFieldAttribute('addconditions', 'layout', ComponentbuilderHelper::getSubformLayout('admin_fields_conditions', 'addconditions')); return $form; } diff --git a/admin/models/admin_fields_relations.php b/admin/models/admin_fields_relations.php index 8da06e303..b24caee98 100644 --- a/admin/models/admin_fields_relations.php +++ b/admin/models/admin_fields_relations.php @@ -308,6 +308,9 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the addrelations (sub form) layout + $form->setFieldAttribute('addrelations', 'layout', ComponentbuilderHelper::getSubformLayout('admin_fields_relations', 'addrelations')); return $form; } diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php index dd831be06..f143c1c35 100644 --- a/admin/models/component_admin_views.php +++ b/admin/models/component_admin_views.php @@ -257,6 +257,9 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the addadmin_views (sub form) layout + $form->setFieldAttribute('addadmin_views', 'layout', ComponentbuilderHelper::getSubformLayout('component_admin_views', 'addadmin_views')); return $form; } diff --git a/admin/models/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php index 3a8c06f90..47f3bbda9 100644 --- a/admin/models/component_custom_admin_views.php +++ b/admin/models/component_custom_admin_views.php @@ -257,6 +257,9 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the addcustom_admin_views (sub form) layout + $form->setFieldAttribute('addcustom_admin_views', 'layout', ComponentbuilderHelper::getSubformLayout('component_custom_admin_views', 'addcustom_admin_views')); return $form; } diff --git a/admin/models/component_site_views.php b/admin/models/component_site_views.php index 78df71326..5640efaa6 100644 --- a/admin/models/component_site_views.php +++ b/admin/models/component_site_views.php @@ -257,6 +257,9 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin $form->setValue($redirectedField, null, $redirectedValue); } } + + // update the addsite_views (sub form) layout + $form->setFieldAttribute('addsite_views', 'layout', ComponentbuilderHelper::getSubformLayout('component_site_views', 'addsite_views')); return $form; } diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index a5589053e..0eb24b6da 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -525,7 +525,13 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin { $form->setValue('guid', null, ComponentbuilderHelper::GUID()); } + + // update the join_view_table (sub form) layout + $form->setFieldAttribute('join_view_table', 'layout', ComponentbuilderHelper::getSubformLayout('dynamic_get', 'join_view_table')); + + // update the join_db_table (sub form) layout + $form->setFieldAttribute('join_db_table', 'layout', ComponentbuilderHelper::getSubformLayout('dynamic_get', 'join_db_table')); return $form; } diff --git a/componentbuilder.xml b/componentbuilder.xml index bd08cb429..6cdfa2c07 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 11th July, 2020 + 13th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/script.php b/script.php index 021103f47..a235d2fb2 100644 --- a/script.php +++ b/script.php @@ -6591,7 +6591,7 @@ class com_componentbuilderInstallerScript $query = $db->getQuery(true); // Field to update. $fields = array( - $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","editor":"none","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"»","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), + $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"»","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), ); // Condition. $conditions = array( diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 30406c90c..0c37a5b6a 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -5861,6 +5861,47 @@ abstract class ComponentbuilderHelper return $d && $d->format($format) == $date; } + + /** + * The subform layouts + **/ + protected static $subformLayouts = false; + + /** + * get the subform layout + * + * @input string The view name + * @input string The string name + * + * @returns string on success + **/ + public static function getSubformLayout($view, $field, $default = 'repeatablejcb') + { + // get global values + if (self::$subformLayouts === false) + { + self::$subformLayouts = JComponentHelper::getParams('com_componentbuilder')->get('subform_layouts', false); + } + // check what we found (else) return default + if (self::checkObject(self::$subformLayouts)) + { + // looking for + $target = $view . '.' . $field; + foreach (self::$subformLayouts as $subform) + { + if ($target === $subform->view_field) + { + return $subform->layout; + } + elseif ('default' === $subform->view_field) + { + $default = $subform->layout; + } + } + } + return $default; + } + /** * Load the Composer Vendors -- 2.40.1 From 27de9a83a5b13c4a8831063fb608ad802a65428b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 18 Jul 2020 21:36:05 +0200 Subject: [PATCH 09/14] Removed the fallback for empty description on title field.Improved the createUser method to allow custom methodd registerUser to create a user. Fixed the empty not_required field issue. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/c_Fields.php | 4 -- admin/helpers/compiler/e_Interpretation.php | 58 +++++++++++-------- admin/models/admin_view.php | 2 +- admin/models/class_method.php | 2 +- admin/models/class_property.php | 2 +- admin/models/custom_code.php | 2 +- admin/models/dynamic_get.php | 2 +- admin/models/field.php | 2 +- admin/models/fieldtype.php | 2 +- admin/models/forms/custom_code.xml | 1 - .../joomla_module_files_folders_urls.xml | 1 - admin/models/forms/joomla_module_updates.xml | 1 - .../joomla_plugin_files_folders_urls.xml | 1 - admin/models/forms/joomla_plugin_updates.xml | 1 - admin/models/forms/language_translation.xml | 3 +- admin/models/help_document.php | 2 +- admin/models/joomla_component.php | 2 +- admin/models/joomla_module.php | 2 +- admin/models/joomla_plugin.php | 2 +- admin/models/library.php | 2 +- admin/models/server.php | 2 +- componentbuilder.xml | 2 +- 24 files changed, 54 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index c687a1110..c588f8c3f 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*: 13th July, 2020 ++ *Last Build*: 16th July, 2020 + *Version*: 2.11.2 + *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*: **282699** ++ *Line count*: **282693** + *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index c687a1110..c588f8c3f 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*: 13th July, 2020 ++ *Last Build*: 16th July, 2020 + *Version*: 2.11.2 + *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*: **282699** ++ *Line count*: **282693** + *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 4f82d27e8..ed834cccf 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -4141,10 +4141,6 @@ class Fields extends Structure { $xmlValue = 'JGLOBAL_TITLE'; } - elseif ($property['name'] === 'description') - { - $xmlValue = 'JFIELD_TITLE_DESC'; - } } // only load value if found or is mandatory if (ComponentbuilderHelper::checkString($xmlValue) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b6f3f68b6..8c6214ed0 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1853,7 +1853,7 @@ class Interpretation extends Fields $method[] = $this->_t(1) . " * @param array \$credentials Array('name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string)"; $method[] = $this->_t(1) . " * @param int \$autologin"; $method[] = $this->_t(1) . " * @param array \$params Array('useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int)"; - $method[] = $this->_t(1) . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration"; + $method[] = $this->_t(1) . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration; 2 = Custom Helper Method Called registerUser"; $method[] = $this->_t(1) . " *"; $method[] = $this->_t(1) . " * @return int|Error User ID on success, or an error."; $method[] = $this->_t(1) . " */"; @@ -1864,6 +1864,23 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "), \$mode = 1"; $method[] = $this->_t(1) . ")"; $method[] = $this->_t(1) . "{"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Override mode"; + $method[] = $this->_t(2) . "if (\$mode == 2 && method_exists(__CLASS__, 'registerUser'))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Update params"; + $method[] = $this->_t(3) . "\$params['autologin'] = \$autologin;"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Now Register User"; + $method[] = $this->_t(3) . "return self::registerUser(\$credentials, \$params);"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "elseif (\$mode == 2)"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Fallback to Site Registrations"; + $method[] = $this->_t(3) . "\$mode = 1;"; + $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " load the user component language files if there is an error."; $method[] = $this->_t(2) . "\$lang = JFactory::getLanguage();"; @@ -1882,7 +1899,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Load the user site-registration model"; $method[] = $this->_t(3) - . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');"; + . "\$model = self::getModel('registration', \$base_dir . '/components/' . \$extension, 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__) . " 0 = Admin Registration"; @@ -1890,7 +1907,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Load the backend-user model"; $method[] = $this->_t(3) - . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; + . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/' . \$extension, 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if we have params/config"; @@ -1904,7 +1921,7 @@ class Interpretation extends Fields $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " If you know of a better path, let me know"; $method[] = $this->_t(4) - ."\$params[\$param] = self::setParams('com_users', \$param, \$set);"; + ."\$params[\$param] = self::setParams(\$extension, \$param, \$set);"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -1938,7 +1955,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if password was set"; $method[] = $this->_t(2) - . "if (\$mode = 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))"; + . "if (\$mode == 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set random password when empty password was submitted,"; @@ -1953,11 +1970,13 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2']))"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "if (\$mode = 1)"; + $method[] = $this->_t(3) . "if (\$mode == 1) //". $this->setLine(__LINE__) + . " 1 = Site-registration mode"; $method[] = $this->_t(3) . "{"; $method[] = $this->_t(4) . "\$data['password1'] = \$credentials['password'];"; $method[] = $this->_t(3) . "}"; - $method[] = $this->_t(3) . "else"; + $method[] = $this->_t(3) . "else //" . $this->setLine(__LINE__) + . " 0 = Admin-registration mode"; $method[] = $this->_t(3) . "{"; $method[] = $this->_t(4) . "\$data['password'] = \$credentials['password'];"; $method[] = $this->_t(3) . "}"; @@ -1973,16 +1992,14 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Create the new user"; - $method[] = $this->_t(2) . "if (\$mode = 1)"; + $method[] = $this->_t(2) . "if (\$mode == 1) //". $this->setLine(__LINE__) + . " 1 = Site-registration mode"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Site-registration mode"; $method[] = $this->_t(3) . "\$userId = \$model->register(\$data);"; $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "else"; + $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__) + . " 0 = Admin-registration mode"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Admin-registration mode"; $method[] = $this->_t(3) . "\$model->save(\$data);"; $method[] = $this->_t(3) . "\$userId = \$model->getState('user.id', 0);"; $method[] = $this->_t(2) . "}"; @@ -1999,7 +2016,7 @@ class Interpretation extends Fields $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " If you know of a better path, let me know"; $method[] = $this->_t(4) - ."self::setParams('com_users', \$param, \$set);"; + ."self::setParams(\$extension, \$param, \$set);"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -2086,17 +2103,12 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "// set username"; $method[] = $this->_t(2) - . "if (isset(\$new['username']) && self::checkString(\$new['username']))"; + . "if (!isset(\$new['username']) || !self::checkString(\$new['username']))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) - . "\$new['username'] = self::safeString(\$new['username']);"; + . "\$new['username'] = \$new['email'];"; $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "else"; - $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) - . "\$new['username'] = self::safeString(\$new['name']);"; - $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "// linup update user data"; + $method[] = $this->_t(2) . "// lineup update user data"; $method[] = $this->_t(2) . "\$data = array("; $method[] = $this->_t(3) . "'id' => \$new['id'],"; $method[] = $this->_t(3) . "'username' => \$new['username'],"; @@ -16756,7 +16768,7 @@ class Interpretation extends Fields $fix .= PHP_EOL . $this->_t(1) . "{"; $fix .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if the not_required field is set"; - $fix .= PHP_EOL . $this->_t(2) . "if (" . $Component + $fix .= PHP_EOL . $this->_t(2) . "if (isset(\$data['not_required']) && " . $Component . "Helper::checkString(\$data['not_required']))"; $fix .= PHP_EOL . $this->_t(2) . "{"; $fix .= PHP_EOL . $this->_t(3) diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index abddb2482..e2b24a9b5 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -984,7 +984,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/class_method.php b/admin/models/class_method.php index 0ec5d128d..2c799658a 100644 --- a/admin/models/class_method.php +++ b/admin/models/class_method.php @@ -526,7 +526,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/class_property.php b/admin/models/class_property.php index a79d84a9b..a941e2352 100644 --- a/admin/models/class_property.php +++ b/admin/models/class_property.php @@ -517,7 +517,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 52003c0e3..25522e5a4 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -519,7 +519,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index 0eb24b6da..76cfb7d75 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -710,7 +710,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/field.php b/admin/models/field.php index b0ca2e38d..cef6417a5 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -603,7 +603,7 @@ class ComponentbuilderModelField extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index d129cd98b..c0e9c11ec 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -728,7 +728,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/forms/custom_code.xml b/admin/models/forms/custom_code.xml index 2d5d35ba3..382bae82a 100644 --- a/admin/models/forms/custom_code.xml +++ b/admin/models/forms/custom_code.xml @@ -90,7 +90,6 @@ type="component" name="component" label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL" - description="JFIELD_TITLE_DESC" class="list_class" multiple="false" default="0" diff --git a/admin/models/forms/joomla_module_files_folders_urls.xml b/admin/models/forms/joomla_module_files_folders_urls.xml index afe426e47..2d0424ce0 100644 --- a/admin/models/forms/joomla_module_files_folders_urls.xml +++ b/admin/models/forms/joomla_module_files_folders_urls.xml @@ -90,7 +90,6 @@ type="joomlamodules" name="joomla_module" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_FILES_FOLDERS_URLS_JOOMLA_MODULE_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/joomla_module_updates.xml b/admin/models/forms/joomla_module_updates.xml index 27329bd60..052c03674 100644 --- a/admin/models/forms/joomla_module_updates.xml +++ b/admin/models/forms/joomla_module_updates.xml @@ -90,7 +90,6 @@ type="joomlamodules" name="joomla_module" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_JOOMLA_MODULE_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/joomla_plugin_files_folders_urls.xml b/admin/models/forms/joomla_plugin_files_folders_urls.xml index 3361dce7a..14aebad76 100644 --- a/admin/models/forms/joomla_plugin_files_folders_urls.xml +++ b/admin/models/forms/joomla_plugin_files_folders_urls.xml @@ -90,7 +90,6 @@ type="joomlaplugins" name="joomla_plugin" label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_JOOMLA_PLUGIN_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/joomla_plugin_updates.xml b/admin/models/forms/joomla_plugin_updates.xml index 0d8e6f710..e628d878e 100644 --- a/admin/models/forms/joomla_plugin_updates.xml +++ b/admin/models/forms/joomla_plugin_updates.xml @@ -90,7 +90,6 @@ type="joomlaplugins" name="joomla_plugin" label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_JOOMLA_PLUGIN_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/language_translation.xml b/admin/models/forms/language_translation.xml index 1c565041c..c81ebf5c5 100644 --- a/admin/models/forms/language_translation.xml +++ b/admin/models/forms/language_translation.xml @@ -92,7 +92,6 @@ label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL" rows="4" cols="5" - description="JFIELD_TITLE_DESC" message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE" class="text_area span12" filter="safehtml" @@ -150,7 +149,7 @@ cols="20" message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_MESSAGE" class="text_area translation_text_area" - filter="SAFEHTML" + filter="RAW" hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT" /> diff --git a/admin/models/help_document.php b/admin/models/help_document.php index 5edbacd75..ece45fb0a 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -415,7 +415,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index bdcc71305..ed27334ef 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -878,7 +878,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/joomla_module.php b/admin/models/joomla_module.php index 714c8f9a8..f1e1bc0b2 100644 --- a/admin/models/joomla_module.php +++ b/admin/models/joomla_module.php @@ -698,7 +698,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 64ca2553e..7819e6ca2 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -663,7 +663,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/library.php b/admin/models/library.php index e5f26141b..5df64cb1c 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -542,7 +542,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/server.php b/admin/models/server.php index 7411bbbb8..0008b8c83 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -557,7 +557,7 @@ class ComponentbuilderModelServer extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/componentbuilder.xml b/componentbuilder.xml index 6cdfa2c07..68395744d 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 13th July, 2020 + 16th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1 From 6bb23fc6eeca7bb48f07919d42d429bb0de5ab5b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 24 Jul 2020 06:11:38 +0200 Subject: [PATCH 10/14] Improved the export feature to allow bulk custom overide, and dynamic behaviour towards larger sets. Added function name to custom buttons as a class for CSS styling. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/e_Interpretation.php | 110 +++++++++++++++---- admin/helpers/componentbuilder.php | 55 +++++++--- admin/models/admin_views.php | 21 +++- admin/models/class_methods.php | 21 +++- admin/models/class_properties.php | 21 +++- admin/models/custom_admin_views.php | 21 +++- admin/models/custom_codes.php | 21 +++- admin/models/dynamic_gets.php | 21 +++- admin/models/fields.php | 21 +++- admin/models/fieldtypes.php | 21 +++- admin/models/help_documents.php | 21 +++- admin/models/joomla_components.php | 21 +++- admin/models/language_translations.php | 21 +++- admin/models/languages.php | 21 +++- admin/models/layouts.php | 21 +++- admin/models/placeholders.php | 21 +++- admin/models/servers.php | 21 +++- admin/models/site_views.php | 21 +++- admin/models/snippets.php | 21 +++- admin/models/templates.php | 21 +++- admin/models/validation_rules.php | 21 +++- admin/views/admin_views/view.html.php | 2 +- admin/views/compiler/view.html.php | 6 +- admin/views/custom_admin_views/view.html.php | 2 +- admin/views/custom_codes/view.html.php | 2 +- admin/views/dynamic_gets/view.html.php | 2 +- admin/views/fields/view.html.php | 2 +- admin/views/get_snippets/view.html.php | 12 +- admin/views/joomla_components/view.html.php | 12 +- admin/views/joomla_modules/view.html.php | 4 +- admin/views/joomla_plugins/view.html.php | 8 +- admin/views/languages/view.html.php | 2 +- admin/views/layouts/view.html.php | 2 +- admin/views/libraries/view.html.php | 2 +- admin/views/site_views/view.html.php | 2 +- admin/views/snippets/view.html.php | 4 +- admin/views/templates/view.html.php | 2 +- admin/views/validation_rules/view.html.php | 2 +- componentbuilder.xml | 2 +- 41 files changed, 527 insertions(+), 115 deletions(-) diff --git a/README.md b/README.md index c588f8c3f..40c043732 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*: 16th July, 2020 ++ *Last Build*: 24th July, 2020 + *Version*: 2.11.2 + *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*: **282693** ++ *Line count*: **283043** + *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index c588f8c3f..40c043732 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*: 16th July, 2020 ++ *Last Build*: 24th July, 2020 + *Version*: 2.11.2 + *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*: **282693** ++ *Line count*: **283043** + *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 8c6214ed0..4b10da9a8 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1637,6 +1637,9 @@ class Interpretation extends Fields $exel[] = $this->_t(3) . "->setLastModifiedBy(\$modified)"; $exel[] = $this->_t(3) . "->setTitle(\$title)"; $exel[] = $this->_t(3) . "->setSubject(\$subjectTab);"; + $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " The file type"; + $exel[] = $this->_t(2) . "\$file_type = 'Xls';"; $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " set description"; $exel[] = $this->_t(2) . "if (\$description)"; @@ -1682,27 +1685,52 @@ class Interpretation extends Fields $exel[] = $this->_t(2) . "));"; $exel[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Add some data"; - $exel[] = $this->_t(2) . "if (self::checkArray(\$rows))"; + $exel[] = $this->_t(2) . "if ((\$size = self::checkArray(\$rows)) !== false)"; $exel[] = $this->_t(2) . "{"; $exel[] = $this->_t(3) . "\$i = 1;"; - $exel[] = $this->_t(3) . "foreach (\$rows as \$array){"; + $exel[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Based on data size we adapt the behaviour."; + $exel[] = $this->_t(3) . "\$xls_mode = 1;"; + $exel[] = $this->_t(3) . "if (\$size > 3000)"; + $exel[] = $this->_t(3) . "{"; + $exel[] = $this->_t(4) . "\$xls_mode = 3;"; + $exel[] = $this->_t(4) . "\$file_type = 'Csv';"; + $exel[] = $this->_t(3) . "}"; + $exel[] = $this->_t(3) . "elseif (\$size > 2000)"; + $exel[] = $this->_t(3) . "{"; + $exel[] = $this->_t(4) . "\$xls_mode = 2;"; + $exel[] = $this->_t(3) . "}"; + $exel[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Set active sheet and get it."; + $exel[] = $this->_t(3) . "\$active_sheet = \$spreadsheet->setActiveSheetIndex(0);"; + $exel[] = $this->_t(3) . "foreach (\$rows as \$array)"; + $exel[] = $this->_t(3) . "{"; $exel[] = $this->_t(4) . "\$a = 'A';"; - $exel[] = $this->_t(4) . "foreach (\$array as \$value){"; + $exel[] = $this->_t(4) . "foreach (\$array as \$value)"; + $exel[] = $this->_t(4) . "{"; $exel[] = $this->_t(5) - . "\$spreadsheet->setActiveSheetIndex(0)->setCellValue(\$a.\$i, \$value);"; - $exel[] = $this->_t(5) . "if (\$i == 1){"; - $exel[] = $this->_t(6) - . "\$spreadsheet->getActiveSheet()->getColumnDimension(\$a)->setAutoSize(true);"; - $exel[] = $this->_t(6) - . "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->applyFromArray(\$headerStyles);"; - $exel[] = $this->_t(6) - . "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);"; - $exel[] = $this->_t(5) . "} elseif (\$a === 'A'){"; - $exel[] = $this->_t(6) - . "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->applyFromArray(\$sideStyles);"; - $exel[] = $this->_t(5) . "} else {"; - $exel[] = $this->_t(6) - . "\$spreadsheet->getActiveSheet()->getStyle(\$a.\$i)->applyFromArray(\$normalStyles);"; + . "\$active_sheet->setCellValue(\$a.\$i, \$value);"; + $exel[] = $this->_t(5) . "if (\$xls_mode != 3)"; + $exel[] = $this->_t(5) . "{"; + $exel[] = $this->_t(6) . "if (\$i == 1)"; + $exel[] = $this->_t(6) . "{"; + $exel[] = $this->_t(7) + . "\$active_sheet->getColumnDimension(\$a)->setAutoSize(true);"; + $exel[] = $this->_t(7) + . "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$headerStyles);"; + $exel[] = $this->_t(7) + . "\$active_sheet->getStyle(\$a.\$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);"; + $exel[] = $this->_t(6) . "}"; + $exel[] = $this->_t(6) . "elseif (\$a === 'A')"; + $exel[] = $this->_t(6) . "{"; + $exel[] = $this->_t(7) + . "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$sideStyles);"; + $exel[] = $this->_t(6) . "}"; + $exel[] = $this->_t(6) . "elseif (\$xls_mode == 1)"; + $exel[] = $this->_t(6) . "{"; + $exel[] = $this->_t(7) + . "\$active_sheet->getStyle(\$a.\$i)->applyFromArray(\$normalStyles);"; + $exel[] = $this->_t(6) . "}"; $exel[] = $this->_t(5) . "}"; $exel[] = $this->_t(5) . "\$a++;"; $exel[] = $this->_t(4) . "}"; @@ -1725,7 +1753,7 @@ class Interpretation extends Fields $exel[] = $this->_t(2) . "header('Content-Type: application/vnd.ms-excel');"; $exel[] = $this->_t(2) - . "header('Content-Disposition: attachment;filename=\"'.\$fileName.'.xls\"');"; + . "header('Content-Disposition: attachment;filename=\"' . \$fileName . '.' . strtolower(\$file_type) .'\"');"; $exel[] = $this->_t(2) . "header('Cache-Control: max-age=0');"; $exel[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " If you're serving to IE 9, then the following may be needed"; @@ -1744,7 +1772,7 @@ class Interpretation extends Fields $exel[] = $this->_t(2) . "header ('Pragma: public'); //" . $this->setLine(__LINE__) . " HTTP/1.0"; $exel[] = PHP_EOL . $this->_t(2) - . "\$writer = IOFactory::createWriter(\$spreadsheet, 'Xls');"; + . "\$writer = IOFactory::createWriter(\$spreadsheet, \$file_type);"; $exel[] = $this->_t(2) . "\$writer->save('php://output');"; $exel[] = $this->_t(2) . "jexit();"; $exel[] = $this->_t(1) . "}"; @@ -5631,7 +5659,8 @@ class Interpretation extends Fields $buttons[] = $this->_t(1) . $tab . $this->_t(2) . "JToolBarHelper::custom('" . $viewName . "." . $custom_button['method'] . "', '" - . $custom_button['icomoon'] . "', '', '" . $keyLang + . $custom_button['icomoon'] . " custom-button-" + . strtolower($custom_button['method']) . "', '', '" . $keyLang . "', false);"; $buttons[] = $this->_t(1) . $tab . $this->_t(1) . "}"; } @@ -5665,7 +5694,8 @@ class Interpretation extends Fields ) . $tab . $this->_t(1) . "JToolBarHelper::custom('" . $viewsName . "." . $custom_button['method'] . "', '" - . $custom_button['icomoon'] . "', '', '" + . $custom_button['icomoon'] . " custom-button-" + . strtolower($custom_button['method']) . "', '', '" . $keyLang . "', false);"; $this->onlyFunctionButton[$viewsName][] = $this->_t( 1 @@ -5685,7 +5715,8 @@ class Interpretation extends Fields $buttons[] = $this->_t(1) . $tab . $this->_t(2) . "JToolBarHelper::custom('" . $viewsName . "." . $custom_button['method'] . "', '" - . $custom_button['icomoon'] . "', '', '" + . $custom_button['icomoon'] . " custom-button-" + . strtolower($custom_button['method']) . "', '', '" . $keyLang . "', '" . $validateSelection . "');"; $buttons[] = $this->_t(1) . $tab . $this->_t(1) @@ -14365,9 +14396,9 @@ class Interpretation extends Fields $query .= PHP_EOL . $this->_t(1) . "{"; $query .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " setup the query"; - $query .= PHP_EOL . $this->_t(2) . "if (" + $query .= PHP_EOL . $this->_t(2) . "if ((\$pks_size = " . $this->fileContentStatic[$this->hhh . 'Component' - . $this->hhh] . "Helper::checkArray(\$pks))"; + . $this->hhh] . "Helper::checkArray(\$pks)) !== false || 'bulk' === \$pks)"; $query .= PHP_EOL . $this->_t(2) . "{"; $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set a value to know this is " . $config['type'] @@ -14399,8 +14430,39 @@ class Interpretation extends Fields . "\$query->from(\$db->quoteName('#__" . $this->componentCodeName . "_" . $viewName_single . "', 'a'));"; + $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) + . " The bulk export path"; + $query .= PHP_EOL . $this->_t(3) . "if ('bulk' === \$pks)"; $query .= PHP_EOL . $this->_t(3) + . "{"; + $query .= PHP_EOL . $this->_t(4) + . "\$query->where('a.id > 0');"; + $query .= PHP_EOL . $this->_t(3) + . "}"; + $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) + . " A large array of ID's will not work out well"; + $query .= PHP_EOL . $this->_t(3) . "elseif (\$pks_size > 500)"; + $query .= PHP_EOL . $this->_t(3) + . "{"; + $query .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) + . " Use lowest ID"; + $query .= PHP_EOL . $this->_t(4) + . "\$query->where('a.id >= ' . (int) min(\$pks));"; + $query .= PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) + . " Use highest ID"; + $query .= PHP_EOL . $this->_t(4) + . "\$query->where('a.id <= ' . (int) max(\$pks));"; + $query .= PHP_EOL . $this->_t(3) + . "}"; + $query .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) + . " The normal default path"; + $query .= PHP_EOL . $this->_t(3) . "else"; + $query .= PHP_EOL . $this->_t(3) + . "{"; + $query .= PHP_EOL . $this->_t(4) . "\$query->where('a.id IN (' . implode(',',\$pks) . ')');"; + $query .= PHP_EOL . $this->_t(3) + . "}"; // add custom filtering php $query .= $this->getCustomScriptBuilder( 'php_getlistquery', $viewName_single, diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 8cafa3d41..c4d29f654 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -6309,6 +6309,8 @@ abstract class ComponentbuilderHelper ->setLastModifiedBy($modified) ->setTitle($title) ->setSubject($subjectTab); + // The file type + $file_type = 'Xls'; // set description if ($description) { @@ -6348,21 +6350,46 @@ abstract class ComponentbuilderHelper )); // Add some data - if (self::checkArray($rows)) + if (($size = self::checkArray($rows)) !== false) { $i = 1; - foreach ($rows as $array){ + + // Based on data size we adapt the behaviour. + $xls_mode = 1; + if ($size > 3000) + { + $xls_mode = 3; + $file_type = 'Csv'; + } + elseif ($size > 2000) + { + $xls_mode = 2; + } + + // Set active sheet and get it. + $active_sheet = $spreadsheet->setActiveSheetIndex(0); + foreach ($rows as $array) + { $a = 'A'; - foreach ($array as $value){ - $spreadsheet->setActiveSheetIndex(0)->setCellValue($a.$i, $value); - if ($i == 1){ - $spreadsheet->getActiveSheet()->getColumnDimension($a)->setAutoSize(true); - $spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($headerStyles); - $spreadsheet->getActiveSheet()->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); - } elseif ($a === 'A'){ - $spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($sideStyles); - } else { - $spreadsheet->getActiveSheet()->getStyle($a.$i)->applyFromArray($normalStyles); + foreach ($array as $value) + { + $active_sheet->setCellValue($a.$i, $value); + if ($xls_mode != 3) + { + if ($i == 1) + { + $active_sheet->getColumnDimension($a)->setAutoSize(true); + $active_sheet->getStyle($a.$i)->applyFromArray($headerStyles); + $active_sheet->getStyle($a.$i)->getAlignment()->setHorizontal(PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); + } + elseif ($a === 'A') + { + $active_sheet->getStyle($a.$i)->applyFromArray($sideStyles); + } + elseif ($xls_mode == 1) + { + $active_sheet->getStyle($a.$i)->applyFromArray($normalStyles); + } } $a++; } @@ -6382,7 +6409,7 @@ abstract class ComponentbuilderHelper // Redirect output to a client's web browser (Excel5) header('Content-Type: application/vnd.ms-excel'); - header('Content-Disposition: attachment;filename="'.$fileName.'.xls"'); + header('Content-Disposition: attachment;filename="' . $fileName . '.' . strtolower($file_type) .'"'); header('Cache-Control: max-age=0'); // If you're serving to IE 9, then the following may be needed header('Cache-Control: max-age=1'); @@ -6393,7 +6420,7 @@ abstract class ComponentbuilderHelper header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 header ('Pragma: public'); // HTTP/1.0 - $writer = IOFactory::createWriter($spreadsheet, 'Xls'); + $writer = IOFactory::createWriter($spreadsheet, $file_type); $writer->save('php://output'); jexit(); } diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index 35eecdbe0..2bff5e023 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -342,7 +342,7 @@ class ComponentbuilderModelAdmin_views extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -360,7 +360,24 @@ class ComponentbuilderModelAdmin_views extends JModelList // From the componentbuilder_admin_view table $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/class_methods.php b/admin/models/class_methods.php index 0d9d4c9da..dbca552ae 100644 --- a/admin/models/class_methods.php +++ b/admin/models/class_methods.php @@ -269,7 +269,7 @@ class ComponentbuilderModelClass_methods extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -287,7 +287,24 @@ class ComponentbuilderModelClass_methods extends JModelList // From the componentbuilder_class_method table $query->from($db->quoteName('#__componentbuilder_class_method', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/class_properties.php b/admin/models/class_properties.php index 9e9befe8a..db8ae024e 100644 --- a/admin/models/class_properties.php +++ b/admin/models/class_properties.php @@ -269,7 +269,7 @@ class ComponentbuilderModelClass_properties extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -287,7 +287,24 @@ class ComponentbuilderModelClass_properties extends JModelList // From the componentbuilder_class_property table $query->from($db->quoteName('#__componentbuilder_class_property', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index ede100835..447816d19 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -283,7 +283,7 @@ class ComponentbuilderModelCustom_admin_views extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -301,7 +301,24 @@ class ComponentbuilderModelCustom_admin_views extends JModelList // From the componentbuilder_custom_admin_view table $query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index d9745bf2d..3c016267e 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -316,7 +316,7 @@ class ComponentbuilderModelCustom_codes extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -334,7 +334,24 @@ class ComponentbuilderModelCustom_codes extends JModelList // From the componentbuilder_custom_code table $query->from($db->quoteName('#__componentbuilder_custom_code', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 91356cf03..9f66a6f5b 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -266,7 +266,7 @@ class ComponentbuilderModelDynamic_gets extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -284,7 +284,24 @@ class ComponentbuilderModelDynamic_gets extends JModelList // From the componentbuilder_dynamic_get table $query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/fields.php b/admin/models/fields.php index 8eb0104d8..b6b8225b6 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -382,7 +382,7 @@ class ComponentbuilderModelFields extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -400,7 +400,24 @@ class ComponentbuilderModelFields extends JModelList // From the componentbuilder_field table $query->from($db->quoteName('#__componentbuilder_field', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index 399098cce..d4a5615aa 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -235,7 +235,7 @@ class ComponentbuilderModelFieldtypes extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -253,7 +253,24 @@ class ComponentbuilderModelFieldtypes extends JModelList // From the componentbuilder_fieldtype table $query->from($db->quoteName('#__componentbuilder_fieldtype', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/help_documents.php b/admin/models/help_documents.php index 4587f36f0..a78e375d8 100644 --- a/admin/models/help_documents.php +++ b/admin/models/help_documents.php @@ -278,7 +278,7 @@ class ComponentbuilderModelHelp_documents extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -296,7 +296,24 @@ class ComponentbuilderModelHelp_documents extends JModelList // From the componentbuilder_help_document table $query->from($db->quoteName('#__componentbuilder_help_document', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Order the results by ordering $query->order('a.ordering ASC'); diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 6f2a6d7ce..3e551c730 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -2252,7 +2252,7 @@ class ComponentbuilderModelJoomla_components extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -2270,7 +2270,24 @@ class ComponentbuilderModelJoomla_components extends JModelList // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/language_translations.php b/admin/models/language_translations.php index 2a839d248..d66135701 100644 --- a/admin/models/language_translations.php +++ b/admin/models/language_translations.php @@ -249,7 +249,7 @@ class ComponentbuilderModelLanguage_translations extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -267,7 +267,24 @@ class ComponentbuilderModelLanguage_translations extends JModelList // From the componentbuilder_language_translation table $query->from($db->quoteName('#__componentbuilder_language_translation', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/languages.php b/admin/models/languages.php index 302ad4554..a232fecb2 100644 --- a/admin/models/languages.php +++ b/admin/models/languages.php @@ -322,7 +322,7 @@ class ComponentbuilderModelLanguages extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -340,7 +340,24 @@ class ComponentbuilderModelLanguages extends JModelList // From the componentbuilder_language table $query->from($db->quoteName('#__componentbuilder_language', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/layouts.php b/admin/models/layouts.php index 0c5bd8fe8..bbede2926 100644 --- a/admin/models/layouts.php +++ b/admin/models/layouts.php @@ -255,7 +255,7 @@ class ComponentbuilderModelLayouts extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -273,7 +273,24 @@ class ComponentbuilderModelLayouts extends JModelList // From the componentbuilder_layout table $query->from($db->quoteName('#__componentbuilder_layout', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/placeholders.php b/admin/models/placeholders.php index 6d191f790..153139148 100644 --- a/admin/models/placeholders.php +++ b/admin/models/placeholders.php @@ -201,7 +201,7 @@ class ComponentbuilderModelPlaceholders extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -219,7 +219,24 @@ class ComponentbuilderModelPlaceholders extends JModelList // From the componentbuilder_placeholder table $query->from($db->quoteName('#__componentbuilder_placeholder', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/servers.php b/admin/models/servers.php index 2f820e780..f12905b60 100644 --- a/admin/models/servers.php +++ b/admin/models/servers.php @@ -244,7 +244,7 @@ class ComponentbuilderModelServers extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -262,7 +262,24 @@ class ComponentbuilderModelServers extends JModelList // From the componentbuilder_server table $query->from($db->quoteName('#__componentbuilder_server', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/site_views.php b/admin/models/site_views.php index 69207716f..2ad2c53bb 100644 --- a/admin/models/site_views.php +++ b/admin/models/site_views.php @@ -287,7 +287,7 @@ class ComponentbuilderModelSite_views extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -305,7 +305,24 @@ class ComponentbuilderModelSite_views extends JModelList // From the componentbuilder_site_view table $query->from($db->quoteName('#__componentbuilder_site_view', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/snippets.php b/admin/models/snippets.php index 5fa27a5aa..c2613b5ff 100644 --- a/admin/models/snippets.php +++ b/admin/models/snippets.php @@ -343,7 +343,7 @@ class ComponentbuilderModelSnippets extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -361,7 +361,24 @@ class ComponentbuilderModelSnippets extends JModelList // From the componentbuilder_snippet table $query->from($db->quoteName('#__componentbuilder_snippet', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/templates.php b/admin/models/templates.php index ac562b4f4..be7fc91a1 100644 --- a/admin/models/templates.php +++ b/admin/models/templates.php @@ -255,7 +255,7 @@ class ComponentbuilderModelTemplates extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -273,7 +273,24 @@ class ComponentbuilderModelTemplates extends JModelList // From the componentbuilder_template table $query->from($db->quoteName('#__componentbuilder_template', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/models/validation_rules.php b/admin/models/validation_rules.php index b1dbca638..a2636f860 100644 --- a/admin/models/validation_rules.php +++ b/admin/models/validation_rules.php @@ -199,7 +199,7 @@ class ComponentbuilderModelValidation_rules extends JModelList public function getExportData($pks, $user = null) { // setup the query - if (ComponentbuilderHelper::checkArray($pks)) + if (($pks_size = ComponentbuilderHelper::checkArray($pks)) !== false || 'bulk' === $pks) { // Set a value to know this is export method. (USE IN CUSTOM CODE TO ALTER OUTCOME) $_export = true; @@ -217,7 +217,24 @@ class ComponentbuilderModelValidation_rules extends JModelList // From the componentbuilder_validation_rule table $query->from($db->quoteName('#__componentbuilder_validation_rule', 'a')); - $query->where('a.id IN (' . implode(',',$pks) . ')'); + // The bulk export path + if ('bulk' === $pks) + { + $query->where('a.id > 0'); + } + // A large array of ID's will not work out well + elseif ($pks_size > 500) + { + // Use lowest ID + $query->where('a.id >= ' . (int) min($pks)); + // Use highest ID + $query->where('a.id <= ' . (int) max($pks)); + } + // The normal default path + else + { + $query->where('a.id IN (' . implode(',',$pks) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) { diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index aa6cbd4fb..2df832309 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy if ($this->user->authorise('admin_view.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('admin_views.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('admin_views.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->canDo->get('core.import') && $this->canDo->get('admin_view.import')) diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index 12c562fc4..7adbb2f1e 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -339,17 +339,17 @@ class ComponentbuilderViewCompiler extends JViewLegacy if ($this->canDo->get('compiler.run_expansion')) { // add Run Expansion button. - JToolBarHelper::custom('compiler.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('compiler.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->canDo->get('compiler.translate')) { // add Translate button. - JToolBarHelper::custom('compiler.runTranslator', 'comments-2', '', 'COM_COMPONENTBUILDER_TRANSLATE', false); + JToolBarHelper::custom('compiler.runTranslator', 'comments-2 custom-button-runtranslator', '', 'COM_COMPONENTBUILDER_TRANSLATE', false); } if ($this->canDo->get('compiler.clear_tmp')) { // add Clear tmp button. - JToolBarHelper::custom('compiler.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false); + JToolBarHelper::custom('compiler.clearTmp', 'purge custom-button-cleartmp', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false); } // set help url for this view if found diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index e040d422f..381c261c1 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy if ($this->user->authorise('custom_admin_view.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('custom_admin_views.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('custom_admin_views.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } if ($this->canDo->get('core.import') && $this->canDo->get('custom_admin_view.import')) diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 18976f197..5dd2c29fe 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy if ($this->user->authorise('custom_code.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->canDo->get('core.import') && $this->canDo->get('custom_code.import')) diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 32a81413e..14e316411 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy if ($this->user->authorise('dynamic_get.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->canDo->get('core.import') && $this->canDo->get('dynamic_get.import')) diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index 3fc356eba..bfa580282 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewFields extends JViewLegacy if ($this->user->authorise('field.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('fields.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('fields.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->canDo->get('core.import') && $this->canDo->get('field.import')) diff --git a/admin/views/get_snippets/view.html.php b/admin/views/get_snippets/view.html.php index 0a791cdf1..8fbbcf7d9 100644 --- a/admin/views/get_snippets/view.html.php +++ b/admin/views/get_snippets/view.html.php @@ -257,32 +257,32 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy if ($this->canDo->get('get_snippets.custom_admin_views')) { // add Custom Admin Views button. - JToolBarHelper::custom('get_snippets.openCustomAdminViews', 'screen', '', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS', false); + JToolBarHelper::custom('get_snippets.openCustomAdminViews', 'screen custom-button-opencustomadminviews', '', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS', false); } if ($this->canDo->get('get_snippets.site_views')) { // add Site Views button. - JToolBarHelper::custom('get_snippets.openSiteViews', 'palette', '', 'COM_COMPONENTBUILDER_SITE_VIEWS', false); + JToolBarHelper::custom('get_snippets.openSiteViews', 'palette custom-button-opensiteviews', '', 'COM_COMPONENTBUILDER_SITE_VIEWS', false); } if ($this->canDo->get('get_snippets.templates')) { // add Templates button. - JToolBarHelper::custom('get_snippets.openTemplates', 'brush', '', 'COM_COMPONENTBUILDER_TEMPLATES', false); + JToolBarHelper::custom('get_snippets.openTemplates', 'brush custom-button-opentemplates', '', 'COM_COMPONENTBUILDER_TEMPLATES', false); } if ($this->canDo->get('get_snippets.layouts')) { // add Layouts button. - JToolBarHelper::custom('get_snippets.openLayouts', 'brush', '', 'COM_COMPONENTBUILDER_LAYOUTS', false); + JToolBarHelper::custom('get_snippets.openLayouts', 'brush custom-button-openlayouts', '', 'COM_COMPONENTBUILDER_LAYOUTS', false); } if ($this->canDo->get('get_snippets.snippets')) { // add Snippets button. - JToolBarHelper::custom('get_snippets.openSnippets', 'pin', '', 'COM_COMPONENTBUILDER_SNIPPETS', false); + JToolBarHelper::custom('get_snippets.openSnippets', 'pin custom-button-opensnippets', '', 'COM_COMPONENTBUILDER_SNIPPETS', false); } if ($this->canDo->get('get_snippets.libraries')) { // add Libraries button. - JToolBarHelper::custom('get_snippets.openLibraries', 'puzzle', '', 'COM_COMPONENTBUILDER_LIBRARIES', false); + JToolBarHelper::custom('get_snippets.openLibraries', 'puzzle custom-button-openlibraries', '', 'COM_COMPONENTBUILDER_LIBRARIES', false); } // set help url for this view if found diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 00036299d..e95bc3295 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -123,12 +123,12 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy if ($this->user->authorise('joomla_component.clone', 'com_componentbuilder')) { // add Clone button. - JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', 'true'); + JToolBarHelper::custom('joomla_components.cloner', 'save-copy custom-button-cloner', '', 'COM_COMPONENTBUILDER_CLONE', 'true'); } if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder')) { // add Export JCB Packages button. - JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true'); + JToolBarHelper::custom('joomla_components.smartExport', 'download custom-button-smartexport', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true'); } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) @@ -148,22 +148,22 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy if ($this->user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder')) { // add Import JCB Packages button. - JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false); + JToolBarHelper::custom('joomla_components.smartImport', 'upload custom-button-smartimport', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false); } if ($this->user->authorise('joomla_component.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder')) { // add Backup button. - JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false); + JToolBarHelper::custom('joomla_components.backup', 'archive custom-button-backup', '', 'COM_COMPONENTBUILDER_BACKUP', false); } if ($this->user->authorise('joomla_component.clear_tmp', 'com_componentbuilder')) { // add Clear tmp button. - JToolBarHelper::custom('joomla_components.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false); + JToolBarHelper::custom('joomla_components.clearTmp', 'purge custom-button-cleartmp', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false); } if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import')) diff --git a/admin/views/joomla_modules/view.html.php b/admin/views/joomla_modules/view.html.php index f4e5fc7ee..3197a6050 100644 --- a/admin/views/joomla_modules/view.html.php +++ b/admin/views/joomla_modules/view.html.php @@ -133,12 +133,12 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy if ($this->user->authorise('joomla_module.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('joomla_modules.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('joomla_modules.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } if ($this->user->authorise('joomla_module.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('joomla_modules.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('joomla_modules.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } // set help url for this view if found diff --git a/admin/views/joomla_plugins/view.html.php b/admin/views/joomla_plugins/view.html.php index 1d98c0306..f75abb729 100644 --- a/admin/views/joomla_plugins/view.html.php +++ b/admin/views/joomla_plugins/view.html.php @@ -133,22 +133,22 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy if ($this->user->authorise('joomla_plugin.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder')) { // add Get Boilerplate button. - JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false); + JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla custom-button-getboilerplate', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false); } if ($this->user->authorise('joomla_plugin.methods', 'com_componentbuilder')) { // add Methods button. - JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla', '', 'COM_COMPONENTBUILDER_METHODS', false); + JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla custom-button-openclassmethods', '', 'COM_COMPONENTBUILDER_METHODS', false); } if ($this->user->authorise('joomla_plugin.properties', 'com_componentbuilder')) { // add Properties button. - JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla', '', 'COM_COMPONENTBUILDER_PROPERTIES', false); + JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla custom-button-openclassproperties', '', 'COM_COMPONENTBUILDER_PROPERTIES', false); } // set help url for this view if found diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index 71dd8b38d..356f0d7da 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy if ($this->user->authorise('language.build', 'com_componentbuilder')) { // add Build button. - JToolBarHelper::custom('languages.buildLanguages', 'joomla', '', 'COM_COMPONENTBUILDER_BUILD', false); + JToolBarHelper::custom('languages.buildLanguages', 'joomla custom-button-buildlanguages', '', 'COM_COMPONENTBUILDER_BUILD', false); } if ($this->canDo->get('core.import') && $this->canDo->get('language.import')) diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 6bd7ac34c..b80e465c4 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy if ($this->user->authorise('layout.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('layouts.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('layouts.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } if ($this->canDo->get('core.import') && $this->canDo->get('layout.import')) diff --git a/admin/views/libraries/view.html.php b/admin/views/libraries/view.html.php index 7f906a1d4..387ad101e 100644 --- a/admin/views/libraries/view.html.php +++ b/admin/views/libraries/view.html.php @@ -133,7 +133,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy if ($this->user->authorise('library.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('libraries.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('libraries.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } // set help url for this view if found diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index 6d51fc227..2fe9ec51a 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy if ($this->user->authorise('site_view.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('site_views.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('site_views.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } if ($this->canDo->get('core.import') && $this->canDo->get('site_view.import')) diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index e4b62e813..f2cf6f21b 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -123,7 +123,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy if ($this->user->authorise('snippet.share_snippets', 'com_componentbuilder')) { // add Share Snippets button. - JToolBarHelper::custom('snippets.shareSnippets', 'share', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', 'true'); + JToolBarHelper::custom('snippets.shareSnippets', 'share custom-button-sharesnippets', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', 'true'); } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) @@ -143,7 +143,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy if ($this->user->authorise('snippet.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('snippets.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('snippets.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } if ($this->canDo->get('core.import') && $this->canDo->get('snippet.import')) diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 3c4de15bb..83e26eb5b 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy if ($this->user->authorise('template.get_snippets', 'com_componentbuilder')) { // add Get Snippets button. - JToolBarHelper::custom('templates.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); + JToolBarHelper::custom('templates.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false); } if ($this->canDo->get('core.import') && $this->canDo->get('template.import')) diff --git a/admin/views/validation_rules/view.html.php b/admin/views/validation_rules/view.html.php index 3005c815c..0b1f3d44c 100644 --- a/admin/views/validation_rules/view.html.php +++ b/admin/views/validation_rules/view.html.php @@ -138,7 +138,7 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy if ($this->user->authorise('validation_rule.run_expansion', 'com_componentbuilder')) { // add Run Expansion button. - JToolBarHelper::custom('validation_rules.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); + JToolBarHelper::custom('validation_rules.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false); } if ($this->canDo->get('core.import') && $this->canDo->get('validation_rule.import')) diff --git a/componentbuilder.xml b/componentbuilder.xml index 68395744d..858737d50 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 16th July, 2020 + 24th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1 From 05da68f1ae65a6676fe74415d36a5fbaafc2d47a Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 26 Jul 2020 18:21:08 +0200 Subject: [PATCH 11/14] Resolved gh-576 to allow empty filter options. --- README.md | 6 ++-- admin/README.txt | 6 ++-- admin/helpers/compiler/e_Interpretation.php | 30 ++++++++++++------- .../en-GB/en-GB.com_componentbuilder.ini | 2 ++ admin/models/forms/dynamic_get.xml | 10 +++++++ componentbuilder.xml | 2 +- 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 40c043732..9c93b6ec4 100644 --- a/README.md +++ b/README.md @@ -144,12 +144,12 @@ 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*: 24th July, 2020 ++ *Last Build*: 26th July, 2020 + *Version*: 2.11.2 + *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*: **283043** -+ *Field count*: **1525** ++ *Line count*: **283055** ++ *Field count*: **1526** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index 40c043732..9c93b6ec4 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,12 +144,12 @@ 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*: 24th July, 2020 ++ *Last Build*: 26th July, 2020 + *Version*: 2.11.2 + *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*: **283043** -+ *Field count*: **1525** ++ *Line count*: **283055** ++ *Field count*: **1526** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 4b10da9a8..f6f8ef717 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -3160,11 +3160,16 @@ class Interpretation extends Fields . $ter['table_key'] . " " . $ter['operator'] . " (' . implode(',', \$array) . ')');"; $string .= PHP_EOL . $this->_t(2) . $tab . "}"; - $string .= PHP_EOL . $this->_t(2) . $tab . "else"; - $string .= PHP_EOL . $this->_t(2) . $tab . "{"; - $string .= PHP_EOL . $this->_t(2) . $tab - . $this->_t(1) . "return false;"; - $string .= PHP_EOL . $this->_t(2) . $tab . "}"; + // check if empty is allowed + if (!isset($ter['empty']) || !$ter['empty']) + { + $string .= PHP_EOL . $this->_t(2) . $tab + . "else"; + $string .= PHP_EOL . $this->_t(2) . $tab . "{"; + $string .= PHP_EOL . $this->_t(2) . $tab + . $this->_t(1) . "return false;"; + $string .= PHP_EOL . $this->_t(2) . $tab . "}"; + } } else { @@ -3193,11 +3198,16 @@ class Interpretation extends Fields . $ter['table_key'] . " " . $ter['operator'] . " ' . \$checkValue);"; $string .= PHP_EOL . $this->_t(2) . $tab . "}"; - $string .= PHP_EOL . $this->_t(2) . $tab . "else"; - $string .= PHP_EOL . $this->_t(2) . $tab . "{"; - $string .= PHP_EOL . $this->_t(2) . $tab - . $this->_t(1) . "return false;"; - $string .= PHP_EOL . $this->_t(2) . $tab . "}"; + // check if empty is allowed + if (!isset($ter['empty']) || !$ter['empty']) + { + $string .= PHP_EOL . $this->_t(2) . $tab + . "else"; + $string .= PHP_EOL . $this->_t(2) . $tab . "{"; + $string .= PHP_EOL . $this->_t(2) . $tab + . $this->_t(1) . "return false;"; + $string .= PHP_EOL . $this->_t(2) . $tab . "}"; + } } break; case 9: diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 47c181c89..b617492e3 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -4512,6 +4512,8 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_DIRECTION_LABEL="Ordering Direction" COM_COMPONENTBUILDER_DYNAMIC_GET_E="e" COM_COMPONENTBUILDER_DYNAMIC_GET_EDIT="Editing the Dynamic Get" COM_COMPONENTBUILDER_DYNAMIC_GET_EE="ee" +COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_DESCRIPTION="Empty" +COM_COMPONENTBUILDER_DYNAMIC_GET_EMPTY_LABEL="Allow" COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL="equal" COM_COMPONENTBUILDER_DYNAMIC_GET_EQUAL_OR_NOT="equal or not" COM_COMPONENTBUILDER_DYNAMIC_GET_ERROR_UNIQUE_ALIAS="Another Dynamic Get has the same alias." diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml index 21d67915f..bb3090580 100644 --- a/admin/models/forms/dynamic_get.xml +++ b/admin/models/forms/dynamic_get.xml @@ -810,6 +810,16 @@ message="COM_COMPONENTBUILDER_DYNAMIC_GET_TABLE_KEY_MESSAGE" hint="COM_COMPONENTBUILDER_DYNAMIC_GET_TABLE_KEY_HINT" /> + + diff --git a/componentbuilder.xml b/componentbuilder.xml index 858737d50..edf385b64 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 24th July, 2020 + 26th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1 From 53f0abc0e2eada00c0e065de9d86ab61f838eea2 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sun, 26 Jul 2020 18:35:19 +0200 Subject: [PATCH 12/14] Added the security policy. --- SECURITY.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..bde361fa6 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +## Reporting a Vulnerability + +Report all security issues on the JCB website, and not on GitHub. + +### [joomlacomponentbuilder.com/report-security-issues](http://joomlacomponentbuilder.com/report-security-issues) -- 2.40.1 From 98f18219148d9c744350b425db7951c16194c633 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 28 Jul 2020 06:14:49 +0200 Subject: [PATCH 13/14] Added the option to exclude language strings from JCB package exports. --- README.md | 10 +++++----- admin/README.txt | 10 +++++----- admin/config.xml | 14 ++++++++++++++ .../language/en-GB/en-GB.com_componentbuilder.ini | 2 ++ admin/models/joomla_components.php | 5 +++++ admin/sql/install.mysql.utf8.sql | 2 +- componentbuilder.xml | 6 +++--- componentbuilder_update_server.xml | 4 ++-- script.php | 4 ++-- 9 files changed, 39 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9c93b6ec4..961f0eae5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.2) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.3) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,12 +144,12 @@ 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*: 26th July, 2020 -+ *Version*: 2.11.2 ++ *Last Build*: 28th July, 2020 ++ *Version*: 2.11.3 + *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*: **283055** -+ *Field count*: **1526** ++ *Line count*: **283076** ++ *Field count*: **1527** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index 9c93b6ec4..961f0eae5 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.2) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.11.3) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,12 +144,12 @@ 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*: 26th July, 2020 -+ *Version*: 2.11.2 ++ *Last Build*: 28th July, 2020 ++ *Version*: 2.11.3 + *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*: **283055** -+ *Field count*: **1526** ++ *Line count*: **283076** ++ *Field count*: **1527** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/config.xml b/admin/config.xml index 0421e9f60..179308fa8 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -311,6 +311,20 @@ max="100" step="10" /> + + + + + + diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index b617492e3..cb148d833 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3456,6 +3456,8 @@ COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_DESCRIPTION="Enter Email" COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_HINT="Email Here" COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_LABEL="Email" COM_COMPONENTBUILDER_CONFIG_EXPORT_EMAIL_MESSAGE="Error! Please email address here." +COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_DESCRIPTION="All the export of language strings during JCB package export." +COM_COMPONENTBUILDER_CONFIG_EXPORT_LANGUAGE_STRINGS_LABEL="Export Language Strings" COM_COMPONENTBUILDER_CONFIG_EXPORT_LICENSE_DESCRIPTION="Add License Here" COM_COMPONENTBUILDER_CONFIG_EXPORT_LICENSE_HINT="Add License Here" COM_COMPONENTBUILDER_CONFIG_EXPORT_LICENSE_LABEL="License" diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 3e551c730..514d2d72d 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -1672,6 +1672,11 @@ class ComponentbuilderModelJoomla_components extends JModelList */ protected function setLanguageTranslation(&$id, $target = 'components') { + // check if the export of language strings is allowed + if ($this->params->get('export_language_strings', 1) != 1) + { + return; + } // Create a new query object. $query = $this->_db->getQuery(true); $query->select(array('a.*')); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 6f7d3298f..76e3e7ea5 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -1904,7 +1904,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls -- INSERT INTO `#__componentbuilder_joomla_component` (`id`, `add_license`, `license_type`, `mvc_versiondate`, `add_css_admin`, `add_css_site`, `add_email_helper`, `add_javascript`, `add_php_helper_admin`, `add_php_helper_both`, `add_php_helper_site`, `add_php_postflight_install`, `add_php_method_uninstall`, `add_php_postflight_update`, `add_php_preflight_install`, `add_php_preflight_update`, `add_placeholders`, `add_sql`, `add_sql_uninstall`, `addfootable`, `adduikit`, `add_admin_event`, `add_site_event`, `add_update_server`, `add_sales_server`, `sales_server`, `update_server`, `update_server_target`, `update_server_url`, `php_admin_event`, `php_site_event`, `addreadme`, `readme`, `author`, `bom`, `buildcomp`, `buildcompsql`, `companyname`, `component_version`, `copyright`, `creatuserhelper`, `css_admin`, `css_site`, `dashboard`, `dashboard_type`, `debug_linenr`, `description`, `email`, `emptycontributors`, `export_buy_link`, `joomla_source_link`, `export_key`, `image`, `javascript`, `license`, `name`, `system_name`, `toignore`, `name_code`, `number`, `php_helper_admin`, `php_helper_both`, `php_helper_site`, `php_postflight_install`, `php_method_uninstall`, `php_postflight_update`, `php_preflight_install`, `php_preflight_update`, `short_description`, `sql`, `sql_uninstall`, `website`, `published`, `created`, `modified`, `hits`, `ordering`, `whmcs_key`, `whmcs_url`, `guid`) VALUES -(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.3', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', 'HFrCeQ/dZlNywC+BnkD7+Jznb1AoSMFkvlZvLrWJnP8=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-06-24 22:43:55', '', 3, 'LqVjNz4RpFQus30hSwGAxD6C55z/W+xG/qO+0Ea2QUA=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); +(25, '', 1, '', '', '', '', '', '', '', 1, 1, '', '', '', '', '', '', '', '', 1, '', '', 1, '', '', '', 2, 'https://raw.githubusercontent.com/namibia/demo-joomla-3-component/master/demo_updateserver.xml', '', '', 1, 'IyAjIyNDb21wb25lbnRfbmFtZSMjIyAoIyMjVkVSU0lPTiMjIykNCg0KIVsjIyNDb21wb25lbnRfbmFtZSMjIyBpbWFnZV0oaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL25hbWliaWEvZGVtby1qb29tbGEtMy1jb21wb25lbnQvbWFzdGVyL2FkbWluL2Fzc2V0cy9pbWFnZXMvdmRtLWNvbXBvbmVudC5qcGcgIlRoZSAjIyNDb21wb25lbnRfbmFtZSMjIyIpDQoNCiMjI0RFU0NSSVBUSU9OIyMjDQoNCiMgQnVpbGQgRGV0YWlscw0KDQorICpDb21wYW55KjogWyMjI0NPTVBBTllOQU1FIyMjXSgjIyNBVVRIT1JXRUJTSVRFIyMjKQ0KKyAqQXV0aG9yKjogWyMjI0FVVEhPUiMjI10obWFpbHRvOiMjI0FVVEhPUkVNQUlMIyMjKQ0KKyAqTmFtZSo6IFsjIyNDb21wb25lbnRfbmFtZSMjI10oIyMjQVVUSE9SV0VCU0lURSMjIykNCisgKkZpcnN0IEJ1aWxkKjogIyMjQ1JFQVRJT05EQVRFIyMjDQorICpMYXN0IEJ1aWxkKjogIyMjQlVJTEREQVRFIyMjDQorICpWZXJzaW9uKjogIyMjVkVSU0lPTiMjIw0KKyAqQ29weXJpZ2h0KjogIyMjQ09QWVJJR0hUIyMjDQorICpMaWNlbnNlKjogIyMjTElDRU5TRSMjIw0KDQojIyBCdWlsZCBUaW1lDQoNCioqIyMjdG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjdG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqIChhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNhdmVkIC0NCmR1ZSB0byBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKSkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gbmV2ZXIgbWFraW5nIG9uZSBtaXN0YWtlIG9yIHRha2luZyBhbnkgY29mZmVlIGJyZWFrLikNCg0KKyAqTGluZSBjb3VudCo6ICoqIyMjTElORV9DT1VOVCMjIyoqDQorICpGaWxlIGNvdW50KjogKiojIyNGSUxFX0NPVU5UIyMjKioNCisgKkZvbGRlciBjb3VudCo6ICoqIyMjRk9MREVSX0NPVU5UIyMjKioNCg0KKiojIyNhY3R1YWxIb3Vyc1NwZW50IyMjIEhvdXJzKiogb3IgKiojIyNhY3R1YWxEYXlzU3BlbnQjIyMgRWlnaHQgSG91ciBEYXlzKiogKHRoZSBhY3R1YWwgdGltZSB0aGUgYXV0aG9yIHNwZW50KQ0KDQo+ICh3aXRoIHRoZSBmb2xsb3dpbmcgYnJlYWsgZG93bjoNCj4gKipkZWJ1Z2dpbmcgQCMjI2RlYnVnZ2luZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA0Ow0KPiAqKnBsYW5uaW5nIEAjIyNwbGFubmluZ0hvdXJzIyMjaG91cnMqKiA9IGNvZGluZ3RpbWUgLyA3Ow0KPiAqKm1hcHBpbmcgQCMjI21hcHBpbmdIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gMTA7DQo+ICoqb2ZmaWNlIEAjIyNvZmZpY2VIb3VycyMjI2hvdXJzKiogPSBjb2Rpbmd0aW1lIC8gNjspDQoNCioqIyMjYWN0dWFsVG90YWxIb3VycyMjIyBIb3VycyoqIG9yICoqIyMjYWN0dWFsVG90YWxEYXlzIyMjIEVpZ2h0IEhvdXIgRGF5cyoqDQooYSB0b3RhbCBvZiB0aGUgcmVhbGlzdGljIHRpbWUgZnJhbWUgZm9yIHRoaXMgcHJvamVjdCkNCg0KPiAoaWYgY3JlYXRpbmcgYSBmb2xkZXIgYW5kIGZpbGUgdG9vayAqKjUgc2Vjb25kcyoqIGFuZCB3cml0aW5nIG9uZSBsaW5lIG9mIGNvZGUgdG9vayAqKjEwIHNlY29uZHMqKiwNCj4gd2l0aCB0aGUgbm9ybWFsIGV2ZXJ5ZGF5IHJlYWxpdGllcyBhdCB0aGUgb2ZmaWNlLCB0aGF0IGluY2x1ZGVzIHRoZSBjb21wb25lbnQgcGxhbm5pbmcsIG1hcHBpbmcgJiBkZWJ1Z2dpbmcuKQ0KDQpQcm9qZWN0IGR1cmF0aW9uOiAqKiMjI3Byb2plY3RXZWVrVGltZSMjIyB3ZWVrcyoqIG9yICoqIyMjcHJvamVjdE1vbnRoVGltZSMjIyBtb250aHMqKg0KDQo+IFRoaXMgKipjb21wb25lbnQqKiB3YXMgYnVpbGQgd2l0aCBhIEpvb21sYSBbQXV0b21hdGVkIENvbXBvbmVudCBCdWlsZGVyXShodHRwczovL3d3dy52ZG0uaW8vam9vbWxhLWNvbXBvbmVudC1idWlsZGVyKS4NCj4gRGV2ZWxvcGVkIGJ5IFtMbGV3ZWxseW4gdmFuIGRlciBNZXJ3ZV0obWFpbHRvOmpvb21sYUB2ZG0uaW8pDQoNCiMjIERvbmF0aW9ucw0KDQpJZiB5b3Ugd2FudCB0byBzdXBwb3J0IHRoaXMgcHJvamVjdCwgcGxlYXNlIGNvbnNpZGVyIGRvbmF0aW5nOg0KICogUGF5UGFsOiBbcGF5cGFsLm1lL1tbW3BheXBhbG1lXV1dXShodHRwczovL3d3dy5wYXlwYWwubWUvW1tbcGF5cGFsbWVdXV0pDQogKiBCaXRjb2luOiBbW1tiaXRjb2luYWRkcmVzc11dXQ0KICogRXRoZXJldW06IFtbW2V0aGVyZXVtYWRkcmVzc11dXQ==', 'Llewellyn van der Merwe', 'default.txt', '', '', 'Vast Development Method', '2.0.3', 'Copyright (C) 2015. All Rights Reserved', '', '', '', '', 1, '', 'Just a basic demo of the most basic implementations of the [Joomla](http://www.joomla.org) Component Builder\'s ability.', 'joomla@vdm.io', '', '', 'https://github.com/namibia/demo-joomla-3-component', '01Ic5HmAsqKiFShcsOfnYAKPSgmtOI/eMgdvWC0kfbk=', 'images/vdm/demo500.jpg', '', 'GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html', 'Demo', 'Demo (public)', '.git', 'demo', 4, '', '', 'CS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGZhbmN5IGRhdGUNCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGZhbmN5RGF0ZSgkZGF0ZSkNCgl7DQoJCWlmICghc2VsZjo6aXNWYWxpZFRpbWVTdGFtcCgkZGF0ZSkpDQoJCXsNCgkJCSRkYXRlID0gc3RydG90aW1lKCRkYXRlKTsNCgkJfQ0KCQlyZXR1cm4gZGF0ZSgnalMgXG9cZiBGIFknLCRkYXRlKTsNCgl9DQoNCgkvKioNCgkgKglDaGFuZ2UgdG8gbmljZSBmYW5jeSB0aW1lIGFuZCBkYXRlDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeURhdGVUaW1lKCR0aW1lKQ0KCXsNCgkJaWYgKCFzZWxmOjppc1ZhbGlkVGltZVN0YW1wKCR0aW1lKSkNCgkJew0KCQkJJHRpbWUgPSBzdHJ0b3RpbWUoJHRpbWUpOw0KCQl9DQoJCXJldHVybiBkYXRlKCcoRzppKSBqUyBcb1xmIEYgWScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoYW5nZSB0byBuaWNlIGhvdXI6bWludXRlcyB0aW1lDQoJICovDQoJcHVibGljIHN0YXRpYyBmdW5jdGlvbiBmYW5jeVRpbWUoJHRpbWUpDQoJew0KCQlpZiAoIXNlbGY6OmlzVmFsaWRUaW1lU3RhbXAoJHRpbWUpKQ0KCQl7DQoJCQkkdGltZSA9IHN0cnRvdGltZSgkdGltZSk7DQoJCX0NCgkJcmV0dXJuIGRhdGUoJ0c6aScsJHRpbWUpOw0KCX0NCg0KCS8qKg0KCSAqCUNoZWNrIGlmIHN0cmluZyBpcyBhIHZhbGlkIHRpbWUgc3RhbXANCgkgKi8NCglwdWJsaWMgc3RhdGljIGZ1bmN0aW9uIGlzVmFsaWRUaW1lU3RhbXAoJHRpbWVzdGFtcCkNCgl7DQoJCXJldHVybiAoKGludCkgJHRpbWVzdGFtcCA9PT0gJHRpbWVzdGFtcCkNCgkJJiYgKCR0aW1lc3RhbXAgPD0gUEhQX0lOVF9NQVgpDQoJCSYmICgkdGltZXN0YW1wID49IH5QSFBfSU5UX01BWCk7DQoJfQ0K', 'CQkvLyBHZXQgQXBwbGljYXRpb24gb2JqZWN0DQoJCSRhcHAgPSBKRmFjdG9yeTo6Z2V0QXBwbGljYXRpb24oKTsNCgkJJGFwcC0+ZW5xdWV1ZU1lc3NhZ2UoJ1RoaXMgaXMgYSBkZW1vIGNvbXBvbmVudCBkZXZlbG9wZWQgaW4gPGEgaHJlZj0iaHR0cDovL3ZkbS5iei9jb21wb25lbnQtYnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+SkNCPC9hPiEgWW91IGNhbiBidWlsZCBtb3JlIGNvbXBvbmVudHMgbGlrZSB0aGlzIHdpdGggSkNCLCBjaGVja291dCBvdXIgcGFnZSBvbiA8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdmRtLWlvL0pvb21sYS1Db21wb25lbnQtQnVpbGRlciIgdGFnZXQ9Il9iYWxuayIgdGl0bGU9Ikpvb21sYSBDb21wb25lbnQgQnVpbGRlciI+Z2l0aHViPC9hPiBmb3IgbW9yZSBpbmZvLiBUaGUgZnV0dXJlIG9mIDxhIGhyZWY9Imh0dHA6Ly92ZG0uYnovY29tcG9uZW50LWJ1aWxkZXIiIHRhZ2V0PSJfYmFsbmsiIHRpdGxlPSJKb29tbGEgQ29tcG9uZW50IEJ1aWxkZXIiPkpvb21sYSBDb21wb25lbnQgRGV2ZWxvcG1lbnQ8L2E+IGlzIEhlcmUhJywgJ0luZm8nKTs=', '', '', '', '', 'Demo Component', '', '', 'https://www.vdm.io/', 1, '2016-10-18 11:44:09', '2020-07-28 02:08:36', '', 3, 'pCJuq1QDgFPzSyKTFTAdwr8vw/PPZ1Sj6pAJrjv7hdQ=', '', 'efde995e-60aa-4b39-b644-44349dfb660d'); -- -- Dumping data for table `#__componentbuilder_admin_view` diff --git a/componentbuilder.xml b/componentbuilder.xml index edf385b64..dfe413a41 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 26th July, 2020 + 28th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 2.11.2 + 2.11.3 Component Builder (v.2.11.2) +

Component Builder (v.2.11.3)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 662e30b2f..8a9b95539 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -956,10 +956,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.11.2 + 2.11.3 http://www.joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.2/JCB_v2.11.2.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.11.3/JCB_v2.11.3.zip stable diff --git a/script.php b/script.php index a235d2fb2..fed12042f 100644 --- a/script.php +++ b/script.php @@ -6591,7 +6591,7 @@ class com_componentbuilderInstallerScript $query = $db->getQuery(true); // Field to update. $fields = array( - $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"»","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), + $db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","subform_layouts":"default","editor":"none","manage_jcb_package_directories":"2","add_menu_prefix":"1","menu_prefix":"»","minify":"0","set_browser_storage":"1","storage_time_to_live":"global","language":"en-GB","percentagelanguageadd":"50","export_language_strings":"1","compiler_field_builder_type":"2","field_name_builder":"1","type_name_builder":"1","development_method":"1","expansion":"0","return_options_build":"2","cronjob_backup_type":"1","cronjob_backup_server":"0","backup_package_name":"JCB_Backup_[YEAR]_[MONTH]_[DAY]","export_license":"GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html","export_copyright":"Copyright (C) 2015. All Rights Reserved","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_load":"1","uikit_min":"","uikit_style":""}'), ); // Condition. $conditions = array( @@ -9213,7 +9213,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.11.2 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.11.3 Was Successful! Let us know if anything is not working as expected.

'; // Set db if not set already. if (!isset($db)) -- 2.40.1 From 3fa87a2cccabd7a5e55ab3cba75b990a4c5c5343 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 8 Aug 2020 15:29:51 +0200 Subject: [PATCH 14/14] Added the SAFEHTML filter to the copyright textarea of the Joomla components. --- README.md | 2 +- admin/README.txt | 2 +- admin/models/forms/joomla_component.xml | 2 +- componentbuilder.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 961f0eae5..5f9bce78a 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ 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*: 28th July, 2020 ++ *Last Build*: 29th July, 2020 + *Version*: 2.11.3 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/README.txt b/admin/README.txt index 961f0eae5..5f9bce78a 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,7 +144,7 @@ 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*: 28th July, 2020 ++ *Last Build*: 29th July, 2020 + *Version*: 2.11.3 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index 638aff063..e70e433a3 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -367,7 +367,7 @@ default="Copyright (C) 2015. All Rights Reserved" description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_DESCRIPTION" class="text_area span12" - filter="HTML" + filter="SAFEHTML" hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COPYRIGHT_HINT" required="true" /> diff --git a/componentbuilder.xml b/componentbuilder.xml index dfe413a41..91e144c4f 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 28th July, 2020 + 29th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com -- 2.40.1