diff --git a/README.md b/README.md
index 3f09e23ff..c9e36b7b2 100644
--- a/README.md
+++ b/README.md
@@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 7th October, 2018
++ *Last Build*: 29th October, 2018
+ *Version*: 2.9.7
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **195701**
++ *Line count*: **195735**
+ *Field count*: **1087**
+ *File count*: **1277**
+ *Folder count*: **201**
diff --git a/admin/README.txt b/admin/README.txt
index 3f09e23ff..c9e36b7b2 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 7th October, 2018
++ *Last Build*: 29th October, 2018
+ *Version*: 2.9.7
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
-+ *Line count*: **195701**
++ *Line count*: **195735**
+ *Field count*: **1087**
+ *File count*: **1277**
+ *Folder count*: **201**
diff --git a/admin/compiler/joomla_3/Helper.php b/admin/compiler/joomla_3/Helper.php
index 2913f37da..854e96267 100644
--- a/admin/compiler/joomla_3/Helper.php
+++ b/admin/compiler/joomla_3/Helper.php
@@ -854,11 +854,11 @@ abstract class ###Component###Helper
*
* @input array The array to check
*
- * @returns bool true on success
+ * @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
- if (isset($array) && is_array($array) && count((array)$array) > 0)
+ if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@@ -872,7 +872,7 @@ abstract class ###Component###Helper
}
return self::checkArray($array, false);
}
- return true;
+ return $nr;
}
return false;
}
diff --git a/admin/compiler/joomla_3/Helper_site.php b/admin/compiler/joomla_3/Helper_site.php
index db1f8c8f1..ae2ce5aad 100644
--- a/admin/compiler/joomla_3/Helper_site.php
+++ b/admin/compiler/joomla_3/Helper_site.php
@@ -846,11 +846,11 @@ abstract class ###Component###Helper
*
* @input array The array to check
*
- * @returns bool true on success
+ * @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
- if (isset($array) && is_array($array) && count((array)$array) > 0)
+ if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@@ -864,7 +864,7 @@ abstract class ###Component###Helper
}
return self::checkArray($array, false);
}
- return true;
+ return $nr;
}
return false;
}
diff --git a/admin/compiler/joomla_3/JTable.php b/admin/compiler/joomla_3/JTable.php
index 061b1410d..73304bb31 100644
--- a/admin/compiler/joomla_3/JTable.php
+++ b/admin/compiler/joomla_3/JTable.php
@@ -222,7 +222,7 @@ class ###Component###Table###View### extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php
index d58bda581..f787a500f 100644
--- a/admin/controllers/admin_view.php
+++ b/admin/controllers/admin_view.php
@@ -328,7 +328,8 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm
$_tablesArray = array(
'admin_fields',
'admin_fields_conditions',
- 'admin_fields_relations'
+ 'admin_fields_relations',
+ 'admin_custom_tabs'
);
foreach($_tablesArray as $_updateTable)
{
diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php
index aa9873fae..b31869445 100644
--- a/admin/helpers/compiler/a_Get.php
+++ b/admin/helpers/compiler/a_Get.php
@@ -2713,7 +2713,7 @@ class Get
return $field['type_name'];
}
// check that we have the poperties
- if (ComponentbuilderHelper::checkArray($field['settings']->properties))
+ if (isset($field['settings']) && ComponentbuilderHelper::checkObject($field['settings']) && isset($field['settings']->properties) && ComponentbuilderHelper::checkArray($field['settings']->properties))
{
// search for own custom fields
if (strpos($field['settings']->type_name, '@') !== false)
@@ -4316,139 +4316,155 @@ class Get
$counter = 'a';
// Create a new query object.
$query = $this->db->getQuery(true);
+ // switch to onlu trigger the run of the query if we have tables to query
+ $runQuery = false;
foreach ($tables as $table)
{
- if ($counter === 'a')
+ if (isset($table['table']))
{
- // the main table fields
- if (strpos($table['sourcemap'], PHP_EOL) !== false)
+ if ($counter === 'a')
{
- $fields = explode(PHP_EOL, $table['sourcemap']);
- if (ComponentbuilderHelper::checkArray($fields))
+ // the main table fields
+ if (strpos($table['sourcemap'], PHP_EOL) !== false)
{
- // reset array buckets
- $sourceArray = array();
- $targetArray = array();
- foreach ($fields as $field)
+ $fields = explode(PHP_EOL, $table['sourcemap']);
+ if (ComponentbuilderHelper::checkArray($fields))
{
- if (strpos($field, "=>") !== false)
+ // reset array buckets
+ $sourceArray = array();
+ $targetArray = array();
+ foreach ($fields as $field)
{
- list($source, $target) = explode("=>", $field);
- $sourceArray[] = $counter . '.' . trim($source);
- $targetArray[] = trim($target);
+ if (strpos($field, "=>") !== false)
+ {
+ list($source, $target) = explode("=>", $field);
+ $sourceArray[] = $counter . '.' . trim($source);
+ $targetArray[] = trim($target);
+ }
}
- }
- if (ComponentbuilderHelper::checkArray($sourceArray) && ComponentbuilderHelper::checkArray($targetArray))
- {
- // add to query
- $query->select($this->db->quoteName($sourceArray, $targetArray));
- $query->from('#__' . $table['table'] . ' AS a');
- }
- // we may need to filter the selection
- if (isset($this->sqlTweak[$view_id]['where']))
- {
- // add to query the where filter
- $query->where('a.id IN (' . $this->sqlTweak[$view_id]['where'] . ')');
- }
- }
- }
- }
- else
- {
- // the other tables
- if (strpos($table['sourcemap'], PHP_EOL) !== false)
- {
- $fields = explode(PHP_EOL, $table['sourcemap']);
- if (ComponentbuilderHelper::checkArray($fields))
- {
- // reset array buckets
- $sourceArray = array();
- $targetArray = array();
- foreach ($fields as $field)
- {
- if (strpos($field, "=>") !== false)
+ if (ComponentbuilderHelper::checkArray($sourceArray) && ComponentbuilderHelper::checkArray($targetArray))
{
- list($source, $target) = explode("=>", $field);
- $sourceArray[] = $counter . '.' . trim($source);
- $targetArray[] = trim($target);
- }
- if (strpos($field, "==") !== false)
- {
- list($aKey, $bKey) = explode("==", $field);
// add to query
- $query->join('LEFT', $this->db->quoteName('#__' . $table['table'], $counter) . ' ON (' . $this->db->quoteName('a.' . trim($aKey)) . ' = ' . $this->db->quoteName($counter . '.' . trim($bKey)) . ')');
+ $query->select($this->db->quoteName($sourceArray, $targetArray));
+ $query->from('#__' . $table['table'] . ' AS a');
+ $runQuery = true;
+ }
+ // we may need to filter the selection
+ if (isset($this->sqlTweak[$view_id]['where']))
+ {
+ // add to query the where filter
+ $query->where('a.id IN (' . $this->sqlTweak[$view_id]['where'] . ')');
}
}
- if (ComponentbuilderHelper::checkArray($sourceArray) && ComponentbuilderHelper::checkArray($targetArray))
- {
- // add to query
- $query->select($this->db->quoteName($sourceArray, $targetArray));
- }
}
}
- }
- $counter++;
- }
- // now get the data
- $this->db->setQuery($query);
- $this->db->execute();
- if ($this->db->getNumRows())
- {
- // get the data
- $data = $this->db->loadObjectList();
- // start building the MySql dump
- $dump = "--";
- $dump .= PHP_EOL . "-- Dumping data for table `#__" . $this->bbb . "component" . $this->ddd . "_" . $view . "`";
- $dump .= PHP_EOL . "--";
- $dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__" . $this->bbb . "component" . $this->ddd . "_" . $view . "` (";
- foreach ($data as $line)
- {
- $comaSet = 0;
- foreach ($line as $fieldName => $fieldValue)
- {
- if ($comaSet == 0)
- {
- $dump .= $this->db->quoteName($fieldName);
- }
- else
- {
- $dump .= ", " . $this->db->quoteName($fieldName);
- }
- $comaSet++;
- }
- break;
- }
- $dump .= ") VALUES";
- $coma = 0;
- foreach ($data as $line)
- {
- if ($coma == 0)
- {
- $dump .= PHP_EOL . "(";
- }
else
{
- $dump .= "," . PHP_EOL . "(";
- }
- $comaSet = 0;
- foreach ($line as $fieldName => $fieldValue)
- {
- if ($comaSet == 0)
+ // the other tables
+ if (strpos($table['sourcemap'], PHP_EOL) !== false)
{
- $dump .= $this->mysql_escape($fieldValue);
+ $fields = explode(PHP_EOL, $table['sourcemap']);
+ if (ComponentbuilderHelper::checkArray($fields))
+ {
+ // reset array buckets
+ $sourceArray = array();
+ $targetArray = array();
+ foreach ($fields as $field)
+ {
+ if (strpos($field, "=>") !== false)
+ {
+ list($source, $target) = explode("=>", $field);
+ $sourceArray[] = $counter . '.' . trim($source);
+ $targetArray[] = trim($target);
+ }
+ if (strpos($field, "==") !== false)
+ {
+ list($aKey, $bKey) = explode("==", $field);
+ // add to query
+ $query->join('LEFT', $this->db->quoteName('#__' . $table['table'], $counter) . ' ON (' . $this->db->quoteName('a.' . trim($aKey)) . ' = ' . $this->db->quoteName($counter . '.' . trim($bKey)) . ')');
+ }
+ }
+ if (ComponentbuilderHelper::checkArray($sourceArray) && ComponentbuilderHelper::checkArray($targetArray))
+ {
+ // add to query
+ $query->select($this->db->quoteName($sourceArray, $targetArray));
+ }
+ }
+ }
+ }
+ $counter++;
+ }
+ else
+ {
+ // see where
+ // var_dump($view);
+ // jexit();
+ }
+ }
+ // check if we should run query
+ if ($runQuery)
+ {
+ // now get the data
+ $this->db->setQuery($query);
+ $this->db->execute();
+ if ($this->db->getNumRows())
+ {
+ // get the data
+ $data = $this->db->loadObjectList();
+ // start building the MySql dump
+ $dump = "--";
+ $dump .= PHP_EOL . "-- Dumping data for table `#__" . $this->bbb . "component" . $this->ddd . "_" . $view . "`";
+ $dump .= PHP_EOL . "--";
+ $dump .= PHP_EOL . PHP_EOL . "INSERT INTO `#__" . $this->bbb . "component" . $this->ddd . "_" . $view . "` (";
+ foreach ($data as $line)
+ {
+ $comaSet = 0;
+ foreach ($line as $fieldName => $fieldValue)
+ {
+ if ($comaSet == 0)
+ {
+ $dump .= $this->db->quoteName($fieldName);
+ }
+ else
+ {
+ $dump .= ", " . $this->db->quoteName($fieldName);
+ }
+ $comaSet++;
+ }
+ break;
+ }
+ $dump .= ") VALUES";
+ $coma = 0;
+ foreach ($data as $line)
+ {
+ if ($coma == 0)
+ {
+ $dump .= PHP_EOL . "(";
}
else
{
- $dump .= ", " . $this->mysql_escape($fieldValue);
+ $dump .= "," . PHP_EOL . "(";
}
- $comaSet++;
+ $comaSet = 0;
+ foreach ($line as $fieldName => $fieldValue)
+ {
+ if ($comaSet == 0)
+ {
+ $dump .= $this->mysql_escape($fieldValue);
+ }
+ else
+ {
+ $dump .= ", " . $this->mysql_escape($fieldValue);
+ }
+ $comaSet++;
+ }
+ $dump .= ")";
+ $coma++;
}
- $dump .= ")";
- $coma++;
+ $dump .= ";";
+ // return build dump query
+ return $dump;
}
- $dump .= ";";
- // return build dump query
- return $dump;
}
}
return false;
diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php
index 9a31387ff..c45d28f8c 100644
--- a/admin/helpers/compiler/c_Fields.php
+++ b/admin/helpers/compiler/c_Fields.php
@@ -2107,6 +2107,8 @@ class Fields extends Structure
// setup a default field
if (ComponentbuilderHelper::checkArray($field['settings']->properties))
{
+ // we need a deeper php code search tracker
+ $phpTracker = array();
foreach ($field['settings']->properties as $property)
{
// reset
@@ -2155,6 +2157,8 @@ class Fields extends Structure
$this->setDynamicValues(ComponentbuilderHelper::openValidBase64(
ComponentbuilderHelper::getBetween($field['settings']->xml, $property['name'] . '="', '"')
));
+ // load tracker
+ $phpTracker['type_' . $phpKey] = $phpKey;
}
elseif ($property['name'] === 'prime_php' && $setCustom)
{
@@ -2338,6 +2342,24 @@ class Fields extends Structure
$fieldAttributes['default'] = $xmlValue;
}
}
+ // check if all php is loaded using the tracker
+ if (ComponentbuilderHelper::checkArray($phpTracker))
+ {
+ // litle search validation
+ $confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB';
+ foreach ($phpTracker as $searchKey => $phpKey)
+ {
+ // we must search for more code in the xml just incase
+ foreach(range(2, 30) as $phpLine)
+ {
+ $get_ = $searchKey . '_' . $phpLine;
+ if (!isset($fieldAttributes['custom'][$phpKey][$phpLine]) && ($value = ComponentbuilderHelper::getValueFromXMLstring($field['settings']->xml, $get_, $confirmation)) !== $confirmation)
+ {
+ $fieldAttributes['custom'][$phpKey][$phpLine] = $this->setDynamicValues(ComponentbuilderHelper::openValidBase64($value));
+ }
+ }
+ }
+ }
// do some nice twigs beyond the default
if (isset($fieldAttributes['name']))
{
@@ -2460,7 +2482,7 @@ class Fields extends Structure
}
}
// set list switch
- $listSwitch = (isset($field['list']) && $field['list'] == 1);
+ $listSwitch = (isset($field['list']) && ($field['list'] == 1 || $field['list'] == 3 || $field['list'] == 4 ));
// set list join
$listJoin = (isset($this->listJoinBuilder[$view_name_list][(int) $field['field']]));
// add history to this view
@@ -2523,7 +2545,8 @@ class Fields extends Structure
'sort' => (isset($field['sort']) && $field['sort']) ? true : false,
'custom' => $custom,
'multiple' => $multiple,
- 'options' => $options);
+ 'options' => $options,
+ 'target' => (int) $field['list']);
}
// build custom builder list
if ($listSwitch || $listJoin)
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index d496e21a2..53191cb53 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -4554,6 +4554,9 @@ class Interpretation extends Fields
public function setMethodItemSave(&$view)
{
$script = '';
+ // get component name
+ $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh];
+ $component = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh];
// check if there was script added before modeling of data
$script .= $this->getCustomScriptBuilder('php_before_save', $view, PHP_EOL . PHP_EOL);
// turn array into JSON string
@@ -4568,7 +4571,22 @@ class Interpretation extends Fields
$script .= PHP_EOL . $this->_t(3) . "\$" . $jsonItem . "->loadArray(\$data['" . $jsonItem . "']);";
$script .= PHP_EOL . $this->_t(3) . "\$data['" . $jsonItem . "'] = (string) \$" . $jsonItem . ";";
$script .= PHP_EOL . $this->_t(2) . "}";
- $script .= PHP_EOL . $this->_t(2) . "elseif (!isset(\$data['" . $jsonItem . "']))";
+ if (isset($this->permissionFields[$view]) && isset($this->permissionFields[$view][$jsonItem]) && ComponentbuilderHelper::checkArray($this->permissionFields[$view][$jsonItem]))
+ {
+ $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Also check permission since the value may be removed due to permissions";
+ $script .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " Then we do not want to clear it out, but simple ignore the empty " . $jsonItem;
+ $script .= PHP_EOL . $this->_t(2) . "elseif (!isset(\$data['" . $jsonItem . "'])";
+ // only add permission that are available
+ foreach ($this->permissionFields[$view][$jsonItem] as $permission_option => $fieldType)
+ {
+ $script .= PHP_EOL . $this->_t(3) . "&& JFactory::getUser()->authorise('" . $view . "." . $permission_option . "." . $jsonItem . "', 'com_" . $component . "')";
+ }
+ $script .= ")";
+ }
+ else
+ {
+ $script .= PHP_EOL . $this->_t(2) . "elseif (!isset(\$data['" . $jsonItem . "']))";
+ }
$script .= PHP_EOL . $this->_t(2) . "{";
$script .= PHP_EOL . $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set the empty " . $jsonItem . " to data";
$script .= PHP_EOL . $this->_t(3) . "\$data['" . $jsonItem . "'] = '';";
@@ -4600,7 +4618,6 @@ class Interpretation extends Fields
}
}
// turn string into encrypted string
- $Component = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh];
foreach ($this->cryptionTypes as $cryptionType)
{
if (isset($this->{$cryptionType . 'EncryptionBuilder'}[$view]) && ComponentbuilderHelper::checkArray($this->{$cryptionType . 'EncryptionBuilder'}[$view]))
@@ -6759,25 +6776,29 @@ class Interpretation extends Fields
// start adding the dynamic
foreach ($this->listBuilder[$viewName_list] as $item)
{
- // set some defaults
- $customAdminViewButtons = '';
- // set the item default class
- $itemClass = 'hidden-phone';
- // set the item row
- $itemRow = $this->getListItemBuilder($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core);
- // check if buttons was aready added
- if ($firstTimeBeingAdded) // TODO we must improve this to allow more items to be targeted instead of just the first item :)
+ // check if target is admin list
+ if (1 == $item['target'] || 3 == $item['target'])
{
- // get custom admin view buttons
- $customAdminViewButtons = $this->getCustomAdminViewButtons($viewName_list);
- // make sure the custom admin view buttons are only added once
- $firstTimeBeingAdded = false;
+ // set some defaults
+ $customAdminViewButtons = '';
+ // set the item default class
+ $itemClass = 'hidden-phone';
+ // set the item row
+ $itemRow = $this->getListItemBuilder($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core);
+ // check if buttons was aready added
+ if ($firstTimeBeingAdded) // TODO we must improve this to allow more items to be targeted instead of just the first item :)
+ {
+ // get custom admin view buttons
+ $customAdminViewButtons = $this->getCustomAdminViewButtons($viewName_list);
+ // make sure the custom admin view buttons are only added once
+ $firstTimeBeingAdded = false;
+ }
+ // add row to body
+ $body .= PHP_EOL . $this->_t(2) . "
getListFieldClass($item['code'], $viewName_list, $itemClass) . "\">";
+ $body .= $itemRow;
+ $body .= $customAdminViewButtons;
+ $body .= PHP_EOL . $this->_t(2) . " ";
}
- // add row to body
- $body .= PHP_EOL . $this->_t(2) . "getListFieldClass($item['code'], $viewName_list, $itemClass) . "\">";
- $body .= $itemRow;
- $body .= $customAdminViewButtons;
- $body .= PHP_EOL . $this->_t(2) . " ";
}
// add the defaults
if (!isset($this->fieldsNames[$viewName_single]['published']))
@@ -7253,30 +7274,34 @@ class Interpretation extends Fields
// build the dynamic fields
foreach ($this->listBuilder[$viewName_list] as $item)
{
- // check if we have an over-ride
- if (isset($this->listHeadOverRide[$viewName_list]) && ComponentbuilderHelper::checkArray($this->listHeadOverRide[$viewName_list]) && isset($this->listHeadOverRide[$viewName_list][$item['id']]))
+ // check if target is admin list
+ if (1 == $item['target'] || 3 == $item['target'])
{
- $item['lang'] = $this->listHeadOverRide[$viewName_list][$item['id']];
+ // check if we have an over-ride
+ if (isset($this->listHeadOverRide[$viewName_list]) && ComponentbuilderHelper::checkArray($this->listHeadOverRide[$viewName_list]) && isset($this->listHeadOverRide[$viewName_list][$item['id']]))
+ {
+ $item['lang'] = $this->listHeadOverRide[$viewName_list][$item['id']];
+ }
+ // set the custom code
+ if (ComponentbuilderHelper::checkArray($item['custom']))
+ {
+ $item['code'] = $item['code'] . '_' . $item['custom']['text'];
+ }
+ $class = 'nowrap hidden-phone';
+ if ($item['link'])
+ {
+ $class = 'nowrap';
+ }
+ $title = "";
+ if ($item['sort'])
+ {
+ $title = "listDirn, \$this->listOrder); ?>";
+ }
+ $head .= PHP_EOL . $this->_t(1) . '';
+ $head .= PHP_EOL . $this->_t(3) . $title;
+ $head .= PHP_EOL . $this->_t(1) . " ";
+ $this->listColnrBuilder[$viewName_list] ++;
}
- // set the custom code
- if (ComponentbuilderHelper::checkArray($item['custom']))
- {
- $item['code'] = $item['code'] . '_' . $item['custom']['text'];
- }
- $class = 'nowrap hidden-phone';
- if ($item['link'])
- {
- $class = 'nowrap';
- }
- $title = "";
- if ($item['sort'])
- {
- $title = "listDirn, \$this->listOrder); ?>";
- }
- $head .= PHP_EOL . $this->_t(1) . '';
- $head .= PHP_EOL . $this->_t(3) . $title;
- $head .= PHP_EOL . $this->_t(1) . " ";
- $this->listColnrBuilder[$viewName_list] ++;
}
// set default
if (!isset($this->fieldsNames[$viewName_single]['published']))
@@ -8212,27 +8237,31 @@ class Interpretation extends Fields
// start adding the dynamic
foreach ($this->listBuilder[$viewName_list] as $item)
{
- // set the ref
- $ref = '';
- // set some defaults
- $customAdminViewButtons = '';
- // set the item row
- $itemRow = $this->getListItemBuilder($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core, false, $ref, '$displayData->escape', '$user', $refview);
- // check if buttons was aready added
- if ($firstTimeBeingAdded) // TODO we must improve this to allow more items to be targeted instead of just the first item :)
+ // check if target is linked list view
+ if (1 == $item['target'] || 4 == $item['target'])
{
- // get custom admin view buttons
- $customAdminViewButtons = $this->getCustomAdminViewButtons($viewName_list, $ref);
- // make sure the custom admin view buttons are only added once
- $firstTimeBeingAdded = false;
+ // set the ref
+ $ref = '';
+ // set some defaults
+ $customAdminViewButtons = '';
+ // set the item row
+ $itemRow = $this->getListItemBuilder($item, $viewName_single, $viewName_list, $itemClass, $doNotEscape, $coreLoad, $core, false, $ref, '$displayData->escape', '$user', $refview);
+ // check if buttons was aready added
+ if ($firstTimeBeingAdded) // TODO we must improve this to allow more items to be targeted instead of just the first item :)
+ {
+ // get custom admin view buttons
+ $customAdminViewButtons = $this->getCustomAdminViewButtons($viewName_list, $ref);
+ // make sure the custom admin view buttons are only added once
+ $firstTimeBeingAdded = false;
+ }
+ // add row to body
+ $body .= PHP_EOL . $this->_t(2) . "";
+ $body .= $itemRow;
+ $body .= $customAdminViewButtons;
+ $body .= PHP_EOL . $this->_t(2) . " ";
+ // increment counter
+ $counter++;
}
- // add row to body
- $body .= PHP_EOL . $this->_t(2) . "";
- $body .= $itemRow;
- $body .= $customAdminViewButtons;
- $body .= PHP_EOL . $this->_t(2) . " ";
- // increment counter
- $counter++;
}
$counter = $counter + 2;
$data_value = (3 == $this->footableVersion) ? 'data-sort-value' : 'data-value';
@@ -8397,31 +8426,35 @@ class Interpretation extends Fields
// build the dynamic fields
foreach ($this->listBuilder[$viewName_list] as $item)
{
- // check if we have an over-ride
- if (isset($this->listHeadOverRide[$viewName_list]) && ComponentbuilderHelper::checkArray($this->listHeadOverRide[$viewName_list]) && isset($this->listHeadOverRide[$viewName_list][$item['id']]))
+ // check if target is linked list view
+ if (1 == $item['target'] || 4 == $item['target'])
{
- $item['lang'] = $this->listHeadOverRide[$viewName_list][$item['id']];
- }
- $setin = (2 == $this->footableVersion) ? ' data-hide="phone"' : ' data-breakpoints="xs sm"';
- if ($controller > 3)
- {
- $setin = (2 == $this->footableVersion) ? ' data-hide="phone,tablet"' : ' data-breakpoints="xs sm md"';
- }
+ // check if we have an over-ride
+ if (isset($this->listHeadOverRide[$viewName_list]) && ComponentbuilderHelper::checkArray($this->listHeadOverRide[$viewName_list]) && isset($this->listHeadOverRide[$viewName_list][$item['id']]))
+ {
+ $item['lang'] = $this->listHeadOverRide[$viewName_list][$item['id']];
+ }
+ $setin = (2 == $this->footableVersion) ? ' data-hide="phone"' : ' data-breakpoints="xs sm"';
+ if ($controller > 3)
+ {
+ $setin = (2 == $this->footableVersion) ? ' data-hide="phone,tablet"' : ' data-breakpoints="xs sm md"';
+ }
- if ($controller > 6)
- {
- $setin = (2 == $this->footableVersion) ? ' data-hide="all"' : ' data-breakpoints="all"';
- }
+ if ($controller > 6)
+ {
+ $setin = (2 == $this->footableVersion) ? ' data-hide="all"' : ' data-breakpoints="all"';
+ }
- if ($item['link'] && $firstLink)
- {
- $setin = (2 == $this->footableVersion) ? ' data-toggle="true"' : '';
- $firstLink = false;
+ if ($item['link'] && $firstLink)
+ {
+ $setin = (2 == $this->footableVersion) ? ' data-toggle="true"' : '';
+ $firstLink = false;
+ }
+ $head .= PHP_EOL . $this->_t(2) . "";
+ $head .= PHP_EOL . $this->_t(3) . "";
+ $head .= PHP_EOL . $this->_t(2) . " ";
+ $controller++;
}
- $head .= PHP_EOL . $this->_t(2) . "";
- $head .= PHP_EOL . $this->_t(3) . "";
- $head .= PHP_EOL . $this->_t(2) . " ";
- $controller++;
}
// set some V3 attr
$data_hide = (2 == $this->footableVersion) ? 'data-hide="phone,tablet"' : 'data-breakpoints="xs sm md"';
@@ -11284,6 +11317,19 @@ class Interpretation extends Fields
$allow[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Disable fields while saving.";
$allow[] = $this->_t(3) . "\$form->setFieldAttribute('created', 'filter', 'unset');";
$allow[] = $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) . "}";
+ }
// handel the fields permissions
if (isset($this->permissionFields[$viewName_single]) && ComponentbuilderHelper::checkArray($this->permissionFields[$viewName_single]))
{
@@ -11382,12 +11428,21 @@ class Interpretation extends Fields
$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 (!\$form->getValue('" . $fieldName . "'))";
+ $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 conver to json we get an error";
+ $allow[] = $this->_t(4) . "\$form->removeField('" . $fieldName . "');";
$allow[] = $this->_t(3) . "}";
$allow[] = $this->_t(2) . "}";
}
@@ -12336,6 +12391,8 @@ class Interpretation extends Fields
// JSON_ARRAY_ENCODE
$decode = 'json_decode';
$suffix_decode = ', true';
+ // fallback on json
+ $item['method'] = 1;
break;
}
@@ -12486,7 +12543,7 @@ class Interpretation extends Fields
{
if (!$export)
{
- // For thos we have not cached yet.
+ // For those we have not cached yet.
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//" . $this->setLine(__LINE__) . " convert " . $item['name'];
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$item->" . $item['name'] . " = " . $Component . "Helper::jsonToString(\$item->" . $item['name'] . ");";
}
@@ -15469,7 +15526,7 @@ function vdm_dkim() {
// set the permission for this field
$fieldView['action'] = 'view.' . $permission_option . '.' . $fieldName;
$fieldView['implementation'] = '3';
- // check if persmissions was laready set
+ // check if persmissions was already set
if (isset($view['settings']->permissions) && ComponentbuilderHelper::checkArray($view['settings']->permissions))
{
array_push($view['settings']->permissions, $fieldView);
@@ -15600,6 +15657,7 @@ function vdm_dkim() {
$view['settings']->permissions[] = $versionView;
}
}
+ // add batch permissions
if ($type === 'admin')
{
// set batch control
@@ -15615,6 +15673,7 @@ function vdm_dkim() {
$view['settings']->permissions[] = $batchView;
}
}
+ // load the permissions
foreach ($view['settings']->permissions as $permission)
{
// set acction name
@@ -15639,6 +15698,12 @@ function vdm_dkim() {
array_shift($actionNameBuilder);
$nameBuilder = trim(implode('___', $actionNameBuilder));
$customName = trim(implode(' ', $actionNameBuilder));
+ // check if we have access set for this view (if not skip)
+ if ($nameBuilder === 'edit___access' && $type === 'admin' && (!isset($view['access']) || $view['access'] != 1))
+ {
+ continue;
+ }
+ // build the names
if ($type === 'admin')
{
$W_NameList = ComponentbuilderHelper::safeString($view['settings']->name_list, 'W');
@@ -15666,6 +15731,12 @@ function vdm_dkim() {
// set edit description
$permission['description'] = ' Allows the users in this group to edit ' . $w_NameList . ' created by them';
break;
+ case 'edit___access':
+ // set edit title
+ $permission['title'] = $W_NameList . ' Edit Access';
+ // set edit description
+ $permission['description'] = ' Allows the users in this group to change the access of the ' . $w_NameList;
+ break;
case 'edit___state':
// set edit title
$permission['title'] = $W_NameList . ' Edit State';
diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php
index ae86abcb3..b93caac06 100644
--- a/admin/helpers/componentbuilder.php
+++ b/admin/helpers/componentbuilder.php
@@ -686,6 +686,8 @@ abstract class ComponentbuilderHelper
'description' => $result->description);
// number pointer
$nr = 0;
+ // php tracker (we must try to load alteast 17 rows
+ $phpTracker = array();
// value to check since there are false and null values even 0 in the values returned
$confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB';
// set the headers
@@ -701,6 +703,9 @@ abstract class ComponentbuilderHelper
if (strpos($property['name'], 'type_php') !== false)
{
$addPHP = true;
+ // set the line number
+ $phpLine = (int) preg_replace('/[^0-9]/', '', $property['name']);
+ // set the key
$phpKey = trim(preg_replace('/[0-9]+/', '', $property['name']), '_');
// start array if not already set
if (!isset($field['php'][$phpKey]))
@@ -708,6 +713,8 @@ abstract class ComponentbuilderHelper
$field['php'][$phpKey] = array();
$field['php'][$phpKey]['value'] = array();
$field['php'][$phpKey]['desc'] = $property['description'];
+ // start tracker
+ $phpTracker[$phpKey] = 1;
}
}
// was the settings for the property passed
@@ -718,7 +725,8 @@ abstract class ComponentbuilderHelper
// add the json values
if ($addPHP)
{
- $field['php'][$phpKey]['value'][] = $settings[$property['name']];
+ $field['php'][$phpKey]['value'][$phpLine] = $settings[$property['name']];
+ $phpTracker[$phpKey]++;
}
else
{
@@ -732,7 +740,8 @@ abstract class ComponentbuilderHelper
// add the json values
if ($addPHP)
{
- $field['php'][$phpKey]['value'][] = ($confirmation !== $value) ? $value : $example;
+ $field['php'][$phpKey]['value'][$phpLine] = ($confirmation !== $value) ? $value : $example;
+ $phpTracker[$phpKey]++;
}
else
{
@@ -747,6 +756,25 @@ abstract class ComponentbuilderHelper
// increment the number
$nr++;
}
+ // check if all php is loaded using the tracker
+ if (self::checkString($xml) && isset($phpTracker) && self::checkArray($phpTracker))
+ {
+ foreach ($phpTracker as $phpKey => $start)
+ {
+ if ($start < 30)
+ {
+ // we must search for more code in the xml just incase
+ foreach(range(2, 30) as $t_nr)
+ {
+ $get_ = $phpKey . '_' . $t_nr;
+ if (!isset($field['php'][$phpKey]['value'][$t_nr]) && ($value = self::getValueFromXMLstring($xml, $get_, $confirmation)) !== $confirmation)
+ {
+ $field['php'][$phpKey]['value'][$t_nr] = $value;
+ }
+ }
+ }
+ }
+ }
$field['values'] .= PHP_EOL . "/>";
$field['values_description'] .= '';
// return found field options
@@ -5192,11 +5220,11 @@ abstract class ComponentbuilderHelper
*
* @input array The array to check
*
- * @returns bool true on success
+ * @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
- if (isset($array) && is_array($array) && count((array)$array) > 0)
+ if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@@ -5210,7 +5238,7 @@ abstract class ComponentbuilderHelper
}
return self::checkArray($array, false);
}
- return true;
+ return $nr;
}
return false;
}
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index 1d75c498a..057d4adce 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -322,6 +322,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE_DB="None DB"
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, created, modified_by, modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again) For more help please watch this tutorial ."
COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views."
+COM_COMPONENTBUILDER_ADMIN_FIELDS_ONLY_IN_ADMIN_LIST_VIEW="Only in Admin List View"
+COM_COMPONENTBUILDER_ADMIN_FIELDS_ONLY_IN_LINKED_LIST_VIEWS="Only in Linked List Views"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_DESCRIPTION="Order in relation to tab & alignment of admin and site."
COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_LABEL="Order in Edit"
@@ -385,7 +387,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_OF_TABS="Right of Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields to customise the alias."
COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_DESCRIPTION="Select if the field is to be searchable in list view, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_LABEL="Searchable"
-COM_COMPONENTBUILDER_ADMIN_FIELDS_SHOW_IN_LIST_VIEW="Show in list view"
+COM_COMPONENTBUILDER_ADMIN_FIELDS_SHOW_IN_ALL_LIST_VIEWS="Show in All List Views"
COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_DESCRIPTION="Select if the field should be sortable in list view, if shown."
COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_LABEL="Sortable"
COM_COMPONENTBUILDER_ADMIN_FIELDS_STATUS="Status"
@@ -614,6 +616,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_CONTRACT_TWO="Contract 2"
COM_COMPONENTBUILDER_ADMIN_VIEW_CORECREATE="core.create"
COM_COMPONENTBUILDER_ADMIN_VIEW_COREDELETE="core.delete"
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDIT="core.edit"
+COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITACCESS="core.edit.access"
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITCREATED="core.edit.created"
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITCREATED_BY="core.edit.created_by"
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITOWN="core.edit.own"
@@ -1324,6 +1327,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWACCESS="view.access"
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWCREATE="view.create"
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWDELETE="view.delete"
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDIT="view.edit"
+COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITACCESS="view.edit.access"
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITCREATED="view.edit.created"
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITCREATED_BY="view.edit.created_by"
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITOWN="view.edit.own"
@@ -7016,12 +7020,14 @@ COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations"
COM_COMPONENTBUILDER_THE_AVAILABLE_VALIDATION_RULES_FOR_THE_VALIDATE_ATTRIBUTE_ARE="The available validation rules for the validate attribute are:"
COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE="The None DB option will remove this field from being saved in the database."
+COM_COMPONENTBUILDER_THE_BONLY_IN_ADMIN_LIST_VIEWB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW_NOT_TO_ANY_LINKED_VIEWS="The Only in Admin List View option will only Add this field to the admin list view, not to any linked views."
+COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW="The Only in Linked List Views option will only Add this field to the linked list view, if this view gets linked to other view, not to this admin list view."
COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The phpseclib\NET\SFTP library\class is not available! This library\class should have been added to your libraries/vdm_io/vendor folder. Please contact your system administrator for more info"
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The %s file could not be moved to %s path on %s server."
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The %s file could not be moved to %s server."
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The %s library\class is not available! This library\class should have been added to your libraries/vdm_io/vendor folder. Please contact your system administrator for more info!"
COM_COMPONENTBUILDER_THE_BSB_LIBRARY_CAN_NOT_BE_DELETED_OR_THINGS_WILL_BREAK="The %s library can not be deleted, or things will break."
-COM_COMPONENTBUILDER_THE_BSHOW_IN_LIST_VIEWB_OPTION_WILL_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW="The Show in list view option will Add this field to the admin list view."
+COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED="The Show in All List Views option will Add this field to all list views, admin & linked."
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus"
diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php
index 186d3ba04..ec753ce76 100644
--- a/admin/models/admin_view.php
+++ b/admin/models/admin_view.php
@@ -770,7 +770,8 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$_tablesArray = array(
'admin_fields',
'admin_fields_conditions',
- 'admin_fields_relations'
+ 'admin_fields_relations',
+ 'admin_custom_tabs'
);
foreach($_tablesArray as $_updateTable)
{
@@ -811,7 +812,8 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$_tablesArray = array(
'admin_fields',
'admin_fields_conditions',
- 'admin_fields_relations'
+ 'admin_fields_relations',
+ 'admin_custom_tabs'
);
foreach($_tablesArray as $_updateTable)
{
diff --git a/admin/models/ajax.php b/admin/models/ajax.php
index 6a7a009b2..19d6e9aec 100644
--- a/admin/models/ajax.php
+++ b/admin/models/ajax.php
@@ -2180,97 +2180,97 @@ class ComponentbuilderModelAjax extends JModelList
* @var array
*/
protected $codeSearchKeys = array(
- // #__componentbuilder_joomla_component
+ // #__componentbuilder_joomla_component (a)
'joomla_component' => array(
- 'search' => array('id', 'system_name', 'php_preflight_install','php_postflight_install',
- 'php_preflight_update','php_postflight_update','php_method_uninstall',
- 'php_helper_admin','php_admin_event','php_helper_both','php_helper_site',
- 'php_site_event','javascript'),
+ 'search' => array('id', 'system_name', 'php_preflight_install', 'php_postflight_install',
+ 'php_preflight_update', 'php_postflight_update', 'php_method_uninstall',
+ 'php_helper_admin', 'php_admin_event', 'php_helper_both', 'php_helper_site',
+ 'php_site_event', 'javascript'),
'views' => 'joomla_components',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_component_dashboard
+ // #__componentbuilder_component_dashboard (b)
'component_dashboard' => array(
- 'search' => array('id', 'joomla_component', 'php_dashboard_methods','dashboard_tab'),
+ 'search' => array('id', 'joomla_component', 'php_dashboard_methods', 'dashboard_tab'),
'views' => 'components_dashboard',
'not_base64' => array('dashboard_tab' => 'json'),
'name' => 'joomla_component->id:joomla_component.system_name'
),
- // #__componentbuilder_admin_view
+ // #__componentbuilder_admin_view (c)
'admin_view' => array(
- 'search' => array('id', 'system_name', 'javascript_view_file','javascript_view_footer',
- 'javascript_views_file','javascript_views_footer','html_import_view',
- 'php_after_delete','php_after_publish','php_ajaxmethod','php_allowedit','php_batchcopy',
- 'php_batchmove','php_before_delete','php_before_publish','php_before_save','php_controller',
- 'php_controller_list','php_document','php_getitem','php_getitems','php_getitems_after_all',
- 'php_getlistquery','php_import','php_import_display','php_import_ext','php_import_headers','php_getform',
- 'php_import_save','php_import_setdata','php_model','php_model_list','php_postsavehook','php_save'),
+ 'search' => array('id', 'system_name', 'javascript_view_file', 'javascript_view_footer',
+ 'javascript_views_file', 'javascript_views_footer', 'html_import_view',
+ 'php_after_delete', 'php_after_publish', 'php_ajaxmethod', 'php_allowedit', 'php_batchcopy',
+ 'php_batchmove', 'php_before_delete', 'php_before_publish', 'php_before_save', 'php_controller',
+ 'php_controller_list', 'php_document', 'php_getitem', 'php_getitems', 'php_getitems_after_all',
+ 'php_getlistquery', 'php_import', 'php_import_display', 'php_import_ext', 'php_import_headers', 'php_getform',
+ 'php_import_save', 'php_import_setdata', 'php_model', 'php_model_list', 'php_postsavehook', 'php_save'),
'views' => 'admin_views',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_admin_fields_relations
+ // #__componentbuilder_admin_fields_relations (d)
'admin_fields_relations' => array(
'search' => array('id', 'admin_view', 'addrelations'),
'views' => 'admins_fields_relations',
'not_base64' => array('addrelations' => 'json'),
'name' => 'admin_view->id:admin_view.system_name'
),
- // #__componentbuilder_custom_admin_view
+ // #__componentbuilder_custom_admin_view (e)
'custom_admin_view' => array(
- 'search' => array('id', 'system_name', 'default','php_view','php_jview','php_jview_display','php_document',
- 'js_document','css_document','css','php_ajaxmethod','php_model','php_controller'),
+ 'search' => array('id', 'system_name', 'default', 'php_view', 'php_jview', 'php_jview_display', 'php_document',
+ 'js_document', 'css_document', 'css', 'php_ajaxmethod', 'php_model', 'php_controller'),
'views' => 'custom_admin_views',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_site_view
+ // #__componentbuilder_site_view (f)
'site_view' => array(
- 'search' => array('id', 'system_name', 'default','php_view','php_jview','php_jview_display','php_document',
- 'js_document','css_document','css','php_ajaxmethod','php_model','php_controller'),
+ 'search' => array('id', 'system_name', 'default', 'php_view', 'php_jview', 'php_jview_display', 'php_document',
+ 'js_document', 'css_document', 'css', 'php_ajaxmethod', 'php_model', 'php_controller'),
'views' => 'site_views',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_field
+ // #__componentbuilder_field (g)
'field' => array(
- 'search' => array('id', 'name', 'xml','javascript_view_footer','javascript_views_footer'),
+ 'search' => array('id', 'name', 'xml', 'javascript_view_footer', 'javascript_views_footer'),
'views' => 'fields',
'not_base64' => array('xml' => 'json'),
'base64_search' => array('xml' => array('start' => 'type_php', '_start' => '="', 'end' => '"')),
'name' => 'name'
),
- // #__componentbuilder_fieldtype
+ // #__componentbuilder_fieldtype (h)
'fieldtype' => array(
'search' => array('id', 'name', 'properties'),
'views' => 'fieldtypes',
'not_base64' => array('properties' => 'json'),
'name' => 'name'
),
- // #__componentbuilder_dynamic_get
+ // #__componentbuilder_dynamic_get (i)
'dynamic_get' => array(
- 'search' => array('id', 'name', 'php_before_getitem','php_after_getitem','php_before_getitems','php_after_getitems',
+ 'search' => array('id', 'name', 'php_before_getitem', 'php_after_getitem', 'php_before_getitems', 'php_after_getitems',
'php_getlistquery'),
'views' => 'dynamic_gets',
'not_base64' => array(),
'name' => 'name'
),
- // #__componentbuilder_template
+ // #__componentbuilder_template (j)
'template' => array(
- 'search' => array('id', 'name', 'php_view','template'),
+ 'search' => array('id', 'name', 'php_view', 'template'),
'views' => 'templates',
'not_base64' => array(),
'name' => 'name'
),
- // #__componentbuilder_layout
+ // #__componentbuilder_layout (k)
'layout' => array(
- 'search' => array('id', 'name', 'php_view','layout'),
+ 'search' => array('id', 'name', 'php_view', 'layout'),
'views' => 'layouts',
'not_base64' => array(),
'name' => 'name'
),
- // #__componentbuilder_library
+ // #__componentbuilder_library (l)
'library' => array(
'search' => array('id', 'name', 'php_setdocument'),
'views' => 'libraries',
diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php
index cd3653456..a1594c157 100644
--- a/admin/models/fields/dbtables.php
+++ b/admin/models/fields/dbtables.php
@@ -35,23 +35,27 @@ class JFormFieldDbtables extends JFormFieldList
*/
protected function getOptions()
{
- $db = JFactory::getDBO();
- $tables= $db->getTableList();
- $config = JFactory::getConfig();
- $options = array();
- $db = JFactory::getDBO(); $options[] = JHtml::_('select.option', '', 'Select an option');
- for ($i=0; $i < count($tables); $i++)
- {
- //only tables with primary key
- $db->setQuery('SHOW FIELDS FROM `'.$tables[$i].'` WHERE LOWER( `Key` ) = \'pri\'');
- if ($db->loadResult())
- {
- $dbprefix = version_compare(JVERSION,'3.0','lt') ? $config->getValue('config.dbprefix') : $config->get('dbprefix'); $key = $i+1;
- $options[$key] = new stdClass;
- $options[$key]->value = str_replace($dbprefix, '', $tables[$i]);
- $options[$key]->text = $tables[$i];
- }
- }
+ // get db object
+ $db = JFactory::getDBO();
+ // get all tables
+ $tables= $db->getTableList();
+ // get config
+ $config = JFactory::getConfig();
+ $dbprefix = version_compare(JVERSION,'3.0','lt') ? $config->getValue('config.dbprefix') : $config->get('dbprefix');
+ $options = array();
+ $options[] = JHtml::_('select.option', '', 'Select an option');
+ for ($i=0; $i < count($tables); $i++)
+ {
+ //only tables with primary key
+ $db->setQuery('SHOW FIELDS FROM `'.$tables[$i].'` WHERE LOWER( `Key` ) = \'pri\'');
+ if ($db->loadResult())
+ {
+ $key = $i+1;
+ $options[$key] = new stdClass;
+ $options[$key]->value = str_replace($dbprefix, '', $tables[$i]);
+ $options[$key]->text = $tables[$i];
+ }
+ }
return $options;
}
}
diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php
index 5d0118887..4ebaaab40 100644
--- a/admin/models/fieldtype.php
+++ b/admin/models/fieldtype.php
@@ -1075,7 +1075,10 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$properties->loadArray($data['properties']);
$data['properties'] = (string) $properties;
}
- elseif (!isset($data['properties']))
+ // Also check permission since the value may be removed due to permissions
+ // Then we do not want to clear it out, but simple ignore the empty properties
+ elseif (!isset($data['properties'])
+ && JFactory::getUser()->authorise('fieldtype.edit.properties', 'com_componentbuilder'))
{
// Set the empty properties to data
$data['properties'] = '';
diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml
index 4c3bc5522..2948f6b46 100644
--- a/admin/models/forms/admin_fields.xml
+++ b/admin/models/forms/admin_fields.xml
@@ -136,7 +136,11 @@
COM_COMPONENTBUILDER_ADMIN_FIELDS_DEFAULT
- COM_COMPONENTBUILDER_ADMIN_FIELDS_SHOW_IN_LIST_VIEW
+ COM_COMPONENTBUILDER_ADMIN_FIELDS_SHOW_IN_ALL_LIST_VIEWS
+
+ COM_COMPONENTBUILDER_ADMIN_FIELDS_ONLY_IN_ADMIN_LIST_VIEW
+
+ COM_COMPONENTBUILDER_ADMIN_FIELDS_ONLY_IN_LINKED_LIST_VIEWS
COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE_DB
diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml
index b31ba9b01..ffefef0af 100644
--- a/admin/models/forms/admin_view.xml
+++ b/admin/models/forms/admin_view.xml
@@ -427,6 +427,8 @@
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITOWN
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITSTATE
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITACCESS
COM_COMPONENTBUILDER_ADMIN_VIEW_COREEDITCREATED_BY
@@ -441,6 +443,8 @@
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITOWN
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITSTATE
+
+ COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITACCESS
COM_COMPONENTBUILDER_ADMIN_VIEW_VIEWEDITCREATED_BY
diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js
index bab3cf26a..5aac85a2b 100644
--- a/admin/models/forms/custom_code.js
+++ b/admin/models/forms/custom_code.js
@@ -308,7 +308,8 @@ function usedin(functioName, ide) {
jQuery('#note-usedin-not').hide();
jQuery('#note-usedin-found').hide();
jQuery('#loading-usedin').show();
- var targets = ['a','b','c','d','e','f','g','h','i','j','k','l']; // if you update this, also update [customcode-codeUsedInHtmlNote]!
+ var targets = ['a','b','c','d','e','f','g','h','i','j','k','l']; // if you update this, also update (below 11) & [customcode-codeUsedInHtmlNote]!
+ var targetNumber = 11;
var run = 0;
var usedinChecker = setInterval(function(){
var target = targets[run];
@@ -321,7 +322,7 @@ function usedin(functioName, ide) {
} else {
jQuery('#usedin-'+target).hide();
}
- if (target === 'i') {
+ if (run == targetNumber) {
jQuery('#loading-usedin').hide();
if (found) {
jQuery('#note-usedin-found').show();
@@ -330,7 +331,7 @@ function usedin(functioName, ide) {
}
}
});
- if (run == 9) {
+ if (run == targetNumber) {
clearInterval(usedinChecker);
}
run++;
diff --git a/admin/models/forms/dynamic_get.xml b/admin/models/forms/dynamic_get.xml
index 04221907e..4895dc4b6 100644
--- a/admin/models/forms/dynamic_get.xml
+++ b/admin/models/forms/dynamic_get.xml
@@ -161,7 +161,6 @@
description="COM_COMPONENTBUILDER_DYNAMIC_GET_DB_TABLE_DESCRIPTION"
class="list_class"
multiple="false"
- default=""
required="false"
button="false"
/>
@@ -581,7 +580,6 @@
description="COM_COMPONENTBUILDER_DYNAMIC_GET_DB_TABLE_MAIN_DESCRIPTION"
class="list_class"
multiple="false"
- default=""
required="true"
button="false"
/>
diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php
index 248622965..1092625a5 100644
--- a/admin/models/joomla_components.php
+++ b/admin/models/joomla_components.php
@@ -1385,7 +1385,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
$value = ComponentbuilderHelper::openValidBase64($item->{$key}, null);
}
- elseif ('json' === $target['not_base64'][$key] && 'xml' === $key) // just for field search
+ elseif (isset($keys['not_base64'][$key]) && 'json' === $keys['not_base64'][$key] && 'xml' === $key) // just for field search
{
$value = json_decode($item->{$key});
}
@@ -1394,11 +1394,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
$value = $item->{$key};
}
// check if we should search for base64 string inside the text
- if (isset($target['base64_search']) && isset($target['base64_search'][$key])
- && isset($target['base64_search'][$key]['start']) && strpos($value, $target['base64_search'][$key]['start']) !== false)
+ if (isset($keys['base64_search']) && isset($keys['base64_search'][$key])
+ && isset($keys['base64_search'][$key]['start']) && strpos($value, $keys['base64_search'][$key]['start']) !== false)
{
// search and open the base64 strings
- $this->searchOpenBase64($value, $target['base64_search'][$key]);
+ $this->searchOpenBase64($value, $keys['base64_search'][$key]);
}
// search the value to see if it has custom code
$codeArray = ComponentbuilderHelper::getAllBetween($value, '[CUSTOMC' . 'ODE=',']');
@@ -1422,10 +1422,14 @@ class ComponentbuilderModelJoomla_components extends JModelList
}
elseif (ComponentbuilderHelper::checkString($func))
{
- if ($funcID = ComponentbuilderHelper::getVar('custom_code', $func, 'function_name', 'id'))
+ if (($funcID = ComponentbuilderHelper::getVar('custom_code', $func, 'function_name', 'id')) !== false && is_numeric($funcID))
{
$this->setSmartIDs($funcID, 'custom_code');
}
+ else
+ {
+ // set a notice that custom code was not found
+ }
}
}
}
@@ -1627,97 +1631,97 @@ class ComponentbuilderModelJoomla_components extends JModelList
* @var array
*/
protected $codeSearchKeys = array(
- // #__componentbuilder_joomla_component
+ // #__componentbuilder_joomla_component (a)
'joomla_component' => array(
- 'search' => array('id', 'system_name', 'php_preflight_install','php_postflight_install',
- 'php_preflight_update','php_postflight_update','php_method_uninstall',
- 'php_helper_admin','php_admin_event','php_helper_both','php_helper_site',
- 'php_site_event','javascript'),
+ 'search' => array('id', 'system_name', 'php_preflight_install', 'php_postflight_install',
+ 'php_preflight_update', 'php_postflight_update', 'php_method_uninstall',
+ 'php_helper_admin', 'php_admin_event', 'php_helper_both', 'php_helper_site',
+ 'php_site_event', 'javascript'),
'views' => 'joomla_components',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_component_dashboard
+ // #__componentbuilder_component_dashboard (b)
'component_dashboard' => array(
- 'search' => array('id', 'joomla_component', 'php_dashboard_methods','dashboard_tab'),
+ 'search' => array('id', 'joomla_component', 'php_dashboard_methods', 'dashboard_tab'),
'views' => 'components_dashboard',
'not_base64' => array('dashboard_tab' => 'json'),
'name' => 'joomla_component->id:joomla_component.system_name'
),
- // #__componentbuilder_admin_view
+ // #__componentbuilder_admin_view (c)
'admin_view' => array(
- 'search' => array('id', 'system_name', 'javascript_view_file','javascript_view_footer',
- 'javascript_views_file','javascript_views_footer','html_import_view',
- 'php_after_delete','php_after_publish','php_ajaxmethod','php_allowedit','php_batchcopy',
- 'php_batchmove','php_before_delete','php_before_publish','php_before_save','php_controller',
- 'php_controller_list','php_document','php_getitem','php_getitems','php_getitems_after_all',
- 'php_getlistquery','php_import','php_import_display','php_import_ext','php_import_headers','php_getform',
- 'php_import_save','php_import_setdata','php_model','php_model_list','php_postsavehook','php_save'),
+ 'search' => array('id', 'system_name', 'javascript_view_file', 'javascript_view_footer',
+ 'javascript_views_file', 'javascript_views_footer', 'html_import_view',
+ 'php_after_delete', 'php_after_publish', 'php_ajaxmethod', 'php_allowedit', 'php_batchcopy',
+ 'php_batchmove', 'php_before_delete', 'php_before_publish', 'php_before_save', 'php_controller',
+ 'php_controller_list', 'php_document', 'php_getitem', 'php_getitems', 'php_getitems_after_all',
+ 'php_getlistquery', 'php_import', 'php_import_display', 'php_import_ext', 'php_import_headers', 'php_getform',
+ 'php_import_save', 'php_import_setdata', 'php_model', 'php_model_list', 'php_postsavehook', 'php_save'),
'views' => 'admin_views',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_admin_fields_relations
+ // #__componentbuilder_admin_fields_relations (d)
'admin_fields_relations' => array(
'search' => array('id', 'admin_view', 'addrelations'),
'views' => 'admins_fields_relations',
'not_base64' => array('addrelations' => 'json'),
'name' => 'admin_view->id:admin_view.system_name'
),
- // #__componentbuilder_custom_admin_view
+ // #__componentbuilder_custom_admin_view (e)
'custom_admin_view' => array(
- 'search' => array('id', 'system_name', 'default','php_view','php_jview','php_jview_display','php_document',
- 'js_document','css_document','css','php_ajaxmethod','php_model','php_controller'),
+ 'search' => array('id', 'system_name', 'default', 'php_view', 'php_jview', 'php_jview_display', 'php_document',
+ 'js_document', 'css_document', 'css', 'php_ajaxmethod', 'php_model', 'php_controller'),
'views' => 'custom_admin_views',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_site_view
+ // #__componentbuilder_site_view (f)
'site_view' => array(
- 'search' => array('id', 'system_name', 'default','php_view','php_jview','php_jview_display','php_document',
- 'js_document','css_document','css','php_ajaxmethod','php_model','php_controller'),
+ 'search' => array('id', 'system_name', 'default', 'php_view', 'php_jview', 'php_jview_display', 'php_document',
+ 'js_document', 'css_document', 'css', 'php_ajaxmethod', 'php_model', 'php_controller'),
'views' => 'site_views',
'not_base64' => array(),
'name' => 'system_name'
),
- // #__componentbuilder_field
+ // #__componentbuilder_field (g)
'field' => array(
- 'search' => array('id', 'name', 'xml','javascript_view_footer','javascript_views_footer'),
+ 'search' => array('id', 'name', 'xml', 'javascript_view_footer', 'javascript_views_footer'),
'views' => 'fields',
'not_base64' => array('xml' => 'json'),
'base64_search' => array('xml' => array('start' => 'type_php', '_start' => '="', 'end' => '"')),
'name' => 'name'
),
- // #__componentbuilder_fieldtype
+ // #__componentbuilder_fieldtype (h)
'fieldtype' => array(
'search' => array('id', 'name', 'properties'),
'views' => 'fieldtypes',
'not_base64' => array('properties' => 'json'),
'name' => 'name'
),
- // #__componentbuilder_dynamic_get
+ // #__componentbuilder_dynamic_get (i)
'dynamic_get' => array(
- 'search' => array('id', 'name', 'php_before_getitem','php_after_getitem','php_before_getitems','php_after_getitems',
+ 'search' => array('id', 'name', 'php_before_getitem', 'php_after_getitem', 'php_before_getitems', 'php_after_getitems',
'php_getlistquery'),
'views' => 'dynamic_gets',
'not_base64' => array(),
'name' => 'name'
),
- // #__componentbuilder_template
+ // #__componentbuilder_template (j)
'template' => array(
- 'search' => array('id', 'name', 'php_view','template'),
+ 'search' => array('id', 'name', 'php_view', 'template'),
'views' => 'templates',
'not_base64' => array(),
'name' => 'name'
),
- // #__componentbuilder_layout
+ // #__componentbuilder_layout (k)
'layout' => array(
- 'search' => array('id', 'name', 'php_view','layout'),
+ 'search' => array('id', 'name', 'php_view', 'layout'),
'views' => 'layouts',
'not_base64' => array(),
'name' => 'name'
),
- // #__componentbuilder_library
+ // #__componentbuilder_library (l)
'library' => array(
'search' => array('id', 'name', 'php_setdocument'),
'views' => 'libraries',
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index ff393a99c..1e1d59123 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -1569,8 +1569,8 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 4, '', ''),
(4, '', 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of ', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides unlimited checkboxes that can be used for multi-select.', '', 1, 2, '', ''),
(5, '', 'Provides a color picker. Enter the color as #ff00ff or pick it from the palet.', 'Color', '{\"properties0\":{\"name\":\"type\",\"example\":\"color\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be color.\"},\"properties1\":{\"name\":\"name\",\"example\":\"backgroundcolor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"default\",\"example\":\"#FFFFFF\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) provides a color when not set.\"},\"properties3\":{\"name\":\"label\",\"example\":\"Background\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Select the background color here.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) tooltip for the form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a color picker when clicking the input box.', '', 1, 2, '', ''),
-(6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties23\":{\"name\":\"type_php_1\",\"example\":\"$db = JFactory::getDBO();\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties24\":{\"name\":\"type_php_2\",\"example\":\"$query = $db->getQuery(true);\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties25\":{\"name\":\"type_php_3\",\"example\":\"$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties26\":{\"name\":\"type_php_4\",\"example\":\"$query->from($db->quoteName(\'###TABLE###\', \'a\'));\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties27\":{\"name\":\"type_php_5\",\"example\":\"$query->where($db->quoteName(\'a.published\') . \' = 1\');\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties28\":{\"name\":\"type_php_6\",\"example\":\"$query->order(\'a.###TEXT### ASC\');\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties29\":{\"name\":\"type_php_7\",\"example\":\"$db->setQuery((string)$query);\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties30\":{\"name\":\"type_php_8\",\"example\":\"$items = $db->loadObjectList();\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties31\":{\"name\":\"type_php_9\",\"example\":\"$options = array();\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties32\":{\"name\":\"type_php_10\",\"example\":\"if ($items)\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties33\":{\"name\":\"type_php_11\",\"example\":\"{\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties34\":{\"name\":\"type_php_12\",\"example\":\"\\\\t$options[] = JHtml::_(\'select.option\', \'\', \'Select an option\');\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties35\":{\"name\":\"type_php_13\",\"example\":\"\\\\tforeach($items as $item)\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties36\":{\"name\":\"type_php_14\",\"example\":\"\\\\t{\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties37\":{\"name\":\"type_php_15\",\"example\":\"\\\\t\\\\t$options[] = JHtml::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties38\":{\"name\":\"type_php_16\",\"example\":\"\\\\t}\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties39\":{\"name\":\"type_php_17\",\"example\":\"}\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties40\":{\"name\":\"type_php_18\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"},\"properties41\":{\"name\":\"type_php_19\",\"example\":\"return $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'provides a drop down list of items entries.', '', 1, 21, '', ''),
-(7, '', 'The a list of users that can be targeting one or more groups and excluded users that already belongs to an item in a view.', 'CustomUser', '{\"properties0\":{\"name\":\"type\",\"example\":\"staffusers\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"\"},\"properties10\":{\"name\":\"hint\",\"example\":\"select a user\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties12\":{\"name\":\"extends\",\"example\":\"user\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties13\":{\"name\":\"table\",\"example\":\"#__users\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The table being linked to. Must be #__users\"},\"properties14\":{\"name\":\"component\",\"example\":\"com_users\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties15\":{\"name\":\"view\",\"example\":\"###view###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties16\":{\"name\":\"views\",\"example\":\"###views###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties17\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties18\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties19\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ set the groups array\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties20\":{\"name\":\"type_php_2\",\"example\":\"$groups = JComponentHelper::getParams(\'com_###component###\')->get(\'###type###\');\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties21\":{\"name\":\"type_php_3\",\"example\":\"return $groups;\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties22\":{\"name\":\"type_phpx_1\",\"example\":\"\\/\\/ To ensure that there is only one record per user\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties23\":{\"name\":\"type_phpx_2\",\"example\":\"\\/\\/ Get a db connection.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties24\":{\"name\":\"type_phpx_3\",\"example\":\"$db = JFactory::getDbo();\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties25\":{\"name\":\"type_phpx_4\",\"example\":\"\\/\\/ Create a new query object.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties26\":{\"name\":\"type_phpx_5\",\"example\":\"$query = $db->getQuery(true);\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties27\":{\"name\":\"type_phpx_6\",\"example\":\"\\/\\/ Select all records from the #__###component###_###view### table from ###CODE### column\\\".\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties28\":{\"name\":\"type_phpx_7\",\"example\":\"$query->select($db->quoteName(\'###CODE###\'));\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties29\":{\"name\":\"type_phpx_8\",\"example\":\"$query->from($db->quoteName(\'#__###component###_###view###\'));\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties30\":{\"name\":\"type_phpx_9\",\"example\":\"$db->setQuery($query);\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties31\":{\"name\":\"type_phpx_10\",\"example\":\"$db->execute();\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties32\":{\"name\":\"type_phpx_11\",\"example\":\"$found = $db->getNumRows();\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties33\":{\"name\":\"type_phpx_12\",\"example\":\"if ($found)\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties34\":{\"name\":\"type_phpx_13\",\"example\":\"{\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties35\":{\"name\":\"type_phpx_14\",\"example\":\"\\\\t\\/\\/ return all users already used\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties36\":{\"name\":\"type_phpx_15\",\"example\":\"\\\\treturn array_unique($db->loadColumn());\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties37\":{\"name\":\"type_phpx_16\",\"example\":\"}\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"},\"properties38\":{\"name\":\"type_phpx_17\",\"example\":\"return null;\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getExcluded method.\"}}', 'Provides list of users.', '', 1, 2, '', ''),
+(6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove the field or set to 0\"},\"properties23\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ Get the user object.\\r\\n\\t\\t$user = JFactory::getUser();\\r\\n\\t\\t\\/\\/ Get the databse object.\\r\\n\\t\\t$db = JFactory::getDBO();\\r\\n\\t\\t$query = $db->getQuery(true);\\r\\n\\t\\t$query->select($db->quoteName(array(\'a.###ID###\',\'a.###TEXT###\'),array(\'###ID###\',\'###CODE_TEXT###\')));\\r\\n\\t\\t$query->from($db->quoteName(\'###TABLE###\', \'a\'));\\r\\n\\t\\t$query->where($db->quoteName(\'a.published\') . \' = 1\');\\r\\n\\t\\t$query->order(\'a.###TEXT### ASC\');\\r\\n\\t\\t\\/\\/ Implement View Level Access (if set in table)\\r\\n\\t\\tif (!$user->authorise(\'core.options\', \'[[[com_component]]]\'))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$columns = $db->getTableColumns(\'###TABLE###\');\\r\\n\\t\\t\\tif(isset($columns[\'access\']))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$groups = implode(\',\', $user->getAuthorisedViewLevels());\\r\\n\\t\\t\\t\\t$query->where(\'a.access IN (\' . $groups . \')\');\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$db->setQuery((string)$query);\\r\\n\\t\\t$items = $db->loadObjectList();\\r\\n\\t\\t$options = array();\\r\\n\\t\\tif ($items)\\r\\n\\t\\t{\\r\\n\\t\\t\\t$options[] = JHtml::_(\'select.option\', \'\', \'Select an option\');\\r\\n\\t\\t\\tforeach($items as $item)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$options[] = JHtml::_(\'select.option\', $item->###ID###, $item->###CODE_TEXT###);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $options;\",\"adjustable\":\"1\",\"description\":\"The php for the getOptions method.\"}}', 'provides a drop down list of items entries.', '', 1, 22, '', ''),
+(7, '', 'The a list of users that can be targeting one or more groups and excluded users that already belongs to an item in a view.', 'CustomUser', '{\"properties0\":{\"name\":\"type\",\"example\":\"staffusers\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"\"},\"properties10\":{\"name\":\"hint\",\"example\":\"select a user\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties12\":{\"name\":\"extends\",\"example\":\"user\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties13\":{\"name\":\"table\",\"example\":\"#__users\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. Must be #__users\"},\"properties14\":{\"name\":\"component\",\"example\":\"com_users\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties15\":{\"name\":\"view\",\"example\":\"###view###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties16\":{\"name\":\"views\",\"example\":\"###views###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties17\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties18\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties19\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ set the groups array\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties20\":{\"name\":\"type_php_2\",\"example\":\"$groups = JComponentHelper::getParams(\'com_###component###\')->get(\'###type###\');\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties21\":{\"name\":\"type_php_3\",\"example\":\"return $groups;\",\"adjustable\":\"1\",\"description\":\"The php for the getGroups method.\"},\"properties22\":{\"name\":\"type_phpx_1\",\"example\":\"\\/\\/ To ensure that there is only one record per user\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties23\":{\"name\":\"type_phpx_2\",\"example\":\"\\/\\/ Get a db connection.\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties24\":{\"name\":\"type_phpx_3\",\"example\":\"$db = JFactory::getDbo();\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties25\":{\"name\":\"type_phpx_4\",\"example\":\"\\/\\/ Create a new query object.\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties26\":{\"name\":\"type_phpx_5\",\"example\":\"$query = $db->getQuery(true);\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties27\":{\"name\":\"type_phpx_6\",\"example\":\"\\/\\/ Select all records from the #__###component###_###view### table from ###CODE### column\\\".\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties28\":{\"name\":\"type_phpx_7\",\"example\":\"$query->select($db->quoteName(\'###CODE###\'));\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties29\":{\"name\":\"type_phpx_8\",\"example\":\"$query->from($db->quoteName(\'#__###component###_###view###\'));\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties30\":{\"name\":\"type_phpx_9\",\"example\":\"$db->setQuery($query);\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties31\":{\"name\":\"type_phpx_10\",\"example\":\"$db->execute();\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties32\":{\"name\":\"type_phpx_11\",\"example\":\"$found = $db->getNumRows();\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties33\":{\"name\":\"type_phpx_12\",\"example\":\"if ($found)\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties34\":{\"name\":\"type_phpx_13\",\"example\":\"{\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties35\":{\"name\":\"type_phpx_14\",\"example\":\"\\\\t\\/\\/ return all users already used\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties36\":{\"name\":\"type_phpx_15\",\"example\":\"\\\\treturn array_unique($db->loadColumn());\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties37\":{\"name\":\"type_phpx_16\",\"example\":\"}\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"},\"properties38\":{\"name\":\"type_phpx_17\",\"example\":\"return null;\",\"adjustable\":\"1\",\"description\":\"The php for the getExcluded method.\"}}', 'Provides list of users.', '', 1, 3, '', ''),
(8, '', 'The Editor field type provides a WYSIWYG editor.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties7\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties8\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties9\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties10\":{\"name\":\"buttons\",\"example\":\"no\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties17\":{\"name\":\"syntax\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) can be used to set the code syntax matching for this field.\"},\"properties11\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties12\":{\"name\":\"editor\",\"example\":\"codemirror|none\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties13\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties14\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties15\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides an editor area field.', '', 1, 9, '', ''),
(9, '', 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value this is entered i', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties5\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'provides a hidden field for saving a form field whose value cannot be altered directly by a user.', '', 1, 2, '', ''),
(10, '', 'The integer form field type provides a select box with a range of integer values. If the field has a value saved, this value is displayed when the page is first loaded. If not, the default value (if any) is selected.', 'Integer', '{\"properties0\":{\"name\":\"type\",\"example\":\"integer\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be integer.\"},\"properties1\":{\"name\":\"name\",\"example\":\"size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Size\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties8\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties9\":{\"name\":\"first\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties10\":{\"name\":\"last\",\"example\":\"20\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties11\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a drop down list of integers between a minimum and maximum.', '', 1, 4, '', ''),
diff --git a/admin/tables/admin_custom_tabs.php b/admin/tables/admin_custom_tabs.php
index d88ba931a..a5bc08eca 100644
--- a/admin/tables/admin_custom_tabs.php
+++ b/admin/tables/admin_custom_tabs.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableAdmin_custom_tabs extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/admin_fields.php b/admin/tables/admin_fields.php
index 28ef203f2..2dc1aec57 100644
--- a/admin/tables/admin_fields.php
+++ b/admin/tables/admin_fields.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableAdmin_fields extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/admin_fields_conditions.php b/admin/tables/admin_fields_conditions.php
index 49b65a33d..34f6c56e4 100644
--- a/admin/tables/admin_fields_conditions.php
+++ b/admin/tables/admin_fields_conditions.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableAdmin_fields_conditions extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/admin_fields_relations.php b/admin/tables/admin_fields_relations.php
index 01826b5b6..0ab6b874b 100644
--- a/admin/tables/admin_fields_relations.php
+++ b/admin/tables/admin_fields_relations.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableAdmin_fields_relations extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php
index 150443336..8fe0ebc6d 100644
--- a/admin/tables/admin_view.php
+++ b/admin/tables/admin_view.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableAdmin_view extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_admin_views.php b/admin/tables/component_admin_views.php
index aa3a92485..ac5022b85 100644
--- a/admin/tables/component_admin_views.php
+++ b/admin/tables/component_admin_views.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_admin_views extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_config.php b/admin/tables/component_config.php
index 9e562d255..7804727af 100644
--- a/admin/tables/component_config.php
+++ b/admin/tables/component_config.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_config extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_custom_admin_menus.php b/admin/tables/component_custom_admin_menus.php
index 0ebad6005..af89b3942 100644
--- a/admin/tables/component_custom_admin_menus.php
+++ b/admin/tables/component_custom_admin_menus.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_custom_admin_menus extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_custom_admin_views.php b/admin/tables/component_custom_admin_views.php
index c7206af27..20ae70960 100644
--- a/admin/tables/component_custom_admin_views.php
+++ b/admin/tables/component_custom_admin_views.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_custom_admin_views extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_dashboard.php b/admin/tables/component_dashboard.php
index be23bf65b..4ef0522ac 100644
--- a/admin/tables/component_dashboard.php
+++ b/admin/tables/component_dashboard.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_dashboard extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_files_folders.php b/admin/tables/component_files_folders.php
index 090751724..24773f565 100644
--- a/admin/tables/component_files_folders.php
+++ b/admin/tables/component_files_folders.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_files_folders extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_mysql_tweaks.php b/admin/tables/component_mysql_tweaks.php
index ff071ac5e..ec8f456f5 100644
--- a/admin/tables/component_mysql_tweaks.php
+++ b/admin/tables/component_mysql_tweaks.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_mysql_tweaks extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_site_views.php b/admin/tables/component_site_views.php
index 8e2ce30f8..c61457cb8 100644
--- a/admin/tables/component_site_views.php
+++ b/admin/tables/component_site_views.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_site_views extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/component_updates.php b/admin/tables/component_updates.php
index c8e33bf90..6c15d4deb 100644
--- a/admin/tables/component_updates.php
+++ b/admin/tables/component_updates.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableComponent_updates extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/custom_admin_view.php b/admin/tables/custom_admin_view.php
index 2569980e4..08f9f30b1 100644
--- a/admin/tables/custom_admin_view.php
+++ b/admin/tables/custom_admin_view.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableCustom_admin_view extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/custom_code.php b/admin/tables/custom_code.php
index de3923e33..5b5373a00 100644
--- a/admin/tables/custom_code.php
+++ b/admin/tables/custom_code.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableCustom_code extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/dynamic_get.php b/admin/tables/dynamic_get.php
index 0dcdc0075..30bafea90 100644
--- a/admin/tables/dynamic_get.php
+++ b/admin/tables/dynamic_get.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableDynamic_get extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/field.php b/admin/tables/field.php
index 6d2401c1b..571d984bb 100644
--- a/admin/tables/field.php
+++ b/admin/tables/field.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableField extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/fieldtype.php b/admin/tables/fieldtype.php
index 0bc70bea9..4802c6356 100644
--- a/admin/tables/fieldtype.php
+++ b/admin/tables/fieldtype.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableFieldtype extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/help_document.php b/admin/tables/help_document.php
index cc01cd702..e5ff1ade1 100644
--- a/admin/tables/help_document.php
+++ b/admin/tables/help_document.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableHelp_document extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php
index 6aa9e33ee..f6c9fcf5d 100644
--- a/admin/tables/joomla_component.php
+++ b/admin/tables/joomla_component.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableJoomla_component extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/language.php b/admin/tables/language.php
index b84563987..4e61d4b6c 100644
--- a/admin/tables/language.php
+++ b/admin/tables/language.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableLanguage extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/language_translation.php b/admin/tables/language_translation.php
index 623eecd69..40371446e 100644
--- a/admin/tables/language_translation.php
+++ b/admin/tables/language_translation.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableLanguage_translation extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/layout.php b/admin/tables/layout.php
index 727ef0b3f..b920c85fb 100644
--- a/admin/tables/layout.php
+++ b/admin/tables/layout.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableLayout extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/library.php b/admin/tables/library.php
index 14f024086..0cfb3c125 100644
--- a/admin/tables/library.php
+++ b/admin/tables/library.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableLibrary extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/library_config.php b/admin/tables/library_config.php
index b016fc649..8eab1bf74 100644
--- a/admin/tables/library_config.php
+++ b/admin/tables/library_config.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableLibrary_config extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/library_files_folders_urls.php b/admin/tables/library_files_folders_urls.php
index a5e6a383b..8d92db97d 100644
--- a/admin/tables/library_files_folders_urls.php
+++ b/admin/tables/library_files_folders_urls.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableLibrary_files_folders_urls extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/server.php b/admin/tables/server.php
index 7db464156..03d864a9e 100644
--- a/admin/tables/server.php
+++ b/admin/tables/server.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableServer extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/site_view.php b/admin/tables/site_view.php
index 177c72261..b06815ead 100644
--- a/admin/tables/site_view.php
+++ b/admin/tables/site_view.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableSite_view extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/snippet.php b/admin/tables/snippet.php
index 835eef950..56541e36d 100644
--- a/admin/tables/snippet.php
+++ b/admin/tables/snippet.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableSnippet extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/snippet_type.php b/admin/tables/snippet_type.php
index bdaa22a63..0e45c1b08 100644
--- a/admin/tables/snippet_type.php
+++ b/admin/tables/snippet_type.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableSnippet_type extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/template.php b/admin/tables/template.php
index 965f5ed2c..7049be28b 100644
--- a/admin/tables/template.php
+++ b/admin/tables/template.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableTemplate extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/tables/validation_rule.php b/admin/tables/validation_rule.php
index 4076e4261..d32186afa 100644
--- a/admin/tables/validation_rule.php
+++ b/admin/tables/validation_rule.php
@@ -220,7 +220,7 @@ class ComponentbuilderTableValidation_rule extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
- return JAccess::getAssetRules($assetId);
+ return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)
diff --git a/admin/views/admin_fields/tmpl/edit.php b/admin/views/admin_fields/tmpl/edit.php
index 29b36f645..185151312 100644
--- a/admin/views/admin_fields/tmpl/edit.php
+++ b/admin/views/admin_fields/tmpl/edit.php
@@ -136,12 +136,18 @@ function checkAdminBehaviour(field) {
jQuery('#'+subID+'__search').prop('checked', false).trigger('change');
jQuery('#'+subID+'__filter').prop('checked', false).trigger('change');
jQuery('#'+subID+'__link').prop('checked', false).trigger('change');
- } else if (1 == value) {
+ } else if (1 == value || 3 == value || 4 == value) {
// get number of items
var numItems = jQuery('.count-the-items1235').length + 10;
// show in list view
if (target[2] == 'list') {
- jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_THE_BSHOW_IN_LIST_VIEWB_OPTION_WILL_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW'), timeout: 5000, status: 'primary', pos: 'top-right'});
+ if (1 == value) {
+ jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED'), timeout: 5000, status: 'primary', pos: 'top-right'});
+ } else if (3 == value) {
+ jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_THE_BONLY_IN_ADMIN_LIST_VIEWB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW_NOT_TO_ANY_LINKED_VIEWS'), timeout: 5000, status: 'primary', pos: 'top-right'});
+ } else if (4 == value) {
+ jQuery.UIkit.notify({message: Joomla.JText._('COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW'), timeout: 5000, status: 'primary', pos: 'top-right'});
+ }
}
// check if the order list already has a value
var orderList = jQuery('#'+subID+'__order_list').val();
diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php
index 9bf6d9b27..19c56b979 100644
--- a/admin/views/admin_fields/view.html.php
+++ b/admin/views/admin_fields/view.html.php
@@ -201,7 +201,9 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
JText::script('COM_COMPONENTBUILDER_THE_BNONE_DBB_OPTION_WILL_REMOVE_THIS_FIELD_FROM_BEING_SAVED_IN_THE_DATABASE');
JText::script('COM_COMPONENTBUILDER_ONLY_USE_THE_BNONE_DBB_OPTION_IF_YOU_ARE_PLANNING_ON_TARGETING_THIS_FIELD_WITH_JAVASCRIPTCUSTOM_PHP_TO_MOVE_ITS_VALUE_INTO_ANOTHER_FIELD_THAT_DOES_GET_SAVED_TO_THE_DATABASE');
- JText::script('COM_COMPONENTBUILDER_THE_BSHOW_IN_LIST_VIEWB_OPTION_WILL_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW');
+ JText::script('COM_COMPONENTBUILDER_THE_BSHOW_IN_ALL_LIST_VIEWSB_OPTION_WILL_ADD_THIS_FIELD_TO_ALL_LIST_VIEWS_ADMIN_AMP_LINKED');
+ JText::script('COM_COMPONENTBUILDER_THE_BONLY_IN_ADMIN_LIST_VIEWB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_ADMIN_LIST_VIEW_NOT_TO_ANY_LINKED_VIEWS');
+ JText::script('COM_COMPONENTBUILDER_THE_BONLY_IN_LINKED_LIST_VIEWSB_OPTION_WILL_ONLY_ADD_THIS_FIELD_TO_THE_LINKED_LIST_VIEW_IF_THIS_VIEW_GETS_LINKED_TO_OTHER_VIEW_NOT_TO_THIS_ADMIN_LIST_VIEW');
JText::script('COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED');
JText::script('COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED');
JText::script('view not acceptable. Error');
diff --git a/componentbuilder.xml b/componentbuilder.xml
index c44cf475f..27842e7dc 100644
--- a/componentbuilder.xml
+++ b/componentbuilder.xml
@@ -1,7 +1,7 @@
COM_COMPONENTBUILDER
- 7th October, 2018
+ 29th October, 2018
Llewellyn van der Merwe
llewellyn@joomlacomponentbuilder.com
http://www.joomlacomponentbuilder.com
diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php
index abb9df196..011153592 100644
--- a/site/helpers/componentbuilder.php
+++ b/site/helpers/componentbuilder.php
@@ -686,6 +686,8 @@ abstract class ComponentbuilderHelper
'description' => $result->description);
// number pointer
$nr = 0;
+ // php tracker (we must try to load alteast 17 rows
+ $phpTracker = array();
// value to check since there are false and null values even 0 in the values returned
$confirmation = '8qvZHoyuFYQqpj0YQbc6F3o5DhBlmS-_-a8pmCZfOVSfANjkmV5LG8pCdAY2JNYu6cB';
// set the headers
@@ -701,6 +703,9 @@ abstract class ComponentbuilderHelper
if (strpos($property['name'], 'type_php') !== false)
{
$addPHP = true;
+ // set the line number
+ $phpLine = (int) preg_replace('/[^0-9]/', '', $property['name']);
+ // set the key
$phpKey = trim(preg_replace('/[0-9]+/', '', $property['name']), '_');
// start array if not already set
if (!isset($field['php'][$phpKey]))
@@ -708,6 +713,8 @@ abstract class ComponentbuilderHelper
$field['php'][$phpKey] = array();
$field['php'][$phpKey]['value'] = array();
$field['php'][$phpKey]['desc'] = $property['description'];
+ // start tracker
+ $phpTracker[$phpKey] = 1;
}
}
// was the settings for the property passed
@@ -718,7 +725,8 @@ abstract class ComponentbuilderHelper
// add the json values
if ($addPHP)
{
- $field['php'][$phpKey]['value'][] = $settings[$property['name']];
+ $field['php'][$phpKey]['value'][$phpLine] = $settings[$property['name']];
+ $phpTracker[$phpKey]++;
}
else
{
@@ -732,7 +740,8 @@ abstract class ComponentbuilderHelper
// add the json values
if ($addPHP)
{
- $field['php'][$phpKey]['value'][] = ($confirmation !== $value) ? $value : $example;
+ $field['php'][$phpKey]['value'][$phpLine] = ($confirmation !== $value) ? $value : $example;
+ $phpTracker[$phpKey]++;
}
else
{
@@ -747,6 +756,25 @@ abstract class ComponentbuilderHelper
// increment the number
$nr++;
}
+ // check if all php is loaded using the tracker
+ if (self::checkString($xml) && isset($phpTracker) && self::checkArray($phpTracker))
+ {
+ foreach ($phpTracker as $phpKey => $start)
+ {
+ if ($start < 30)
+ {
+ // we must search for more code in the xml just incase
+ foreach(range(2, 30) as $t_nr)
+ {
+ $get_ = $phpKey . '_' . $t_nr;
+ if (!isset($field['php'][$phpKey]['value'][$t_nr]) && ($value = self::getValueFromXMLstring($xml, $get_, $confirmation)) !== $confirmation)
+ {
+ $field['php'][$phpKey]['value'][$t_nr] = $value;
+ }
+ }
+ }
+ }
+ }
$field['values'] .= PHP_EOL . "/>";
$field['values_description'] .= '';
// return found field options
@@ -4926,11 +4954,11 @@ abstract class ComponentbuilderHelper
*
* @input array The array to check
*
- * @returns bool true on success
+ * @returns bool/int number of items in array on success
**/
public static function checkArray($array, $removeEmptyString = false)
{
- if (isset($array) && is_array($array) && count((array)$array) > 0)
+ if (isset($array) && is_array($array) && ($nr = count((array)$array)) > 0)
{
// also make sure the empty strings are removed
if ($removeEmptyString)
@@ -4944,7 +4972,7 @@ abstract class ComponentbuilderHelper
}
return self::checkArray($array, false);
}
- return true;
+ return $nr;
}
return false;
}