diff --git a/README.md b/README.md index b2184864b..e595bdf49 100644 --- a/README.md +++ b/README.md @@ -146,14 +146,14 @@ 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*: 12th September, 2019 ++ *Last Build*: 11th October, 2019 + *Version*: 2.10.1 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **252364** -+ *Field count*: **1345** -+ *File count*: **1608** -+ *Folder count*: **253** ++ *Line count*: **253705** ++ *Field count*: **1347** ++ *File count*: **1618** ++ *Folder count*: **261** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index b2184864b..e595bdf49 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -146,14 +146,14 @@ 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*: 12th September, 2019 ++ *Last Build*: 11th October, 2019 + *Version*: 2.10.1 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **252364** -+ *Field count*: **1345** -+ *File count*: **1608** -+ *Folder count*: **253** ++ *Line count*: **253705** ++ *Field count*: **1347** ++ *File count*: **1618** ++ *Folder count*: **261** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php index 29a106670..c033a4d38 100644 --- a/admin/compiler/joomla_3/Helper.php +++ b/admin/compiler/joomla_3/Helper.php @@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Language\Language; +use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** @@ -24,6 +26,7 @@ use Joomla\Utilities\ArrayHelper; */ abstract class ###Component###Helper {###ADMIN_GLOBAL_EVENT_HELPER######CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT### + /** * Load the Component xml manifest. **/ diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php index e055e37f4..481df9a10 100644 --- a/admin/compiler/joomla_3/Helper_site.php +++ b/admin/compiler/joomla_3/Helper_site.php @@ -17,6 +17,8 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Language\Language; +use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** @@ -24,7 +26,7 @@ use Joomla\Utilities\ArrayHelper; */ abstract class ###Component###Helper {###SITE_GLOBAL_EVENT_HELPER######SITE_CUSTOM_HELPER_SCRIPT######BOTH_CUSTOM_HELPER_SCRIPT### - + public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name') { // do some table foot work diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 063e97683..7251e734e 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -805,6 +805,8 @@ class Get $this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0); // set the global language $this->langTag = $this->params->get('language', $this->langTag); + // also set the helper calss langTag (for safe string) + // setup the main language array $this->languages[$this->langTag] = array(); // check if we have Tidy enabled @@ -6491,7 +6493,14 @@ class Get } else { - $form[$dynamic_field] = ComponentbuilderHelper::safeString($form[$dynamic_field]); + if ('fields_name' === $dynamic_field && strpos($form[$dynamic_field], '.') !== false) + { + $form[$dynamic_field] = $form[$dynamic_field]; + } + else + { + $form[$dynamic_field] = ComponentbuilderHelper::safeString($form[$dynamic_field]); + } } } // check if field is external form file diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 9c770522b..1473a2fcf 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -537,7 +537,19 @@ class Structure extends Get $xml .= PHP_EOL . '>'; foreach ($fields as $field_name => $fieldsets) { - $xml .= PHP_EOL . $this->_t(1) . ''; + // check if we have an double fields naming set + $field_name_inner = ''; + $field_name_outer = $field_name; + if (strpos($field_name, '.') !== false) + { + $field_names = explode('.', $field_name); + if (count((array) $field_names) == 2) + { + $field_name_outer = $field_names[0]; + $field_name_inner = $field_names[1]; + } + } + $xml .= PHP_EOL . $this->_t(1) . ''; foreach ($fieldsets as $fieldset => $field) { // default to the field set name @@ -559,8 +571,18 @@ class Structure extends Get { $xml .= PHP_EOL . $this->_t(1) . '
'; } + // check if we have an inner field set + if (ComponentbuilderHelper::checkString($field_name_inner)) + { + $xml .= PHP_EOL . $this->_t(1) . ''; + } // add the placeholder of the fields $xml .= $this->hhh . 'FIELDSET_' . $file.$field_name.$fieldset . $this->hhh; + // check if we have an inner field set + if (ComponentbuilderHelper::checkString($field_name_inner)) + { + $xml .= PHP_EOL . $this->_t(1) . ''; + } $xml .= PHP_EOL . $this->_t(1) . '
'; } $xml .= PHP_EOL . $this->_t(1) . '
'; diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 5da41c36f..dca23d201 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -633,29 +633,35 @@ class Fields extends Structure if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) { // metakey - $fieldSet[] = $this->_t(2) . ""; - $fieldSet[] = $this->_t(2) . "_t(3) . 'name="metakey"'; - $fieldSet[] = $this->_t(3) . 'type="textarea"'; - $fieldSet[] = $this->_t(3) . 'label="JFIELD_META_KEYWORDS_LABEL"'; - $fieldSet[] = $this->_t(3) . 'description="JFIELD_META_KEYWORDS_DESC"'; - $fieldSet[] = $this->_t(3) . 'rows="3"'; - $fieldSet[] = $this->_t(3) . 'cols="30"'; - $fieldSet[] = $this->_t(2) . "/>"; - // count the static field created - $this->fieldCount++; + if (!isset($this->fieldsNames[$view_name_single]['metakey'])) + { + $fieldSet[] = $this->_t(2) . ""; + $fieldSet[] = $this->_t(2) . "_t(3) . 'name="metakey"'; + $fieldSet[] = $this->_t(3) . 'type="textarea"'; + $fieldSet[] = $this->_t(3) . 'label="JFIELD_META_KEYWORDS_LABEL"'; + $fieldSet[] = $this->_t(3) . 'description="JFIELD_META_KEYWORDS_DESC"'; + $fieldSet[] = $this->_t(3) . 'rows="3"'; + $fieldSet[] = $this->_t(3) . 'cols="30"'; + $fieldSet[] = $this->_t(2) . "/>"; + // count the static field created + $this->fieldCount++; + } // metadesc - $fieldSet[] = $this->_t(2) . ""; - $fieldSet[] = $this->_t(2) . "_t(3) . 'name="metadesc"'; - $fieldSet[] = $this->_t(3) . 'type="textarea"'; - $fieldSet[] = $this->_t(3) . 'label="JFIELD_META_DESCRIPTION_LABEL"'; - $fieldSet[] = $this->_t(3) . 'description="JFIELD_META_DESCRIPTION_DESC"'; - $fieldSet[] = $this->_t(3) . 'rows="3"'; - $fieldSet[] = $this->_t(3) . 'cols="30"'; - $fieldSet[] = $this->_t(2) . "/>"; - // count the static field created - $this->fieldCount++; + if (!isset($this->fieldsNames[$view_name_single]['metadesc'])) + { + $fieldSet[] = $this->_t(2) . ""; + $fieldSet[] = $this->_t(2) . "_t(3) . 'name="metadesc"'; + $fieldSet[] = $this->_t(3) . 'type="textarea"'; + $fieldSet[] = $this->_t(3) . 'label="JFIELD_META_DESCRIPTION_LABEL"'; + $fieldSet[] = $this->_t(3) . 'description="JFIELD_META_DESCRIPTION_DESC"'; + $fieldSet[] = $this->_t(3) . 'rows="3"'; + $fieldSet[] = $this->_t(3) . 'cols="30"'; + $fieldSet[] = $this->_t(2) . "/>"; + // count the static field created + $this->fieldCount++; + } } // load the dynamic fields now if (ComponentbuilderHelper::checkString($dynamicFields)) @@ -667,43 +673,57 @@ class Fields extends Structure // check if metadata is added to this view if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) { - $fieldSet[] = PHP_EOL . $this->_t(1) . ""; - $fieldSet[] = $this->_t(1) . "'; - $fieldSet[] = $this->_t(2) . '
_t(3) . 'label="JGLOBAL_FIELDSET_METADATA_OPTIONS">'; - // robots - $fieldSet[] = $this->_t(3) . ""; - $fieldSet[] = $this->_t(3) . '_t(4) . 'type="list"'; - $fieldSet[] = $this->_t(4) . 'label="JFIELD_METADATA_ROBOTS_LABEL"'; - $fieldSet[] = $this->_t(4) . 'description="JFIELD_METADATA_ROBOTS_DESC" >'; - $fieldSet[] = $this->_t(4) . ''; - $fieldSet[] = $this->_t(4) . ''; - $fieldSet[] = $this->_t(4) . ''; - $fieldSet[] = $this->_t(4) . ''; - $fieldSet[] = $this->_t(4) . ''; - $fieldSet[] = $this->_t(3) . ''; - // count the static field created - $this->fieldCount++; - // author - $fieldSet[] = $this->_t(3) . ""; - $fieldSet[] = $this->_t(3) . '_t(4) . 'type="text"'; - $fieldSet[] = $this->_t(4) . 'label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"'; - $fieldSet[] = $this->_t(4) . 'size="20"'; - $fieldSet[] = $this->_t(3) . "/>"; - // count the static field created - $this->fieldCount++; - // rights - $fieldSet[] = $this->_t(3) . ""; - $fieldSet[] = $this->_t(3) . '_t(4) . 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"'; - $fieldSet[] = $this->_t(4) . 'cols="30" rows="2"'; - $fieldSet[] = $this->_t(3) . "/>"; - // count the static field created - $this->fieldCount++; - $fieldSet[] = $this->_t(2) . "
"; - $fieldSet[] = $this->_t(1) . "
"; + if (!isset($this->fieldsNames[$view_name_single]['robots']) + || !isset($this->fieldsNames[$view_name_single]['rights']) + || !isset($this->fieldsNames[$view_name_single]['author'])) + { + $fieldSet[] = PHP_EOL . $this->_t(1) . ""; + $fieldSet[] = $this->_t(1) . "'; + $fieldSet[] = $this->_t(2) . '
_t(3) . 'label="JGLOBAL_FIELDSET_METADATA_OPTIONS">'; + // robots + if (!isset($this->fieldsNames[$view_name_single]['robots'])) + { + $fieldSet[] = $this->_t(3) . ""; + $fieldSet[] = $this->_t(3) . '_t(4) . 'type="list"'; + $fieldSet[] = $this->_t(4) . 'label="JFIELD_METADATA_ROBOTS_LABEL"'; + $fieldSet[] = $this->_t(4) . 'description="JFIELD_METADATA_ROBOTS_DESC" >'; + $fieldSet[] = $this->_t(4) . ''; + $fieldSet[] = $this->_t(4) . ''; + $fieldSet[] = $this->_t(4) . ''; + $fieldSet[] = $this->_t(4) . ''; + $fieldSet[] = $this->_t(4) . ''; + $fieldSet[] = $this->_t(3) . ''; + // count the static field created + $this->fieldCount++; + } + // author + if (!isset($this->fieldsNames[$view_name_single]['author'])) + { + $fieldSet[] = $this->_t(3) . ""; + $fieldSet[] = $this->_t(3) . '_t(4) . 'type="text"'; + $fieldSet[] = $this->_t(4) . 'label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"'; + $fieldSet[] = $this->_t(4) . 'size="20"'; + $fieldSet[] = $this->_t(3) . "/>"; + // count the static field created + $this->fieldCount++; + } + // rights + if (!isset($this->fieldsNames[$view_name_single]['rights'])) + { + $fieldSet[] = $this->_t(3) . ""; + $fieldSet[] = $this->_t(3) . '_t(4) . 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"'; + $fieldSet[] = $this->_t(4) . 'cols="30" rows="2"'; + $fieldSet[] = $this->_t(3) . "/>"; + // count the static field created + $this->fieldCount++; + } + $fieldSet[] = $this->_t(2) . "
"; + $fieldSet[] = $this->_t(1) . ""; + } } // retunr the set return implode(PHP_EOL, $fieldSet); @@ -923,28 +943,34 @@ class Fields extends Structure if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) { // metakey - $attributes = array( - 'name' => 'metakey', - 'type' => 'textarea', - 'label' => 'JFIELD_META_KEYWORDS_LABEL', - 'description' => 'JFIELD_META_KEYWORDS_DESC', - 'rows' => 3, - 'cols' => 30 - ); - ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)"); - $fieldXML = $fieldSetXML->addChild('field'); - ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); - // count the static field created - $this->fieldCount++; + if (!isset($this->fieldsNames[$view_name_single]['metakey'])) + { + $attributes = array( + 'name' => 'metakey', + 'type' => 'textarea', + 'label' => 'JFIELD_META_KEYWORDS_LABEL', + 'description' => 'JFIELD_META_KEYWORDS_DESC', + 'rows' => 3, + 'cols' => 30 + ); + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metakey Field. Type: Textarea (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); + // count the static field created + $this->fieldCount++; + } // metadesc - $attributes['name'] = 'metadesc'; - $attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL'; - $attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC'; - ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)"); - $fieldXML = $fieldSetXML->addChild('field'); - ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); - // count the static field created - $this->fieldCount++; + if (!isset($this->fieldsNames[$view_name_single]['metadesc'])) + { + $attributes['name'] = 'metadesc'; + $attributes['label'] = 'JFIELD_META_DESCRIPTION_LABEL'; + $attributes['description'] = 'JFIELD_META_DESCRIPTION_DESC'; + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadesc Field. Type: Textarea (joomla)"); + $fieldXML = $fieldSetXML->addChild('field'); + ComponentbuilderHelper::xmlAddAttributes($fieldXML, $attributes); + // count the static field created + $this->fieldCount++; + } } // load the dynamic fields now if (count((array) $dynamicFieldsXML)) @@ -958,67 +984,81 @@ class Fields extends Structure // check if metadata is added to this view if (isset($this->metadataBuilder[$view_name_single]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view_name_single])) { - ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields"); - $fieldsXML = $fieldSetXML->addChild('fields'); - $fieldsXML->addAttribute('name', 'metadata'); - $fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); - $fieldsFieldSetXML = $fieldsXML->addChild('fieldset'); - $fieldsFieldSetXML->addAttribute('name', 'vdmmetadata'); - $fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); - // robots - ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)"); - $robots = $fieldsFieldSetXML->addChild('field'); - $attributes = array( - 'name' => 'robots', - 'type' => 'list', - 'label' => 'JFIELD_METADATA_ROBOTS_LABEL', - 'description' => 'JFIELD_METADATA_ROBOTS_DESC' - ); - ComponentbuilderHelper::xmlAddAttributes($robots, $attributes); - // count the static field created - $this->fieldCount++; - $options = array( - 'JGLOBAL_USE_GLOBAL' => '', - 'JGLOBAL_INDEX_FOLLOW' => 'index, follow', - 'JGLOBAL_NOINDEX_FOLLOW' => 'noindex, follow', - 'JGLOBAL_INDEX_NOFOLLOW' => 'index, nofollow', - 'JGLOBAL_NOINDEX_NOFOLLOW' => 'noindex, nofollow', - ); - foreach ($options as $text => $value) + if (!isset($this->fieldsNames[$view_name_single]['robots']) + || !isset($this->fieldsNames[$view_name_single]['author']) + || !isset($this->fieldsNames[$view_name_single]['rights'])) { - $option = $robots->addChild('option'); - $option->addAttribute('value', $value); - $option[] = $text; + ComponentbuilderHelper::xmlComment($fieldSetXML, $this->setLine(__LINE__) . " Metadata Fields"); + $fieldsXML = $fieldSetXML->addChild('fields'); + $fieldsXML->addAttribute('name', 'metadata'); + $fieldsXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); + $fieldsFieldSetXML = $fieldsXML->addChild('fieldset'); + $fieldsFieldSetXML->addAttribute('name', 'vdmmetadata'); + $fieldsFieldSetXML->addAttribute('label', 'JGLOBAL_FIELDSET_METADATA_OPTIONS'); + // robots + if (!isset($this->fieldsNames[$view_name_single]['robots'])) + { + ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Robots Field. Type: List (joomla)"); + $robots = $fieldsFieldSetXML->addChild('field'); + $attributes = array( + 'name' => 'robots', + 'type' => 'list', + 'label' => 'JFIELD_METADATA_ROBOTS_LABEL', + 'description' => 'JFIELD_METADATA_ROBOTS_DESC' + ); + ComponentbuilderHelper::xmlAddAttributes($robots, $attributes); + // count the static field created + $this->fieldCount++; + $options = array( + 'JGLOBAL_USE_GLOBAL' => '', + 'JGLOBAL_INDEX_FOLLOW' => 'index, follow', + 'JGLOBAL_NOINDEX_FOLLOW' => 'noindex, follow', + 'JGLOBAL_INDEX_NOFOLLOW' => 'index, nofollow', + 'JGLOBAL_NOINDEX_NOFOLLOW' => 'noindex, nofollow', + ); + foreach ($options as $text => $value) + { + $option = $robots->addChild('option'); + $option->addAttribute('value', $value); + $option[] = $text; + } + } + // author + if (!isset($this->fieldsNames[$view_name_single]['author'])) + { + ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)"); + $author = $fieldsFieldSetXML->addChild('field'); + $attributes = array( + 'name' => 'author', + 'type' => 'text', + 'label' => 'JAUTHOR', + 'description' => 'JFIELD_METADATA_AUTHOR_DESC', + 'size' => 20 + ); + ComponentbuilderHelper::xmlAddAttributes($author, $attributes); + // count the static field created + $this->fieldCount++; + } + // rights + if (!isset($this->fieldsNames[$view_name_single]['rights'])) + { + ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)"); + $rights = $fieldsFieldSetXML->addChild('field'); + $attributes = array( + 'name' => 'rights', + 'type' => 'textarea', + 'label' => 'JFIELD_META_RIGHTS_LABEL', + 'description' => 'JFIELD_META_RIGHTS_DESC', + 'required' => 'false', + 'filter' => 'string', + 'cols' => 30, + 'rows' => 2 + ); + ComponentbuilderHelper::xmlAddAttributes($rights, $attributes); + // count the static field created + $this->fieldCount++; + } } - // author - ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Author Field. Type: Text (joomla)"); - $author = $fieldsFieldSetXML->addChild('field'); - $attributes = array( - 'name' => 'author', - 'type' => 'text', - 'label' => 'JAUTHOR', - 'description' => 'JFIELD_METADATA_AUTHOR_DESC', - 'size' => 20 - ); - ComponentbuilderHelper::xmlAddAttributes($author, $attributes); - // count the static field created - $this->fieldCount++; - // rights - ComponentbuilderHelper::xmlComment($fieldsFieldSetXML, $this->setLine(__LINE__) . " Rights Field. Type: Textarea (joomla)"); - $rights = $fieldsFieldSetXML->addChild('field'); - $attributes = array( - 'name' => 'rights', - 'type' => 'textarea', - 'label' => 'JFIELD_META_RIGHTS_LABEL', - 'description' => 'JFIELD_META_RIGHTS_DESC', - 'required' => 'false', - 'filter' => 'string', - 'cols' => 30, - 'rows' => 2 - ); - ComponentbuilderHelper::xmlAddAttributes($rights, $attributes); - // count the static field created - $this->fieldCount++; } // return the set return $this->xmlPrettyPrint($XML, 'fieldset'); diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 02afb363b..10e762ef8 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -177,7 +177,7 @@ class Interpretation extends Fields * * @var array */ - protected $permissionFields = array(); + public $permissionFields = array(); /** * Custom Admin View List Link @@ -4313,6 +4313,7 @@ class Interpretation extends Fields $setter .= PHP_EOL . $tabV . $this->_t(2) . "if ((!\$HeaderCheck->js_loaded('uikit.min') || \$uikit == 1) && \$uikit != 2 && \$uikit != 3)"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "{"; $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v3/js/uikit'.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; + $setter .= PHP_EOL . $tabV . $this->_t(3) . "\$this->document->addScript(JURI::root(true) .'/media/com_" . $this->componentCodeName . "/uikit-v3/js/uikit-icons'.\$size.'.js', (" . $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . "Helper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');"; $setter .= PHP_EOL . $tabV . $this->_t(2) . "}"; if (2 == $this->uikit) { @@ -6066,6 +6067,19 @@ class Interpretation extends Fields $fixUniqe[] = $this->_t(4) . "}"; $fixUniqe[] = $this->_t(3) . "}"; $fixUniqe[] = $this->_t(2) . "}"; + +// $fixUniqe[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Update alias if still empty at this point"; +// $fixUniqe[] = $this->_t(2) . "if (\$data['" . $alias . "'] == null || empty(\$data['" . $alias . "']))"; +// $fixUniqe[] = $this->_t(2) . "{"; +// $fixUniqe[] = $this->_t(3) . "if (JFactory::getConfig()->get('unicodeslugs') == 1)"; +// $fixUniqe[] = $this->_t(3) . "{"; +// $fixUniqe[] = $this->_t(4) . "\$data['" . $alias . "'] = JFilterOutput::stringURLUnicodeSlug(" . implode(' . " " . ', $titleData) . ");"; +// $fixUniqe[] = $this->_t(3) . "}"; +// $fixUniqe[] = $this->_t(3) . "else"; +// $fixUniqe[] = $this->_t(3) . "{"; +// $fixUniqe[] = $this->_t(4) . "\$data['" . $alias . "'] = JFilterOutput::stringURLSafe(" . implode(' . " " . ', $titleData) . ");"; +// $fixUniqe[] = $this->_t(3) . "}"; +// $fixUniqe[] = $this->_t(2) . "}"; } // handel other uniqe fields $fixUniqe[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Alter the uniqe field for save as copy"; @@ -6385,7 +6399,7 @@ class Interpretation extends Fields $db_ .= PHP_EOL . $this->_t(1) . "`hits` INT(10) unsigned NOT NULL DEFAULT 0,"; } // check if view has access - if (isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view])) + if (isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view]) && !isset($this->fieldsNames[$view]['access'])) { $db_ .= PHP_EOL . $this->_t(1) . "`access` INT(10) unsigned NOT NULL DEFAULT 0,"; } @@ -6397,50 +6411,67 @@ class Interpretation extends Fields // check if metadata is added to this view if (isset($this->metadataBuilder[$view]) && ComponentbuilderHelper::checkString($this->metadataBuilder[$view])) { - $db_ .= PHP_EOL . $this->_t(1) . "`metakey` TEXT NOT NULL,"; - $db_ .= PHP_EOL . $this->_t(1) . "`metadesc` TEXT NOT NULL,"; - $db_ .= PHP_EOL . $this->_t(1) . "`metadata` TEXT NOT NULL,"; + // check if default field was over written + if (!isset($this->fieldsNames[$view]['metakey'])) + { + $db_ .= PHP_EOL . $this->_t(1) . "`metakey` TEXT NOT NULL,"; + } + // check if default field was over written + if (!isset($this->fieldsNames[$view]['metadesc'])) + { + $db_ .= PHP_EOL . $this->_t(1) . "`metadesc` TEXT NOT NULL,"; + } + // check if default field was over written + if (!isset($this->fieldsNames[$view]['metadata'])) + { + $db_ .= PHP_EOL . $this->_t(1) . "`metadata` TEXT NOT NULL,"; + } } + // TODO (we may want this to be dynamicly set) $db_ .= PHP_EOL . $this->_t(1) . "PRIMARY KEY (`id`)"; + // check if a key was set for any of the default fields then we should not set it again + $check_keys_set = array(); if (isset($this->dbUniqueKeys[$view]) && ComponentbuilderHelper::checkArray($this->dbUniqueKeys[$view])) { foreach ($this->dbUniqueKeys[$view] as $nr => $key) { $db_ .= "," . PHP_EOL . $this->_t(1) . "UNIQUE KEY `idx_" . $key . "` (`" . $key . "`)"; + $check_keys_set[$key] = $key; } } - // check if view has access - if (isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view])) - { - $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_access` (`access`)"; - } - // check if default field was over written - if (!isset($this->fieldsNames[$view]['checked_out'])) - { - $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_checkout` (`checked_out`)"; - } - // check if default field was over written - if (!isset($this->fieldsNames[$view]['created_by'])) - { - $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_createdby` (`created_by`)"; - } - // check if default field was over written - if (!isset($this->fieldsNames[$view]['modified_by'])) - { - $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_modifiedby` (`modified_by`)"; - } - // check if default field was over written - if (!isset($this->fieldsNames[$view]['published'])) - { - $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_state` (`published`)"; - } if (isset($this->dbKeys[$view]) && ComponentbuilderHelper::checkArray($this->dbKeys[$view])) { foreach ($this->dbKeys[$view] as $nr => $key) { $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_" . $key . "` (`" . $key . "`)"; + $check_keys_set[$key] = $key; } } + // check if view has access + if (!isset($check_keys_set['access']) && isset($this->accessBuilder[$view]) && ComponentbuilderHelper::checkString($this->accessBuilder[$view])) + { + $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_access` (`access`)"; + } + // check if default field was over written + if (!isset($check_keys_set['checked_out'])) + { + $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_checkout` (`checked_out`)"; + } + // check if default field was over written + if (!isset($check_keys_set['created_by'])) + { + $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_createdby` (`created_by`)"; + } + // check if default field was over written + if (!isset($check_keys_set['modified_by'])) + { + $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_modifiedby` (`modified_by`)"; + } + // check if default field was over written + if (!isset($check_keys_set['published'])) + { + $db_ .= "," . PHP_EOL . $this->_t(1) . "KEY `idx_state` (`published`)"; + } // easy bucket $easy = array(); // get the mysql table settings @@ -11561,17 +11592,31 @@ class Interpretation extends Fields // set component name $component = $this->componentCodeName; // allways load these - $allow = array(); - $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the form."; - $allow[] = $this->_t(2) . "\$form = \$this->loadForm('com_" . $component . "." . $viewName_single . "', '" . $viewName_single . "', \$options);"; - $allow[] = PHP_EOL . $this->_t(2) . "if (empty(\$form))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "return false;"; - $allow[] = $this->_t(2) . "}"; + $getForm = array(); + $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " // check if xpath was set in options"; + $getForm[] = $this->_t(2) . "\$xpath = false;"; + $getForm[] = $this->_t(2) . "if (isset(\$options['xpath']))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$xpath = \$options['xpath'];"; + $getForm[] = $this->_t(3) . "unset(\$options['xpath']);"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " // check if clear form was set in options"; + $getForm[] = $this->_t(2) . "\$clear = false;"; + $getForm[] = $this->_t(2) . "if (isset(\$options['clear']))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$clear = \$options['clear'];"; + $getForm[] = $this->_t(3) . "unset(\$options['clear']);"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Get the form."; + $getForm[] = $this->_t(2) . "\$form = \$this->loadForm('com_" . $component . "." . $viewName_single . "', '" . $viewName_single . "', \$options, \$clear, \$xpath);"; + $getForm[] = PHP_EOL . $this->_t(2) . "if (empty(\$form))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "return false;"; + $getForm[] = $this->_t(2) . "}"; // load license locker if ($this->componentData->add_license && $this->componentData->license_type == 3 && isset($this->fileContentDynamic[$viewName_single][$this->hhh . 'BOOLMETHOD' . $this->hhh])) { - $allow[] = $this->checkStatmentLicenseLocked($this->fileContentDynamic[$viewName_single][$this->hhh . 'BOOLMETHOD' . $this->hhh]); + $getForm[] = $this->checkStatmentLicenseLocked($this->fileContentDynamic[$viewName_single][$this->hhh . 'BOOLMETHOD' . $this->hhh]); } // setup correct core target $coreLoad = false; @@ -11594,152 +11639,152 @@ class Interpretation extends Fields $otherView = $viewName_single; } // setup the category script - $allow[] = PHP_EOL . $this->_t(2) . "\$jinput = JFactory::getApplication()->input;"; - $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The front end calls this model and uses a_id to avoid id clashes so we need to check for that first."; - $allow[] = $this->_t(2) . "if (\$jinput->get('a_id'))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "\$id = \$jinput->get('a_id', 0, 'INT');"; - $allow[] = $this->_t(2) . "}"; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " The back end uses id so we use that the rest of the time and set it to 0 by default."; - $allow[] = $this->_t(2) . "else"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "\$id = \$jinput->get('id', 0, 'INT');"; - $allow[] = $this->_t(2) . "}"; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Determine correct permissions to check."; - $allow[] = $this->_t(2) . "if (\$this->getState('" . $viewName_single . ".id'))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "\$id = \$this->getState('" . $viewName_single . ".id');"; - $allow[] = PHP_EOL . $this->_t(3) . "\$catid = 0;"; - $allow[] = $this->_t(3) . "if (isset(\$this->getItem(\$id)->catid))"; - $allow[] = $this->_t(3) . "{"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " set category id"; - $allow[] = $this->_t(4) . "\$catid = \$this->getItem(\$id)->catid;"; - $allow[] = PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " Existing record. Can only edit in selected categories."; - $allow[] = $this->_t(4) . "\$form->setFieldAttribute('catid', 'action', 'core.edit');"; - $allow[] = PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " Existing record. Can only edit own items in selected categories."; - $allow[] = $this->_t(4) . "\$form->setFieldAttribute('catid', 'action', 'core.edit.own');"; - $allow[] = $this->_t(3) . "}"; - $allow[] = $this->_t(2) . "}"; - $allow[] = $this->_t(2) . "else"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " New record. Can only create in selected categories."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('catid', 'action', 'core.create');"; - $allow[] = $this->_t(2) . "}"; - $allow[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();"; - $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check for existing item."; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit State access controls."; + $getForm[] = PHP_EOL . $this->_t(2) . "\$jinput = JFactory::getApplication()->input;"; + $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The front end calls this model and uses a_id to avoid id clashes so we need to check for that first."; + $getForm[] = $this->_t(2) . "if (\$jinput->get('a_id'))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$id = \$jinput->get('a_id', 0, 'INT');"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " The back end uses id so we use that the rest of the time and set it to 0 by default."; + $getForm[] = $this->_t(2) . "else"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$id = \$jinput->get('id', 0, 'INT');"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Determine correct permissions to check."; + $getForm[] = $this->_t(2) . "if (\$this->getState('" . $viewName_single . ".id'))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$id = \$this->getState('" . $viewName_single . ".id');"; + $getForm[] = PHP_EOL . $this->_t(3) . "\$catid = 0;"; + $getForm[] = $this->_t(3) . "if (isset(\$this->getItem(\$id)->catid))"; + $getForm[] = $this->_t(3) . "{"; + $getForm[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " set category id"; + $getForm[] = $this->_t(4) . "\$catid = \$this->getItem(\$id)->catid;"; + $getForm[] = PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " Existing record. Can only edit in selected categories."; + $getForm[] = $this->_t(4) . "\$form->setFieldAttribute('catid', 'action', 'core.edit');"; + $getForm[] = PHP_EOL . $this->_t(4) . "//" . $this->setLine(__LINE__) . " Existing record. Can only edit own items in selected categories."; + $getForm[] = $this->_t(4) . "\$form->setFieldAttribute('catid', 'action', 'core.edit.own');"; + $getForm[] = $this->_t(3) . "}"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "else"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " New record. Can only create in selected categories."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('catid', 'action', 'core.create');"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();"; + $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check for existing item."; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit State access controls."; // check if the item has permissions. if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder[$core['core.edit.state']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.state']]) && in_array($viewName_single, $this->permissionBuilder[$core['core.edit.state']])) { - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_list . ".category.' . (int) \$catid))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_list . ".category.' . (int) \$catid))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "')))"; } else { - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_list . ".category.' . (int) \$catid))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (isset(\$catid) && \$catid != 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_list . ".category.' . (int) \$catid))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "')))"; } - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'disabled', 'true');"; - $allow[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'filter', 'unset');"; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'filter', 'unset');"; - $allow[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'disabled', 'true');"; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'disabled', 'true');"; + $getForm[] = PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'filter', 'unset');"; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'filter', 'unset');"; + $getForm[] = $this->_t(2) . "}"; } else { - $allow[] = PHP_EOL . $this->_t(2) . "\$jinput = JFactory::getApplication()->input;"; - $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The front end calls this model and uses a_id to avoid id clashes so we need to check for that first."; - $allow[] = $this->_t(2) . "if (\$jinput->get('a_id'))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "\$id = \$jinput->get('a_id', 0, 'INT');"; - $allow[] = $this->_t(2) . "}"; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " The back end uses id so we use that the rest of the time and set it to 0 by default."; - $allow[] = $this->_t(2) . "else"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "\$id = \$jinput->get('id', 0, 'INT');"; - $allow[] = $this->_t(2) . "}"; - $allow[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();"; - $allow[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check for existing item."; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit State access controls."; + $getForm[] = PHP_EOL . $this->_t(2) . "\$jinput = JFactory::getApplication()->input;"; + $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " The front end calls this model and uses a_id to avoid id clashes so we need to check for that first."; + $getForm[] = $this->_t(2) . "if (\$jinput->get('a_id'))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$id = \$jinput->get('a_id', 0, 'INT');"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " The back end uses id so we use that the rest of the time and set it to 0 by default."; + $getForm[] = $this->_t(2) . "else"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "\$id = \$jinput->get('id', 0, 'INT');"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = PHP_EOL . $this->_t(2) . "\$user = JFactory::getUser();"; + $getForm[] = PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check for existing item."; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit State access controls."; // check if the item has permissions. if ($coreLoad && isset($core['core.edit.state']) && isset($this->permissionBuilder[$core['core.edit.state']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.state']]) && in_array($viewName_single, $this->permissionBuilder[$core['core.edit.state']])) { - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.state'] . "', 'com_" . $component . "')))"; } else { - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('core.edit.state', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('core.edit.state', 'com_" . $component . "')))"; } - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'filter', 'unset');"; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'filter', 'unset');"; - $allow[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'disabled', 'true');"; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'disabled', 'true');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('ordering', 'filter', 'unset');"; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('published', 'filter', 'unset');"; + $getForm[] = $this->_t(2) . "}"; } - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " If this is a new item insure the greated by is set."; - $allow[] = $this->_t(2) . "if (0 == \$id)"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set the created_by to this user"; - $allow[] = $this->_t(3) . "\$form->setValue('created_by', null, \$user->id);"; - $allow[] = $this->_t(2) . "}"; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit Creaded By access controls."; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " If this is a new item insure the greated by is set."; + $getForm[] = $this->_t(2) . "if (0 == \$id)"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set the created_by to this user"; + $getForm[] = $this->_t(3) . "\$form->setValue('created_by', null, \$user->id);"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit Creaded By access controls."; // check if the item has permissions. if ($coreLoad && isset($core['core.edit.created_by']) && isset($this->permissionBuilder[$core['core.edit.created_by']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.created_by']]) && in_array($viewName_single, $this->permissionBuilder[$core['core.edit.created_by']])) { - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.created_by'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.created_by'] . "', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.created_by'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.created_by'] . "', 'com_" . $component . "')))"; } else { - $allow[] = $this->_t(2) . "if (!\$user->authorise('core.edit.created_by', 'com_" . $component . "'))"; + $getForm[] = $this->_t(2) . "if (!\$user->authorise('core.edit.created_by', 'com_" . $component . "'))"; } - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('created_by', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('created_by', 'readonly', 'true');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('created_by', 'filter', 'unset');"; - $allow[] = $this->_t(2) . "}"; - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit Creaded Date access controls."; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('created_by', 'disabled', 'true');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('created_by', 'readonly', 'true');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('created_by', 'filter', 'unset');"; + $getForm[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit Creaded Date access controls."; // check if the item has permissions. if ($coreLoad && isset($core['core.edit.created']) && isset($this->permissionBuilder[$core['core.edit.created']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.created']]) && in_array($viewName_single, $this->permissionBuilder[$core['core.edit.created']])) { - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.created'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.created'] . "', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.created'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.created'] . "', 'com_" . $component . "')))"; } else { - $allow[] = $this->_t(2) . "if (!\$user->authorise('core.edit.created', 'com_" . $component . "'))"; + $getForm[] = $this->_t(2) . "if (!\$user->authorise('core.edit.created', 'com_" . $component . "'))"; } - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('created', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('created', 'filter', 'unset');"; - $allow[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('created', 'disabled', 'true');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('created', 'filter', 'unset');"; + $getForm[] = $this->_t(2) . "}"; // check if the item has access permissions. if ($coreLoad && isset($core['core.edit.access']) && isset($this->permissionBuilder[$core['core.edit.access']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$core['core.edit.access']]) && in_array($viewName_single, $this->permissionBuilder[$core['core.edit.access']])) { - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit Access 'access' controls."; - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.access'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.access'] . "', 'com_" . $component . "')))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('access', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('access', 'filter', 'unset');"; - $allow[] = $this->_t(2) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit Access 'access' controls."; + $getForm[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $core['core.edit.access'] . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $getForm[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $core['core.edit.access'] . "', 'com_" . $component . "')))"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('access', 'disabled', 'true');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $getForm[] = $this->_t(3) . "\$form->setFieldAttribute('access', 'filter', 'unset');"; + $getForm[] = $this->_t(2) . "}"; } // handel the fields permissions if (isset($this->permissionFields[$viewName_single]) && ComponentbuilderHelper::checkArray($this->permissionFields[$viewName_single])) @@ -11751,13 +11796,13 @@ class Interpretation extends Fields switch ($permission_option) { case 'edit': - $this->setPermissionEditFields($allow, $viewName_single, $fieldName, $fieldType, $component); + $this->setPermissionEditFields($getForm, $viewName_single, $fieldName, $fieldType, $component); break; case 'access': - $this->setPermissionAccessFields($allow, $viewName_single, $fieldName, $fieldType, $component); + $this->setPermissionAccessFields($getForm, $viewName_single, $fieldName, $fieldType, $component); break; case 'view': - $this->setPermissionViewFields($allow, $viewName_single, $fieldName, $fieldType, $component); + $this->setPermissionViewFields($getForm, $viewName_single, $fieldName, $fieldType, $component); break; case 'edit.own': case 'access.own': @@ -11768,55 +11813,59 @@ class Interpretation extends Fields } } // add the redirect trick to set the field of origin - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load these values if no id is found"; - $allow[] = $this->_t(2) . "if (0 == \$id)"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set redirected view name"; - $allow[] = $this->_t(3) . "\$redirectedView = \$jinput->get('ref', null, 'STRING');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set field name (or fall back to view name)"; - $allow[] = $this->_t(3) . "\$redirectedField = \$jinput->get('field', \$redirectedView, 'STRING');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set redirected view id"; - $allow[] = $this->_t(3) . "\$redirectedId = \$jinput->get('refid', 0, 'INT');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set field id (or fall back to redirected view id)"; - $allow[] = $this->_t(3) . "\$redirectedValue = \$jinput->get('field_id', \$redirectedId, 'INT');"; - $allow[] = $this->_t(3) . "if (0 != \$redirectedValue && \$redirectedField)"; - $allow[] = $this->_t(3) . "{"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Now set the local-redirected field default value"; - $allow[] = $this->_t(4) . "\$form->setValue(\$redirectedField, null, \$redirectedValue);"; - $allow[] = $this->_t(3) . "}"; + $getForm[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Only load these values if no id is found"; + $getForm[] = $this->_t(2) . "if (0 == \$id)"; + $getForm[] = $this->_t(2) . "{"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set redirected view name"; + $getForm[] = $this->_t(3) . "\$redirectedView = \$jinput->get('ref', null, 'STRING');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set field name (or fall back to view name)"; + $getForm[] = $this->_t(3) . "\$redirectedField = \$jinput->get('field', \$redirectedView, 'STRING');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set redirected view id"; + $getForm[] = $this->_t(3) . "\$redirectedId = \$jinput->get('refid', 0, 'INT');"; + $getForm[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set field id (or fall back to redirected view id)"; + $getForm[] = $this->_t(3) . "\$redirectedValue = \$jinput->get('field_id', \$redirectedId, 'INT');"; + $getForm[] = $this->_t(3) . "if (0 != \$redirectedValue && \$redirectedField)"; + $getForm[] = $this->_t(3) . "{"; + $getForm[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Now set the local-redirected field default value"; + $getForm[] = $this->_t(4) . "\$form->setValue(\$redirectedField, null, \$redirectedValue);"; + $getForm[] = $this->_t(3) . "}"; // load custom script if found - $allow[] = $this->_t(2) . "}" . $this->getCustomScriptBuilder('php_getform', $viewName_single, PHP_EOL); + $getForm[] = $this->_t(2) . "}" . $this->getCustomScriptBuilder('php_getform', $viewName_single, PHP_EOL); // setup the default script - $allow[] = $this->_t(2) . "return \$form;"; + $getForm[] = $this->_t(2) . "return \$form;"; - return implode(PHP_EOL, $allow); + return implode(PHP_EOL, $getForm); } protected function setPermissionEditFields(&$allow, $viewName_single, $fieldName, $fieldType, $component) { - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit " . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $viewName_single . ".edit." . $fieldName . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $viewName_single . ".edit." . $fieldName . "', 'com_" . $component . "')))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'disabled', 'true');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'readonly', 'true');"; - if ('radio' === $fieldType || 'repeatable' === $fieldType) + // only for fields that can be edited + if (!ComponentbuilderHelper::fieldCheck($fieldType, 'spacer')) { - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable radio button for display."; - $allow[] = $this->_t(3) . "\$class = \$form->getFieldAttribute('" . $fieldName . "', 'class', '');"; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'class', \$class.' disabled no-click');"; + $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on Edit " . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; + $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $viewName_single . ".edit." . $fieldName . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $viewName_single . ".edit." . $fieldName . "', 'com_" . $component . "')))"; + $allow[] = $this->_t(2) . "{"; + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'disabled', 'true');"; + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields for display."; + $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'readonly', 'true');"; + if ('radio' === $fieldType || 'repeatable' === $fieldType) + { + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable radio button for display."; + $allow[] = $this->_t(3) . "\$class = \$form->getFieldAttribute('" . $fieldName . "', 'class', '');"; + $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'class', \$class.' disabled no-click');"; + } + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " If there is no value continue."; + $allow[] = $this->_t(3) . "if (!\$form->getValue('" . $fieldName . "'))"; + $allow[] = $this->_t(3) . "{"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'filter', 'unset');"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'required', 'false');"; + $allow[] = $this->_t(3) . "}"; + $allow[] = $this->_t(2) . "}"; } - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " If there is no value continue."; - $allow[] = $this->_t(3) . "if (!\$form->getValue('" . $fieldName . "'))"; - $allow[] = $this->_t(3) . "{"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'filter', 'unset');"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'required', 'false');"; - $allow[] = $this->_t(3) . "}"; - $allow[] = $this->_t(2) . "}"; } protected function setPermissionAccessFields(&$allow, $viewName_single, $fieldName, $fieldType, $component) @@ -11832,30 +11881,43 @@ class Interpretation extends Fields protected function setPermissionViewFields(&$allow, $viewName_single, $fieldName, $fieldType, $component) { - $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on View " . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; - $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $viewName_single . ".view." . $fieldName . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; - $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $viewName_single . ".view." . $fieldName . "', 'com_" . $component . "')))"; - $allow[] = $this->_t(2) . "{"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Make the field hidded."; - $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'type', 'hidden');"; - $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " If there is no value continue."; - $allow[] = $this->_t(3) . "if (!(\$val = \$form->getValue('" . $fieldName . "')))"; - $allow[] = $this->_t(3) . "{"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'filter', 'unset');"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; - $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'required', 'false');"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Make sure"; - $allow[] = $this->_t(4) . "\$form->setValue('" . $fieldName . "', null, '');"; - $allow[] = $this->_t(3) . "}"; - $allow[] = $this->_t(3) . "elseif (" . ucfirst($component) . "Helper::checkArray(\$val))"; - $allow[] = $this->_t(3) . "{"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " We have to unset then (TODO)"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Hiddend field can not handel array value"; - $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Even if we convert to json we get an error"; - $allow[] = $this->_t(4) . "\$form->removeField('" . $fieldName . "');"; - $allow[] = $this->_t(3) . "}"; - $allow[] = $this->_t(2) . "}"; + if (ComponentbuilderHelper::fieldCheck($fieldType, 'spacer')) + { + $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on View " . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; + $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $viewName_single . ".view." . $fieldName . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $viewName_single . ".view." . $fieldName . "', 'com_" . $component . "')))"; + $allow[] = $this->_t(2) . "{"; + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Remove the field"; + $allow[] = $this->_t(3) . "\$form->removeField('" . $fieldName . "');"; + $allow[] = $this->_t(2) . "}"; + } + else + { + $allow[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Modify the form based on View " . ComponentbuilderHelper::safeString($fieldName, 'W') . " access controls."; + $allow[] = $this->_t(2) . "if (\$id != 0 && (!\$user->authorise('" . $viewName_single . ".view." . $fieldName . "', 'com_" . $component . "." . $viewName_single . ".' . (int) \$id))"; + $allow[] = $this->_t(3) . "|| (\$id == 0 && !\$user->authorise('" . $viewName_single . ".view." . $fieldName . "', 'com_" . $component . "')))"; + $allow[] = $this->_t(2) . "{"; + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Make the field hidded."; + $allow[] = $this->_t(3) . "\$form->setFieldAttribute('" . $fieldName . "', 'type', 'hidden');"; + $allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " If there is no value continue."; + $allow[] = $this->_t(3) . "if (!(\$val = \$form->getValue('" . $fieldName . "')))"; + $allow[] = $this->_t(3) . "{"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'filter', 'unset');"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Disable fields while saving."; + $allow[] = $this->_t(4) . "\$form->setFieldAttribute('" . $fieldName . "', 'required', 'false');"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Make sure"; + $allow[] = $this->_t(4) . "\$form->setValue('" . $fieldName . "', null, '');"; + $allow[] = $this->_t(3) . "}"; + $allow[] = $this->_t(3) . "elseif (" . ucfirst($component) . "Helper::checkArray(\$val))"; + $allow[] = $this->_t(3) . "{"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " We have to unset then (TODO)"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Hiddend field can not handel array value"; + $allow[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " Even if we convert to json we get an error"; + $allow[] = $this->_t(4) . "\$form->removeField('" . $fieldName . "');"; + $allow[] = $this->_t(3) . "}"; + $allow[] = $this->_t(2) . "}"; + } } public function setJmodelAdminAllowEdit($viewName_single, $viewName_list) @@ -13796,9 +13858,9 @@ class Interpretation extends Fields { if (!isset($this->customAdminAdded[$menu['settings']->code])) { - if ($custom = $this->setCustomAdminSubMenu($view, $codeName, $lang, $nr, $menu, 'customView')) + if (($_custom = $this->setCustomAdminSubMenu($view, $codeName, $lang, $nr, $menu, 'customView')) !== false) { - break; + $custom .= $_custom; } } } @@ -13807,10 +13869,9 @@ class Interpretation extends Fields { foreach ($this->componentData->custommenus as $nr => $menu) { - if ($custom2 = $this->setCustomAdminSubMenu($view, $codeName, $lang, $nr, $menu, 'customMenu')) + if (($_custom = $this->setCustomAdminSubMenu($view, $codeName, $lang, $nr, $menu, 'customMenu')) !== false) { - $custom = $custom . $custom2; - break; + $custom .= $_custom; } } } @@ -13833,7 +13894,6 @@ class Interpretation extends Fields $nameList = $menu['settings']->code; $nameUpper = $menu['settings']->CODE; } - if (isset($menu['submenu']) && $menu['submenu'] == 1 && $view['adminview'] == $menu['before']) { // setup access defaults diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 9c616de36..4b538bd92 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Language\Language; +use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** @@ -5390,6 +5392,7 @@ abstract class ComponentbuilderHelper && ($timestamp >= ~PHP_INT_MAX); } + /** * Load the Component xml manifest. **/ diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index f346c157b..1eea73738 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -189,11 +189,7 @@ COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_DESC="The date this Admin Cu COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_LABEL="Created Date" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT="Editing the Admin Custom Tabs" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ERROR_UNIQUE_ALIAS="Another Admin Custom Tabs has the same alias." -COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT="// Add the tab HTML here. -// To access php values MethodName->value; ?> -// Note the convention, if in the PHP area above you added a method called getMethodName() -// Then [MethodName] becomes a class variable called $this->MethodName -// Which will hold the value/s your method returned." +COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT="// Add the tab HTML here. To access php values methodname->value; ?>" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_LABEL="HTML" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ID="Id" COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_DESC="The last user that modified this Admin Custom Tabs." @@ -2816,9 +2812,9 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_HINT="Header Here" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_LABEL="Header" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HEADER_MESSAGE="Error! Please add header here." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_HINT="// Add the tab HTML here. -// To access php values MethodName->value; ?> +// To access php values methodname->value; ?> // Note the convention, if in the PHP area above you added a method called getMethodName() -// Then [MethodName] becomes a class variable called $this->MethodName +// Then [MethodName] becomes a class variable called $this->methodname // Which will hold the value/s your method returned." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_HTML_LABEL="HTML" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ID="Id" diff --git a/admin/models/admin_custom_tabs.php b/admin/models/admin_custom_tabs.php index 28d206821..f62c14050 100644 --- a/admin/models/admin_custom_tabs.php +++ b/admin/models/admin_custom_tabs.php @@ -130,8 +130,23 @@ class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.admin_custom_tabs', 'admin_custom_tabs', $options); + $form = $this->loadForm('com_componentbuilder.admin_custom_tabs', 'admin_custom_tabs', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php index c0647e9d1..aeb2d2b6d 100644 --- a/admin/models/admin_fields.php +++ b/admin/models/admin_fields.php @@ -151,8 +151,23 @@ class ComponentbuilderModelAdmin_fields extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.admin_fields', 'admin_fields', $options); + $form = $this->loadForm('com_componentbuilder.admin_fields', 'admin_fields', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php index d8ae43fe2..634642883 100644 --- a/admin/models/admin_fields_conditions.php +++ b/admin/models/admin_fields_conditions.php @@ -151,8 +151,23 @@ class ComponentbuilderModelAdmin_fields_conditions extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.admin_fields_conditions', 'admin_fields_conditions', $options); + $form = $this->loadForm('com_componentbuilder.admin_fields_conditions', 'admin_fields_conditions', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/admin_fields_relations.php b/admin/models/admin_fields_relations.php index c8a4b3b05..e947914a7 100644 --- a/admin/models/admin_fields_relations.php +++ b/admin/models/admin_fields_relations.php @@ -162,8 +162,23 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.admin_fields_relations', 'admin_fields_relations', $options); + $form = $this->loadForm('com_componentbuilder.admin_fields_relations', 'admin_fields_relations', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 397995d35..c3f72c724 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -643,8 +643,23 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.admin_view', 'admin_view', $options); + $form = $this->loadForm('com_componentbuilder.admin_view', 'admin_view', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 60c431d05..ed533d102 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -2381,7 +2381,7 @@ class ComponentbuilderModelAjax extends JModelList // #__componentbuilder_dynamic_get (k) 'dynamic_get' => array( 'search' => array('id', 'name', 'php_before_getitem', 'php_after_getitem', 'php_before_getitems', 'php_after_getitems', - 'php_getlistquery'), + 'php_getlistquery', 'php_calculation'), 'views' => 'dynamic_gets', 'not_base64' => array(), 'name' => 'name' diff --git a/admin/models/class_extends.php b/admin/models/class_extends.php index 87bfe0110..804cd34d8 100644 --- a/admin/models/class_extends.php +++ b/admin/models/class_extends.php @@ -176,8 +176,23 @@ class ComponentbuilderModelClass_extends extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.class_extends', 'class_extends', $options); + $form = $this->loadForm('com_componentbuilder.class_extends', 'class_extends', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/class_method.php b/admin/models/class_method.php index 4b0e11468..c54a78a99 100644 --- a/admin/models/class_method.php +++ b/admin/models/class_method.php @@ -185,8 +185,23 @@ class ComponentbuilderModelClass_method extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.class_method', 'class_method', $options); + $form = $this->loadForm('com_componentbuilder.class_method', 'class_method', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/class_property.php b/admin/models/class_property.php index e723628fb..9642f1768 100644 --- a/admin/models/class_property.php +++ b/admin/models/class_property.php @@ -176,8 +176,23 @@ class ComponentbuilderModelClass_property extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.class_property', 'class_property', $options); + $form = $this->loadForm('com_componentbuilder.class_property', 'class_property', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_admin_views.php b/admin/models/component_admin_views.php index 87cd48e18..e6bea6189 100644 --- a/admin/models/component_admin_views.php +++ b/admin/models/component_admin_views.php @@ -162,8 +162,23 @@ class ComponentbuilderModelComponent_admin_views extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_admin_views', 'component_admin_views', $options); + $form = $this->loadForm('com_componentbuilder.component_admin_views', 'component_admin_views', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_config.php b/admin/models/component_config.php index d51bd02b5..dd2bae7f3 100644 --- a/admin/models/component_config.php +++ b/admin/models/component_config.php @@ -161,8 +161,23 @@ class ComponentbuilderModelComponent_config extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_config', 'component_config', $options); + $form = $this->loadForm('com_componentbuilder.component_config', 'component_config', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_custom_admin_menus.php b/admin/models/component_custom_admin_menus.php index 735f98485..ebcd866e3 100644 --- a/admin/models/component_custom_admin_menus.php +++ b/admin/models/component_custom_admin_menus.php @@ -161,8 +161,23 @@ class ComponentbuilderModelComponent_custom_admin_menus extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_custom_admin_menus', 'component_custom_admin_menus', $options); + $form = $this->loadForm('com_componentbuilder.component_custom_admin_menus', 'component_custom_admin_menus', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_custom_admin_views.php b/admin/models/component_custom_admin_views.php index e8700e541..a40086b03 100644 --- a/admin/models/component_custom_admin_views.php +++ b/admin/models/component_custom_admin_views.php @@ -162,8 +162,23 @@ class ComponentbuilderModelComponent_custom_admin_views extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_custom_admin_views', 'component_custom_admin_views', $options); + $form = $this->loadForm('com_componentbuilder.component_custom_admin_views', 'component_custom_admin_views', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php index 691091f0b..855bba7d6 100644 --- a/admin/models/component_dashboard.php +++ b/admin/models/component_dashboard.php @@ -128,7 +128,7 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin $id = $item->id; } // set the id and view name to session - if ($vdm = ComponentbuilderHelper::get('components_dashboard__'.$id)) + if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id)) { $this->vastDevMod = $vdm; } @@ -136,8 +136,8 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin { // set the vast development method key $this->vastDevMod = ComponentbuilderHelper::randomkey(50); - ComponentbuilderHelper::set($this->vastDevMod, 'components_dashboard__'.$id); - ComponentbuilderHelper::set('components_dashboard__'.$id, $this->vastDevMod); + ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id); + ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod); // set a return value if found $jinput = JFactory::getApplication()->input; $return = $jinput->get('return', null, 'base64'); @@ -199,8 +199,23 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_dashboard', 'component_dashboard', $options); + $form = $this->loadForm('com_componentbuilder.component_dashboard', 'component_dashboard', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php index a0781b791..bd79e5f91 100644 --- a/admin/models/component_files_folders.php +++ b/admin/models/component_files_folders.php @@ -198,8 +198,23 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_files_folders', 'component_files_folders', $options); + $form = $this->loadForm('com_componentbuilder.component_files_folders', 'component_files_folders', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_mysql_tweaks.php b/admin/models/component_mysql_tweaks.php index 6f2940d95..4737b58da 100644 --- a/admin/models/component_mysql_tweaks.php +++ b/admin/models/component_mysql_tweaks.php @@ -161,8 +161,23 @@ class ComponentbuilderModelComponent_mysql_tweaks extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_mysql_tweaks', 'component_mysql_tweaks', $options); + $form = $this->loadForm('com_componentbuilder.component_mysql_tweaks', 'component_mysql_tweaks', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_placeholders.php b/admin/models/component_placeholders.php index 66ef2998b..14d621ad4 100644 --- a/admin/models/component_placeholders.php +++ b/admin/models/component_placeholders.php @@ -130,8 +130,23 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_placeholders', 'component_placeholders', $options); + $form = $this->loadForm('com_componentbuilder.component_placeholders', 'component_placeholders', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_plugins.php b/admin/models/component_plugins.php index bb470b131..54e29f388 100644 --- a/admin/models/component_plugins.php +++ b/admin/models/component_plugins.php @@ -131,8 +131,23 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_plugins', 'component_plugins', $options); + $form = $this->loadForm('com_componentbuilder.component_plugins', 'component_plugins', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_site_views.php b/admin/models/component_site_views.php index cbee6cb86..75c415832 100644 --- a/admin/models/component_site_views.php +++ b/admin/models/component_site_views.php @@ -162,8 +162,23 @@ class ComponentbuilderModelComponent_site_views extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_site_views', 'component_site_views', $options); + $form = $this->loadForm('com_componentbuilder.component_site_views', 'component_site_views', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/component_updates.php b/admin/models/component_updates.php index e48692dac..bb03d4e98 100644 --- a/admin/models/component_updates.php +++ b/admin/models/component_updates.php @@ -161,8 +161,23 @@ class ComponentbuilderModelComponent_updates extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.component_updates', 'component_updates', $options); + $form = $this->loadForm('com_componentbuilder.component_updates', 'component_updates', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index c8eae8d62..ac93605d3 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -547,18 +547,19 @@ class ComponentbuilderModelComponentbuilder extends JModelList jsonp: "callback" }); } - // nice little dot trick :) - jQuery(document).ready( function($) { - var x=0; - setInterval(function() { - var dots = ""; - x++; - for (var y=0; y < x%8; y++) { - dots+="."; - } - $(".loading-dots").text(dots); - } , 500); - });'); + +// nice little dot trick :) +jQuery(document).ready( function($) { + var x=0; + setInterval(function() { + var dots = ""; + x++; + for (var y=0; y < x%8; y++) { + dots+="."; + } + $(".loading-dots").text(dots); + } , 500); +});'); return '
'.JText::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING').'..
'; } diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index 27feae8e4..e19b76c45 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -351,8 +351,23 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.custom_admin_view', 'custom_admin_view', $options); + $form = $this->loadForm('com_componentbuilder.custom_admin_view', 'custom_admin_view', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 9d43b8aa1..cc36476c2 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -185,8 +185,23 @@ class ComponentbuilderModelCustom_code extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.custom_code', 'custom_code', $options); + $form = $this->loadForm('com_componentbuilder.custom_code', 'custom_code', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index bfd62a426..cd48b4f0d 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -365,8 +365,23 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.dynamic_get', 'dynamic_get', $options); + $form = $this->loadForm('com_componentbuilder.dynamic_get', 'dynamic_get', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/field.php b/admin/models/field.php index a088bc29f..0ff0cac4e 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -235,8 +235,23 @@ class ComponentbuilderModelField extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.field', 'field', $options); + $form = $this->loadForm('com_componentbuilder.field', 'field', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index d3d3d639c..50f604c26 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -405,8 +405,23 @@ class ComponentbuilderModelFieldtype extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.fieldtype', 'fieldtype', $options); + $form = $this->loadForm('com_componentbuilder.fieldtype', 'fieldtype', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index 8cabf38ab..b3ea5a3e2 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -1487,12 +1487,6 @@ - - diff --git a/admin/models/help_document.php b/admin/models/help_document.php index ae716ab1e..e7a4bf2c9 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -144,8 +144,23 @@ class ComponentbuilderModelHelp_document extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.help_document', 'help_document', $options); + $form = $this->loadForm('com_componentbuilder.help_document', 'help_document', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php index bb41bc50e..ebe7cbe2b 100644 --- a/admin/models/import_joomla_components.php +++ b/admin/models/import_joomla_components.php @@ -1045,7 +1045,6 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy $this->app->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_FILE_BSB_WAS_SUCCESSFULLY_UNLOCKED', $file), 'success'); } } - } } diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index f51d5c1bb..3f88112b8 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -506,8 +506,23 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.joomla_component', 'joomla_component', $options); + $form = $this->loadForm('com_componentbuilder.joomla_component', 'joomla_component', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index a95baab09..15d81c55b 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -1845,7 +1845,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // #__componentbuilder_dynamic_get (k) 'dynamic_get' => array( 'search' => array('id', 'name', 'php_before_getitem', 'php_after_getitem', 'php_before_getitems', 'php_after_getitems', - 'php_getlistquery'), + 'php_getlistquery', 'php_calculation'), 'views' => 'dynamic_gets', 'not_base64' => array(), 'name' => 'name' diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 8e7cd9f25..1d025f130 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -322,8 +322,23 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.joomla_plugin', 'joomla_plugin', $options); + $form = $this->loadForm('com_componentbuilder.joomla_plugin', 'joomla_plugin', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/joomla_plugin_files_folders_urls.php b/admin/models/joomla_plugin_files_folders_urls.php index 94cdd1dc6..650ef565d 100644 --- a/admin/models/joomla_plugin_files_folders_urls.php +++ b/admin/models/joomla_plugin_files_folders_urls.php @@ -176,8 +176,23 @@ class ComponentbuilderModelJoomla_plugin_files_folders_urls extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.joomla_plugin_files_folders_urls', 'joomla_plugin_files_folders_urls', $options); + $form = $this->loadForm('com_componentbuilder.joomla_plugin_files_folders_urls', 'joomla_plugin_files_folders_urls', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/joomla_plugin_group.php b/admin/models/joomla_plugin_group.php index 2cae910e6..ca98f5304 100644 --- a/admin/models/joomla_plugin_group.php +++ b/admin/models/joomla_plugin_group.php @@ -122,8 +122,23 @@ class ComponentbuilderModelJoomla_plugin_group extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.joomla_plugin_group', 'joomla_plugin_group', $options); + $form = $this->loadForm('com_componentbuilder.joomla_plugin_group', 'joomla_plugin_group', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/joomla_plugin_updates.php b/admin/models/joomla_plugin_updates.php index dd64fc9b8..a5f7be6af 100644 --- a/admin/models/joomla_plugin_updates.php +++ b/admin/models/joomla_plugin_updates.php @@ -130,8 +130,23 @@ class ComponentbuilderModelJoomla_plugin_updates extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.joomla_plugin_updates', 'joomla_plugin_updates', $options); + $form = $this->loadForm('com_componentbuilder.joomla_plugin_updates', 'joomla_plugin_updates', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/language.php b/admin/models/language.php index f82a18647..4b1f3e205 100644 --- a/admin/models/language.php +++ b/admin/models/language.php @@ -122,8 +122,23 @@ class ComponentbuilderModelLanguage extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.language', 'language', $options); + $form = $this->loadForm('com_componentbuilder.language', 'language', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/language_translation.php b/admin/models/language_translation.php index 986b72386..5d71122fb 100644 --- a/admin/models/language_translation.php +++ b/admin/models/language_translation.php @@ -166,8 +166,23 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.language_translation', 'language_translation', $options); + $form = $this->loadForm('com_componentbuilder.language_translation', 'language_translation', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/layout.php b/admin/models/layout.php index b4da56b89..2f8fb6bb6 100644 --- a/admin/models/layout.php +++ b/admin/models/layout.php @@ -203,8 +203,23 @@ class ComponentbuilderModelLayout extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.layout', 'layout', $options); + $form = $this->loadForm('com_componentbuilder.layout', 'layout', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/library.php b/admin/models/library.php index 7b5972dd4..0aee440a8 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -218,8 +218,23 @@ class ComponentbuilderModelLibrary extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.library', 'library', $options); + $form = $this->loadForm('com_componentbuilder.library', 'library', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/library_config.php b/admin/models/library_config.php index 9f4293ca5..54fcae18b 100644 --- a/admin/models/library_config.php +++ b/admin/models/library_config.php @@ -130,8 +130,23 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.library_config', 'library_config', $options); + $form = $this->loadForm('com_componentbuilder.library_config', 'library_config', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/library_files_folders_urls.php b/admin/models/library_files_folders_urls.php index 77956996f..98aa86bfc 100644 --- a/admin/models/library_files_folders_urls.php +++ b/admin/models/library_files_folders_urls.php @@ -176,8 +176,23 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.library_files_folders_urls', 'library_files_folders_urls', $options); + $form = $this->loadForm('com_componentbuilder.library_files_folders_urls', 'library_files_folders_urls', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/placeholder.php b/admin/models/placeholder.php index 45a5f5d4e..f2ee9f5e9 100644 --- a/admin/models/placeholder.php +++ b/admin/models/placeholder.php @@ -169,8 +169,23 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.placeholder', 'placeholder', $options); + $form = $this->loadForm('com_componentbuilder.placeholder', 'placeholder', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/server.php b/admin/models/server.php index 3d77e820b..1448757d6 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -284,8 +284,23 @@ class ComponentbuilderModelServer extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.server', 'server', $options); + $form = $this->loadForm('com_componentbuilder.server', 'server', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/site_view.php b/admin/models/site_view.php index 388096aa7..08853c59d 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -372,8 +372,23 @@ class ComponentbuilderModelSite_view extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.site_view', 'site_view', $options); + $form = $this->loadForm('com_componentbuilder.site_view', 'site_view', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/snippet.php b/admin/models/snippet.php index e01add57a..bbba4036d 100644 --- a/admin/models/snippet.php +++ b/admin/models/snippet.php @@ -149,8 +149,23 @@ class ComponentbuilderModelSnippet extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.snippet', 'snippet', $options); + $form = $this->loadForm('com_componentbuilder.snippet', 'snippet', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/snippet_type.php b/admin/models/snippet_type.php index 43f5da38e..d16968493 100644 --- a/admin/models/snippet_type.php +++ b/admin/models/snippet_type.php @@ -122,8 +122,23 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.snippet_type', 'snippet_type', $options); + $form = $this->loadForm('com_componentbuilder.snippet_type', 'snippet_type', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/template.php b/admin/models/template.php index 55ef8ec4b..4681f4d63 100644 --- a/admin/models/template.php +++ b/admin/models/template.php @@ -203,8 +203,23 @@ class ComponentbuilderModelTemplate extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.template', 'template', $options); + $form = $this->loadForm('com_componentbuilder.template', 'template', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/models/validation_rule.php b/admin/models/validation_rule.php index 32235de6b..863789bae 100644 --- a/admin/models/validation_rule.php +++ b/admin/models/validation_rule.php @@ -172,8 +172,23 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin { // set load data option $options['load_data'] = $loadData; + // // check if xpath was set in options + $xpath = false; + if (isset($options['xpath'])) + { + $xpath = $options['xpath']; + unset($options['xpath']); + } + // // check if clear form was set in options + $clear = false; + if (isset($options['clear'])) + { + $clear = $options['clear']; + unset($options['clear']); + } + // Get the form. - $form = $this->loadForm('com_componentbuilder.validation_rule', 'validation_rule', $options); + $form = $this->loadForm('com_componentbuilder.validation_rule', 'validation_rule', $options, $clear, $xpath); if (empty($form)) { diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index ca42bb5c9..936e2f242 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -100,11 +100,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( `metadesc` TEXT NOT NULL, `metadata` TEXT NOT NULL, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_system_name` (`system_name`), KEY `idx_name_code` (`name_code`), KEY `idx_debug_linenr` (`debug_linenr`), @@ -138,7 +133,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( KEY `idx_add_sales_server` (`add_sales_server`), KEY `idx_translation_tool` (`translation_tool`), KEY `idx_creatuserhelper` (`creatuserhelper`), - KEY `idx_adduikit` (`adduikit`) + KEY `idx_adduikit` (`adduikit`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( @@ -195,11 +195,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_system_name` (`system_name`), KEY `idx_class_extends` (`class_extends`), KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), @@ -216,7 +211,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin` ( KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_update_server_target` (`update_server_target`), KEY `idx_add_php_preflight_uninstall` (`add_php_preflight_uninstall`), - KEY `idx_name` (`name`) + KEY `idx_name` (`name`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( @@ -325,11 +325,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_name_single` (`name_single`), KEY `idx_add_php_before_cancel` (`add_php_before_cancel`), KEY `idx_add_php_allowadd` (`add_php_allowadd`), @@ -367,7 +362,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( KEY `idx_source` (`source`), KEY `idx_add_php_getitem` (`add_php_getitem`), KEY `idx_add_php_getitems` (`add_php_getitems`), - KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`) + KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( @@ -422,11 +422,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_name` (`name`), KEY `idx_main_get` (`main_get`), KEY `idx_add_css_document` (`add_css_document`), @@ -441,7 +436,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_admin_view` ( KEY `idx_add_php_view` (`add_php_view`), KEY `idx_add_custom_button` (`add_custom_button`), KEY `idx_add_php_jview_display` (`add_php_jview_display`), - KEY `idx_add_php_jview` (`add_php_jview`) + KEY `idx_add_php_jview` (`add_php_jview`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( @@ -496,11 +496,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_name` (`name`), KEY `idx_main_get` (`main_get`), KEY `idx_add_css_document` (`add_css_document`), @@ -516,7 +511,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_site_view` ( KEY `idx_add_php_view` (`add_php_view`), KEY `idx_button_position` (`button_position`), KEY `idx_add_php_jview_display` (`add_php_jview_display`), - KEY `idx_add_php_jview` (`add_php_jview`) + KEY `idx_add_php_jview` (`add_php_jview`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_template` ( @@ -544,15 +544,15 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_template` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_dynamic_get` (`dynamic_get`), + KEY `idx_add_php_view` (`add_php_view`), + KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_dynamic_get` (`dynamic_get`), - KEY `idx_add_php_view` (`add_php_view`), - KEY `idx_alias` (`alias`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_layout` ( @@ -580,15 +580,15 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_layout` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_dynamic_get` (`dynamic_get`), + KEY `idx_add_php_view` (`add_php_view`), + KEY `idx_alias` (`alias`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_dynamic_get` (`dynamic_get`), - KEY `idx_add_php_view` (`add_php_view`), - KEY `idx_alias` (`alias`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_dynamic_get` ( @@ -641,11 +641,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_dynamic_get` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_name` (`name`), KEY `idx_main_source` (`main_source`), KEY `idx_gettype` (`gettype`), @@ -657,7 +652,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_dynamic_get` ( KEY `idx_add_php_getlistquery` (`add_php_getlistquery`), KEY `idx_select_all` (`select_all`), KEY `idx_getcustom` (`getcustom`), - KEY `idx_pagination` (`pagination`) + KEY `idx_pagination` (`pagination`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_code` ( @@ -689,17 +689,17 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_custom_code` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_component` (`component`), KEY `idx_target` (`target`), KEY `idx_type` (`type`), KEY `idx_function_name` (`function_name`), KEY `idx_to_line` (`to_line`), - KEY `idx_from_line` (`from_line`) + KEY `idx_from_line` (`from_line`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_property` ( @@ -724,14 +724,14 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_property` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_visibility` (`visibility`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_visibility` (`visibility`), - KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_method` ( @@ -757,14 +757,14 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_method` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_visibility` (`visibility`), + KEY `idx_joomla_plugin_group` (`joomla_plugin_group`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_visibility` (`visibility`), - KEY `idx_joomla_plugin_group` (`joomla_plugin_group`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_placeholder` ( @@ -785,12 +785,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_placeholder` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_target` (`target`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_target` (`target`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( @@ -817,13 +817,13 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_how` (`how`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_how` (`how`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( @@ -854,14 +854,14 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_type` (`type`), + KEY `idx_library` (`library`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_type` (`type`), - KEY `idx_library` (`library`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_validation_rule` ( @@ -884,12 +884,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_validation_rule` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( @@ -928,11 +928,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_name` (`name`), KEY `idx_fieldtype` (`fieldtype`), KEY `idx_datatype` (`datatype`), @@ -946,7 +941,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` ( KEY `idx_datadefault_other` (`datadefault_other`), KEY `idx_datadefault` (`datadefault`), KEY `idx_datalenght_other` (`datalenght_other`), - KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`) + KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_fieldtype` ( @@ -979,11 +979,6 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_fieldtype` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_access` (`access`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_name` (`name`), KEY `idx_null_switch` (`null_switch`), KEY `idx_indexes` (`indexes`), @@ -993,7 +988,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_fieldtype` ( KEY `idx_datalenght` (`datalenght`), KEY `idx_has_defaults` (`has_defaults`), KEY `idx_datatype` (`datatype`), - KEY `idx_catid` (`catid`) + KEY `idx_catid` (`catid`), + KEY `idx_access` (`access`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_language_translation` ( @@ -1040,12 +1040,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_language` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_server` ( @@ -1077,13 +1077,13 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_server` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_protocol` (`protocol`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_protocol` (`protocol`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_help_document` ( @@ -1113,16 +1113,16 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_help_document` ( `hits` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), - KEY `idx_checkout` (`checked_out`), - KEY `idx_createdby` (`created_by`), - KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), KEY `idx_title` (`title`), KEY `idx_type` (`type`), KEY `idx_location` (`location`), KEY `idx_article` (`article`), KEY `idx_target` (`target`), - KEY `idx_alias` (`alias`) + KEY `idx_alias` (`alias`), + KEY `idx_checkout` (`checked_out`), + KEY `idx_createdby` (`created_by`), + KEY `idx_modifiedby` (`modified_by`), + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields` ( @@ -1143,12 +1143,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_admin_view` (`admin_view`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_admin_view` (`admin_view`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_conditions` ( @@ -1169,12 +1169,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_conditions` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_admin_view` (`admin_view`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_admin_view` (`admin_view`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_relations` ( @@ -1195,12 +1195,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_relations` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_admin_view` (`admin_view`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_admin_view` (`admin_view`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_custom_tabs` ( @@ -1221,12 +1221,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_custom_tabs` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_admin_view` (`admin_view`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_admin_view` (`admin_view`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` ( @@ -1247,12 +1247,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_site_views` ( @@ -1273,12 +1273,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_site_views` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_views` ( @@ -1299,12 +1299,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_views` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_updates` ( @@ -1325,12 +1325,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_updates` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_mysql_tweaks` ( @@ -1351,12 +1351,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_mysql_tweaks` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_menus` ( @@ -1377,12 +1377,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_custom_admin_menus` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_config` ( @@ -1403,12 +1403,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_config` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_dashboard` ( @@ -1430,12 +1430,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_dashboard` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_files_folders` ( @@ -1459,12 +1459,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_files_folders` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_placeholders` ( @@ -1485,12 +1485,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_placeholders` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_plugins` ( @@ -1511,12 +1511,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_plugins` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_component` (`joomla_component`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_component` (`joomla_component`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( @@ -1537,12 +1537,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_snippet_type` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_config` ( @@ -1563,12 +1563,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_config` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_library` (`library`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_library` (`library`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( @@ -1593,12 +1593,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_library_files_folders_urls` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_library` (`library`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_library` (`library`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_extends` ( @@ -1621,12 +1621,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_class_extends` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_group` ( @@ -1647,13 +1647,13 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_group` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_name` (`name`), + KEY `idx_class_extends` (`class_extends`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_name` (`name`), - KEY `idx_class_extends` (`class_extends`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_updates` ( @@ -1674,12 +1674,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_updates` ( `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_plugin` (`joomla_plugin`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_plugin` (`joomla_plugin`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls` ( @@ -1704,12 +1704,12 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_plugin_files_folders_urls `access` INT(10) unsigned NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), + KEY `idx_joomla_plugin` (`joomla_plugin`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_createdby` (`created_by`), KEY `idx_modifiedby` (`modified_by`), - KEY `idx_state` (`published`), - KEY `idx_joomla_plugin` (`joomla_plugin`) + KEY `idx_state` (`published`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; -- @@ -2044,7 +2044,7 @@ INSERT INTO `#__componentbuilder_language` (`id`, `langtag`, `name`, `params`, ` (55, 'pt-PT', 'Portuguese', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), (56, 'pt-BR', 'Portuguese Brazil', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), (57, 'ro-RO', 'Romanian', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), -(58, 'ru-RU', 'Russian', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), +(58, 'ru-RU', 'Russian', '', 1, '2018-04-19 13:43:44', '2019-10-11 11:55:13', 3, '', 1), (59, 'sr-RS', 'Serbian Cyrillic', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), (60, 'sr-YU', 'Serbian Latin', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), (61, 'si-LK', 'Sinhala', '', 1, '2018-04-19 13:43:44', '2018-09-14 10:39:11', 2, '', 1), @@ -2210,7 +2210,12 @@ INSERT INTO `#__componentbuilder_snippet_type` (`id`, `name`, `description`, `pa (42, 'Utility: Spacing', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 42), (43, 'Utility: Text', '', '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1, '', 43); +-- +-- Dumping data for table `#__componentbuilder_library_config` +-- +INSERT INTO `#__componentbuilder_library_config` (`id`, `addconfig`, `library`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES +(1, '{\"addconfig0\":{\"field\":\"2635\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig1\":{\"field\":\"2636\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig2\":{\"field\":\"2639\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig3\":{\"field\":\"2637\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig4\":{\"field\":\"2638\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig7\":{\"field\":\"2640\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig6\":{\"field\":\"2641\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"},\"addconfig5\":{\"field\":\"2642\",\"custom_value\":\"\",\"tabname\":\"Icon Settings\"}}', 7, '', 1, '2019-10-03 09:55:37', '2019-10-03 16:41:01', 2, '', 1); -- -- Dumping data for table `#__componentbuilder_library_files_folders_urls` @@ -2218,7 +2223,8 @@ INSERT INTO `#__componentbuilder_snippet_type` (`id`, `name`, `description`, `pa INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, `addfolders`, `addurls`, `library`, `params`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES (2, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/js\\/bootstrap.min.js\",\"type\":\"2\"},\"addurls1\":{\"url\":\"https:\\/\\/maxcdn.bootstrapcdn.com\\/bootstrap\\/4.0.0-alpha.6\\/css\\/bootstrap.min.css\",\"type\":\"2\"}}', 2, '', 1, '2017-11-25 16:17:36', '2018-05-02 23:29:05', 11, '', 2), -(3, '', '', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/js\\/uikit.min.js\",\"type\":\"2\"},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/js\\/uikit-icons.min.js\",\"type\":\"2\"},\"addurls4\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/uikit\\/3.0.0-rc.16\\/css\\/uikit.min.css\",\"type\":\"2\"}}', 3, '', 1, '2017-11-25 21:47:40', '2018-09-19 14:22:09', 10, '', 3); +(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); CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( `target` VARCHAR(255) NOT NULL DEFAULT '', diff --git a/admin/views/component_dashboard/tmpl/edit.php b/admin/views/component_dashboard/tmpl/edit.php index be38a716d..13d4a895d 100644 --- a/admin/views/component_dashboard/tmpl/edit.php +++ b/admin/views/component_dashboard/tmpl/edit.php @@ -125,5 +125,18 @@ function JRouter(link) { } ?> return url+link; -} +} + +// nice little dot trick :) +jQuery(document).ready( function($) { + var x=0; + setInterval(function() { + var dots = ""; + x++; + for (var y=0; y < x%8; y++) { + dots+="."; + } + $(".loading-dots").text(dots); + } , 500); +}); diff --git a/admin/views/component_dashboard/view.html.php b/admin/views/component_dashboard/view.html.php index dcd434df6..1668daf5d 100644 --- a/admin/views/component_dashboard/view.html.php +++ b/admin/views/component_dashboard/view.html.php @@ -192,6 +192,15 @@ class ComponentbuilderViewComponent_dashboard 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/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'); + $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 $this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';"); // add return_here diff --git a/componentbuilder.xml b/componentbuilder.xml index 77ad5cec9..7dd3287a9 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 12th September, 2019 + 11th October, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 619e60c8d..94923c750 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -12,6 +12,8 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); +use Joomla\Language\Language; +use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; /** @@ -5390,7 +5392,7 @@ abstract class ComponentbuilderHelper && ($timestamp >= ~PHP_INT_MAX); } - + public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name') { // do some table foot work