diff --git a/README.md b/README.md
index 125b619a0..143299669 100644
--- a/README.md
+++ b/README.md
@@ -144,7 +144,7 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 14th November, 2020
++ *Last Build*: 17th November, 2020
+ *Version*: 2.11.7
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/admin/README.txt b/admin/README.txt
index 125b619a0..143299669 100644
--- a/admin/README.txt
+++ b/admin/README.txt
@@ -144,7 +144,7 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
-+ *Last Build*: 14th November, 2020
++ *Last Build*: 17th November, 2020
+ *Version*: 2.11.7
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php
index 58c55d00a..f7c1aa12c 100644
--- a/admin/helpers/compiler/a_Get.php
+++ b/admin/helpers/compiler/a_Get.php
@@ -453,6 +453,13 @@ class Get
*/
public $siteEditView = array();
+ /**
+ * The admin list view filter type
+ *
+ * @var array
+ */
+ public $adminFilterType = array();
+
/**
* The Language target
*
@@ -1477,16 +1484,19 @@ class Get
$this->siteEditView[$array['adminview']] = true;
$this->lang = 'both';
}
+ // set the import/export option for this view
if (isset($array['port']) && $array['port']
&& !$this->addEximport)
{
$this->addEximport = true;
}
+ // set the history tracking option for this view
if (isset($array['history']) && $array['history']
&& !$this->setTagHistory)
{
$this->setTagHistory = true;
}
+ // set the custom field integration for this view
if (isset($array['joomla_fields'])
&& $array['joomla_fields']
&& !$this->setJoomlaFields)
@@ -1499,7 +1509,16 @@ class Get
$array['settings'] = $this->getAdminViewData(
$array['view']
);
-
+ // set the filter option for this view
+ $this->adminFilterType[$array['settings']->name_list_code] = 1; // Side (old) [default for now]
+ if (isset($array['filter'])
+ && is_numeric(
+ $array['filter']
+ )
+ && $array['filter'] > 0)
+ {
+ $this->adminFilterType[$array['settings']->name_list_code] = (int) $array['filter'];
+ }
return $array;
}, array_values($component->addadmin_views)
);
@@ -2175,13 +2194,25 @@ class Get
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$view = $this->db->loadObject();
- // setup view name to use in storing the data
- $name_single = ComponentbuilderHelper::safeString(
- $view->name_single
- );
- $name_list = ComponentbuilderHelper::safeString($view->name_list);
+ // setup single view code names to use in storing the data
+ $view->name_single_code = 'oops_hmm_' . $id;
+ if (isset($view->name_single) && $view->name_single != 'null')
+ {
+ $view->name_single_code = ComponentbuilderHelper::safeString(
+ $view->name_single
+ );
+ }
- // set upater
+ // setup list view code name to use in storing the data
+ $view->name_list_code = 'oops_hmmm_' . $id;
+ if (isset($view->name_list) && $view->name_list != 'null')
+ {
+ $view->name_list_code = ComponentbuilderHelper::safeString(
+ $view->name_list
+ );
+ }
+
+ // set updater
$updater = array(
'unique' => array(
'addfields' => array('table' => 'admin_fields',
@@ -2217,32 +2248,28 @@ class Get
{
$this->customScriptBuilder['token'] = array();
}
- $this->customScriptBuilder['token'][$name_single] = false;
- $this->customScriptBuilder['token'][$name_list] = false;
+ $this->customScriptBuilder['token'][$view->name_single_code] = false;
+ $this->customScriptBuilder['token'][$view->name_list_code] = false;
// set some placeholders
$this->placeholders[$this->hhh . 'view' . $this->hhh]
- = ComponentbuilderHelper::safeString(
- $name_single
- );
+ = $view->name_single_code;
$this->placeholders[$this->hhh . 'views' . $this->hhh]
- = ComponentbuilderHelper::safeString(
- $name_list
- );
+ = $view->name_list_code;
$this->placeholders[$this->hhh . 'View' . $this->hhh]
= ComponentbuilderHelper::safeString(
- $name_single, 'F'
+ $view->name_single, 'F'
);
$this->placeholders[$this->hhh . 'Views' . $this->hhh]
= ComponentbuilderHelper::safeString(
- $name_list, 'F'
+ $view->name_list, 'F'
);
$this->placeholders[$this->hhh . 'VIEW' . $this->hhh]
= ComponentbuilderHelper::safeString(
- $name_single, 'U'
+ $view->name_single, 'U'
);
$this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]
= ComponentbuilderHelper::safeString(
- $name_list, 'U'
+ $view->name_list, 'U'
);
$this->placeholders[$this->bbb . 'view' . $this->ddd]
= $this->placeholders[$this->hhh . 'view' . $this->hhh];
@@ -2274,17 +2301,17 @@ class Get
unset($view->addtables);
// set custom tabs
- $this->customTabs[$name_single] = null;
+ $this->customTabs[$view->name_single_code] = null;
$view->customtabs = (isset($view->customtabs)
&& ComponentbuilderHelper::checkJson($view->customtabs))
? json_decode($view->customtabs, true) : null;
if (ComponentbuilderHelper::checkArray($view->customtabs))
{
// setup custom tabs to global data sets
- $this->customTabs[$name_single] = array_map(
- function ($tab) use ($name_single) {
+ $this->customTabs[$view->name_single_code] = array_map(
+ function ($tab) use (&$view) {
// set the view name
- $tab['view'] = $name_single;
+ $tab['view'] = $view->name_single_code;
// load the dynamic data
$tab['html'] = $this->setPlaceholders(
$this->setDynamicValues($tab['html']),
@@ -2445,11 +2472,11 @@ class Get
// load the field data
$view->fields = array_map(
function ($field) use (
- $name_single, $name_list, &$ignoreFields
+ &$view, &$ignoreFields
) {
// set the field details
$this->setFieldDetails(
- $field, $name_single, $name_list
+ $field, $view->name_single_code, $view->name_list_code
);
// check if this field is a default field OR
// check if this is none database related field
@@ -2480,7 +2507,7 @@ class Get
{
$this->setUpdateSQL(
json_decode($old_view->addfields, true),
- $view->addfields, 'field', $name_single,
+ $view->addfields, 'field', $view->name_single_code,
$ignoreFields
);
}
@@ -2515,7 +2542,7 @@ class Get
foreach ($view->fields as $field)
{
// so first we lock the field name in
- $field_name = $this->getFieldName($field, $name_list);
+ $field_name = $this->getFieldName($field, $view->name_list_code);
// check if the field changed since the last compilation (default fields never change and are always added)
if (!isset($ignoreFields[$field['field']])
&& ComponentbuilderHelper::checkObject(
@@ -2528,7 +2555,7 @@ class Get
$this->setUpdateSQL(
$field['settings']->history->datatype,
$field['settings']->datatype, 'field.datatype',
- $name_single . '.' . $field_name
+ $view->name_single_code . '.' . $field_name
);
}
// check if the datatype lenght changed
@@ -2540,7 +2567,7 @@ class Get
. $field['settings']->history->datalenght_other,
$field['settings']->datalenght
. $field['settings']->datalenght_other,
- 'field.lenght', $name_single . '.' . $field_name
+ 'field.lenght', $view->name_single_code . '.' . $field_name
);
}
// check if the name changed
@@ -2578,13 +2605,13 @@ class Get
);
// only run this if not a multi field
- if (!isset($this->uniqueNames[$name_list]['names'][$field_name]))
+ if (!isset($this->uniqueNames[$view->name_list_code]['names'][$field_name]))
{
// this only works when the field is not multiple of the same field
$this->setUpdateSQL(
$old_field_name, $field_name,
'field.name',
- $name_single . '.' . $field_name
+ $view->name_single_code . '.' . $field_name
);
}
elseif ($old_field_name !== $field_name)
@@ -2597,7 +2624,7 @@ class Get
$this->app->enqueueMessage(
JText::sprintf(
'You have a field called %s that has been added multiple times to the %s view, the name of that field has changed to %s. Normaly we would automaticly add the update SQL to your component, but with multiple fields this does not work automaticly since it could be that noting changed and it just seems like it did. Therefore you will have to do this manualy if it actualy did change!',
- $field_name, $name_single,
+ $field_name, $view->name_single_code,
$old_field_name
), 'Notice'
);
@@ -2619,7 +2646,7 @@ class Get
$this->setUpdateSQL(
ComponentbuilderHelper::safeString(
$old_view->name_single
- ), $name_single, 'table_name', $name_single
+ ), $view->name_single_code, 'table_name', $view->name_single_code
);
}
// loop the mysql table settings
@@ -2634,7 +2661,7 @@ class Get
$this->setUpdateSQL(
$old_view->{'mysql_table_' . $_mysqlTableKey},
$view->{'mysql_table_' . $_mysqlTableKey},
- 'table_' . $_mysqlTableKey, $name_single
+ 'table_' . $_mysqlTableKey, $view->name_single_code
);
}
// check if there is no history on table engine, and it changed from the default/global
@@ -2649,7 +2676,7 @@ class Get
$this->setUpdateSQL(
$_mysqlTableVal['default'],
$view->{'mysql_table_' . $_mysqlTableKey},
- 'table_' . $_mysqlTableKey, $name_single
+ 'table_' . $_mysqlTableKey, $view->name_single_code
);
}
}
@@ -2702,7 +2729,7 @@ class Get
$conditionValue['target_field'][$fieldKey]
= array(
'name' => $this->getFieldName(
- $fieldValues, $name_list
+ $fieldValues, $view->name_list_code
),
'type' => $this->getFieldType(
$fieldValues
@@ -2730,7 +2757,7 @@ class Get
// set the field details
$conditionValue['match_name']
= $this->getFieldName(
- $fieldValue, $name_list
+ $fieldValue, $view->name_list_code
);
$conditionValue['match_type'] = $type;
$conditionValue['match_xml']
@@ -2760,9 +2787,9 @@ class Get
unset($view->addconditions);
// prep the buckets
- $this->fieldRelations[$name_list] = array();
- $this->listJoinBuilder[$name_list] = array();
- $this->listHeadOverRide[$name_list] = array();
+ $this->fieldRelations[$view->name_list_code] = array();
+ $this->listJoinBuilder[$view->name_list_code] = array();
+ $this->listHeadOverRide[$view->name_list_code] = array();
// set the relations
$view->addrelations = (isset($view->addrelations)
&& ComponentbuilderHelper::checkJson($view->addrelations))
@@ -2792,16 +2819,16 @@ class Get
);
}
// check that the arrays are set
- if (!isset($this->fieldRelations[$name_list][(int) $relationsValue['listfield']])
+ if (!isset($this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']])
|| !ComponentbuilderHelper::checkArray(
- $this->fieldRelations[$name_list][(int) $relationsValue['listfield']]
+ $this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']]
))
{
- $this->fieldRelations[$name_list][(int) $relationsValue['listfield']]
+ $this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']]
= array();
}
// load the field relations
- $this->fieldRelations[$name_list][(int) $relationsValue['listfield']][(int) $relationsValue['area']]
+ $this->fieldRelations[$view->name_list_code][(int) $relationsValue['listfield']][(int) $relationsValue['area']]
= $relationsValue;
// load the list joints
if (isset($relationsValue['joinfields'])
@@ -2811,7 +2838,7 @@ class Get
{
foreach ($relationsValue['joinfields'] as $join)
{
- $this->listJoinBuilder[$name_list][(int) $join]
+ $this->listJoinBuilder[$view->name_list_code][(int) $join]
= (int) $join;
}
}
@@ -2829,7 +2856,7 @@ class Get
{
$column_name_lang = $this->langPrefix . '_'
. ComponentbuilderHelper::safeString(
- $name_list, 'U'
+ $view->name_list_code, 'U'
) . '_'
. ComponentbuilderHelper::safeString(
$relationsValue['column_name'], 'U'
@@ -2838,7 +2865,7 @@ class Get
'admin', $column_name_lang,
$relationsValue['column_name']
);
- $this->listHeadOverRide[$name_list][(int) $relationsValue['listfield']]
+ $this->listHeadOverRide[$view->name_list_code][(int) $relationsValue['listfield']]
= $column_name_lang;
}
}
@@ -2848,7 +2875,7 @@ class Get
unset($view->addrelations);
// set linked views
- $this->linkedAdminViews[$name_single] = null;
+ $this->linkedAdminViews[$view->name_single_code] = null;
$view->addlinked_views
= (isset($view->addlinked_views)
&& ComponentbuilderHelper::checkJson($view->addlinked_views))
@@ -2856,7 +2883,7 @@ class Get
if (ComponentbuilderHelper::checkArray($view->addlinked_views))
{
// setup linked views to global data sets
- $this->linkedAdminViews[$name_single] = array_values(
+ $this->linkedAdminViews[$view->name_single_code] = array_values(
$view->addlinked_views
);
}
@@ -2890,7 +2917,7 @@ class Get
$this->setCustomScriptBuilder(
$view->{$scripter},
$scripter_target,
- $name_single,
+ $view->name_single_code,
false,
$guiMapper,
true,
@@ -2903,9 +2930,9 @@ class Get
$view->$scripter, "task=ajax"
) !== false)
{
- if (!$this->customScriptBuilder['token'][$name_single])
+ if (!$this->customScriptBuilder['token'][$view->name_single_code])
{
- $this->customScriptBuilder['token'][$name_single]
+ $this->customScriptBuilder['token'][$view->name_single_code]
= true;
}
}
@@ -2924,7 +2951,7 @@ class Get
$this->setCustomScriptBuilder(
$view->{$scripter},
$scripter,
- $name_single,
+ $view->name_single_code,
false,
array('prefix' => PHP_EOL),
true,
@@ -2956,13 +2983,13 @@ class Get
$this->setCustomScriptBuilder(
$view->{$scripter},
$scripter,
- $name_single,
+ $view->name_single_code,
false,
$guiMapper
);
// check if we have template or layouts to load
- $this->setTemplateAndLayoutData($view->{$scripter}, $name_single);
+ $this->setTemplateAndLayoutData($view->{$scripter}, $view->name_single_code);
unset($view->{$scripter});
}
@@ -2996,7 +3023,7 @@ class Get
);
// check if we have template or layouts to load
- $this->setTemplateAndLayoutData($view->{$button_code_field}, $name_single);
+ $this->setTemplateAndLayoutData($view->{$button_code_field}, $view->name_single_code);
}
}
// set the button array
@@ -3035,7 +3062,7 @@ class Get
$this->setCustomScriptBuilder(
$view->$importScripter,
$importScripter,
- 'import_' . $name_list,
+ 'import_' . $view->name_list_code,
false,
$guiMapper
);
@@ -3045,7 +3072,7 @@ class Get
{
// load the default
$this->customScriptBuilder[$importScripter]['import_'
- . $name_list]
+ . $view->name_list_code]
= ComponentbuilderHelper::getDynamicScripts(
$importScripter, true
);
@@ -3056,7 +3083,7 @@ class Get
if (isset($view->add_php_ajax) && $view->add_php_ajax == 1)
{
// insure the token is added to edit view atleast
- $this->customScriptBuilder['token'][$name_single] = true;
+ $this->customScriptBuilder['token'][$view->name_single_code] = true;
$addAjaxSite = false;
if (isset($this->siteEditView[$id]) && $this->siteEditView[$id])
{
@@ -3075,10 +3102,10 @@ class Get
{
if ($addAjaxSite)
{
- $this->customScriptBuilder['site']['ajax_controller'][$name_single]
+ $this->customScriptBuilder['site']['ajax_controller'][$view->name_single_code]
= array_values($view->ajax_input);
}
- $this->customScriptBuilder['admin']['ajax_controller'][$name_single]
+ $this->customScriptBuilder['admin']['ajax_controller'][$view->name_single_code]
= array_values($view->ajax_input);
$this->addAjax = true;
unset($view->ajax_input);
@@ -3093,7 +3120,7 @@ class Get
$view->php_ajaxmethod,
'admin',
'ajax_model',
- $name_single,
+ $view->name_single_code,
$guiMapper
);
@@ -3103,7 +3130,7 @@ class Get
$view->php_ajaxmethod,
'site',
'ajax_model',
- $name_single,
+ $view->name_single_code,
$guiMapper,
false,
false
@@ -3115,7 +3142,7 @@ class Get
}
}
// activate alias builder
- if (!isset($this->customAliasBuilder[$name_single])
+ if (!isset($this->customAliasBuilder[$view->name_single_code])
&& isset($view->alias_builder_type)
&& 2 == $view->alias_builder_type
&& isset($view->alias_builder)
@@ -3139,9 +3166,9 @@ class Get
if (ComponentbuilderHelper::checkArray($alias_fields))
{
// load the field names
- $this->customAliasBuilder[$name_single] = (array) array_map(
- function ($field) use ($name_list) {
- return $this->getFieldName($field, $name_list);
+ $this->customAliasBuilder[$view->name_single_code] = (array) array_map(
+ function ($field) use (&$view) {
+ return $this->getFieldName($field, $view->name_list_code);
}, $alias_fields
);
}
@@ -3154,8 +3181,8 @@ class Get
if ($view->source == 1 && isset($view->tables))
{
// build and add the SQL dump
- $this->customScriptBuilder['sql'][$name_single]
- = $this->buildSqlDump($view->tables, $name_single, $id);
+ $this->customScriptBuilder['sql'][$view->name_single_code]
+ = $this->buildSqlDump($view->tables, $view->name_single_code, $id);
unset($view->tables);
}
elseif ($view->source == 2 && isset($view->sql))
@@ -3164,15 +3191,15 @@ class Get
$this->setCustomScriptBuilder(
$view->sql,
'sql',
- $name_single
+ $view->name_single_code
);
unset($view->sql);
}
}
// load table settings
- if (!isset($this->mysqlTableSetting[$name_single]))
+ if (!isset($this->mysqlTableSetting[$view->name_single_code]))
{
- $this->mysqlTableSetting[$name_single] = array();
+ $this->mysqlTableSetting[$view->name_single_code] = array();
}
// set mySql Table Settings
foreach (
@@ -3185,12 +3212,12 @@ class Get
)
&& !is_numeric($view->{'mysql_table_' . $_mysqlTableKey}))
{
- $this->mysqlTableSetting[$name_single][$_mysqlTableKey]
+ $this->mysqlTableSetting[$view->name_single_code][$_mysqlTableKey]
= $view->{'mysql_table_' . $_mysqlTableKey};
}
else
{
- $this->mysqlTableSetting[$name_single][$_mysqlTableKey]
+ $this->mysqlTableSetting[$view->name_single_code][$_mysqlTableKey]
= $_mysqlTableVal['default'];
}
// remove the table values since we moved to another object
diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php
index 54e6b867f..934f70b9e 100644
--- a/admin/helpers/compiler/c_Fields.php
+++ b/admin/helpers/compiler/c_Fields.php
@@ -4876,7 +4876,7 @@ class Fields extends Structure
'list' => $_list);
}
// build the filter values
- if ($dbSwitch && (isset($field['filter']) && $field['filter'] == 1)
+ if ($dbSwitch && (isset($field['filter']) && $field['filter'] >= 1)
&& ($listSwitch || $listJoin)
&& (!$multiple && $typeName != 'checkbox'
&& $typeName != 'checkboxes'
@@ -4884,6 +4884,7 @@ class Fields extends Structure
&& $typeName != 'subform'))
{
$this->filterBuilder[$view_name_list][] = array('type' => $typeName,
+ 'multi' => $field['filter'],
'code' => $name,
'lang' => $listLangName,
'database' => $view_name_single,
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index e1fb7fb79..cc96df453 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -842,9 +842,8 @@ class Interpretation extends Fields
JText::_('
WHMCS Error
'), 'Error'
);
$this->app->enqueueMessage(
- JText::sprintf(
- 'The WHMCS class could not be added to this component. You will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes. If you have done this, then please check that you have your own Basic Encryption set in the global settings of JCB. Then open and save this component again, making sure that your WHMCS settings are still correct.',
- $this->libraries[$id]->name
+ JText::_(
+ 'The WHMCS class could not be added to this component. You will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes. If you have done this, then please check that you have your own Basic Encryption set in the global settings of JCB. Then open and save this component again, making sure that your WHMCS settings are still correct.'
), 'Error'
);
@@ -17233,7 +17232,10 @@ class Interpretation extends Fields
public function setFilterFunctions($viewName_single, $viewName_list)
{
- if (isset($this->filterBuilder[$viewName_list])
+ // the old filter type uses these functions
+ if (isset($this->adminFilterType[$viewName_list])
+ && $this->adminFilterType[$viewName_list] == 1
+ && isset($this->filterBuilder[$viewName_list])
&& ComponentbuilderHelper::checkArray(
$this->filterBuilder[$viewName_list]
))
@@ -21201,7 +21203,7 @@ class Interpretation extends Fields
{
$router = PHP_EOL . $this->_t(2) . "case '" . $viewName . "':";
$router .= PHP_EOL . $this->_t(3)
- . "\$id = explode(':', \$segments[$count-1]);";
+ . "\$id = explode(':', \$segments[\$count-1]);";
$router .= PHP_EOL . $this->_t(3) . "\$vars['id'] = (int) \$id[0];";
$router .= PHP_EOL . $this->_t(3) . "\$vars['view'] = '" . $viewName
. "';";
diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php
index 4f44aed65..483ffd83b 100644
--- a/admin/helpers/compiler/f_Infusion.php
+++ b/admin/helpers/compiler/f_Infusion.php
@@ -365,25 +365,10 @@ class Infusion extends Interpretation
// set the target
$this->target = 'admin';
$this->lang = 'admin';
- // reset
- $viewName_single = '';
- $viewName_list = '';
- // set single view
- if (isset($view['settings']->name_single))
- {
- $viewName_single = ComponentbuilderHelper::safeString(
- $view['settings']->name_single
- );
- }
-
- // set list view
- if (isset($view['settings']->name_list))
- {
- $viewName_list = ComponentbuilderHelper::safeString(
- $view['settings']->name_list
- );
- }
+ // set local names
+ $name_single_code = $view['settings']->name_single_code;
+ $name_list_code = $view['settings']->name_list_code;
// set the view placeholders
$this->setViewPlaceholders($view['settings']);
@@ -396,57 +381,68 @@ class Infusion extends Interpretation
&& $view['edit_create_site_view'] > 0)
{
$site_edit_view_array[] = $this->_t(4) . "'"
- . $viewName_single . "'";
+ . $name_single_code . "'";
$this->lang = 'both';
// insure site view does not get removed
$this->removeSiteEditFolder = false;
}
// check if help is being loaded
- $this->checkHelp($viewName_single);
+ $this->checkHelp($name_single_code);
// set custom admin view list links
- $this->setCustomAdminViewListLink($view, $viewName_list);
+ $this->setCustomAdminViewListLink(
+ $view, $name_list_code
+ );
// set view array
- $viewarray[] = $this->_t(4) . "'" . $viewName_single . "' => '"
- . $viewName_list . "'";
+ $viewarray[] = $this->_t(4) . "'"
+ . $name_single_code . "' => '"
+ . $name_list_code . "'";
// set the view names
if (isset($view['settings']->name_single)
&& $view['settings']->name_single != 'null')
{
// set license per view if needed
- $this->setLockLicensePer($viewName_single, $this->target);
- $this->setLockLicensePer($viewName_list, $this->target);
+ $this->setLockLicensePer(
+ $name_single_code, $this->target
+ );
+ $this->setLockLicensePer(
+ $name_list_code, $this->target
+ );
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
$this->triggerEvent(
'jcb_ce_onBeforeBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
- &$viewName_single, &$viewName_list,
+ &$name_single_code,
+ &$name_list_code,
&$this->fileContentStatic,
- &$this->fileContentDynamic[$viewName_single],
+ &$this->fileContentDynamic[$name_single_code],
&$this->placeholders, &$this->hhh)
);
// FIELDSETS <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'FIELDSETS' . $this->hhh]
= $this->setFieldSet(
- $view, $this->componentCodeName, $viewName_single,
- $viewName_list
+ $view, $this->componentCodeName,
+ $name_single_code,
+ $name_list_code
);
// ACCESSCONTROL <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'ACCESSCONTROL' . $this->hhh]
- = $this->setFieldSetAccessControl($viewName_single);
+ = $this->setFieldSetAccessControl(
+ $name_single_code
+ );
// LINKEDVIEWITEMS <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'LINKEDVIEWITEMS' . $this->hhh]
= '';
// ADDTOOLBAR <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'ADDTOOLBAR' . $this->hhh]
= $this->setAddToolBar($view);
@@ -454,29 +450,34 @@ class Infusion extends Interpretation
$this->buildTheViewScript($view);
// VIEW_SCRIPT
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'VIEW_SCRIPT' . $this->hhh]
- = $this->setViewScript($viewName_single, 'fileScript');
+ = $this->setViewScript(
+ $name_single_code, 'fileScript'
+ );
// EDITBODYSCRIPT
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'EDITBODYSCRIPT' . $this->hhh]
= $this->setViewScript(
- $viewName_single, 'footerScript'
+ $name_single_code, 'footerScript'
);
// AJAXTOKE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'AJAXTOKE' . $this->hhh]
- = $this->setAjaxToke($viewName_single);
+ = $this->setAjaxToke(
+ $name_single_code
+ );
// DOCUMENT_CUSTOM_PHP <<>>
if ($phpDocument = $this->getCustomScriptBuilder(
- 'php_document', $viewName_single, PHP_EOL, null, true,
+ 'php_document', $name_single_code,
+ PHP_EOL, null, true,
false
))
{
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'DOCUMENT_CUSTOM_PHP' . $this->hhh]
= str_replace(
'$document->', '$this->document->', $phpDocument
@@ -486,111 +487,127 @@ class Infusion extends Interpretation
}
else
{
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'DOCUMENT_CUSTOM_PHP' . $this->hhh]
= '';
}
// LINKEDVIEWTABLESCRIPTS <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'LINKEDVIEWTABLESCRIPTS' . $this->hhh]
= '';
// VALIDATEFIX <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'VALIDATIONFIX' . $this->hhh]
= $this->setValidationFix(
- $viewName_single,
+ $name_single_code,
$this->fileContentStatic[$this->hhh . 'Component'
. $this->hhh]
);
// EDITBODY <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'EDITBODY' . $this->hhh]
= $this->setEditBody($view);
// EDITBODY <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'EDITBODYFADEIN' . $this->hhh]
= $this->setFadeInEfect($view);
// JTABLECONSTRUCTOR <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JTABLECONSTRUCTOR' . $this->hhh]
- = $this->setJtableConstructor($viewName_single);
+ = $this->setJtableConstructor(
+ $name_single_code
+ );
// JTABLEALIASCATEGORY <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JTABLEALIASCATEGORY' . $this->hhh]
- = $this->setJtableAliasCategory($viewName_single);
+ = $this->setJtableAliasCategory(
+ $name_single_code
+ );
// METHOD_GET_ITEM <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'METHOD_GET_ITEM' . $this->hhh]
- = $this->setMethodGetItem($viewName_single);
+ = $this->setMethodGetItem(
+ $name_single_code
+ );
// LINKEDVIEWGLOBAL <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'LINKEDVIEWGLOBAL' . $this->hhh]
= '';
// LINKEDVIEWMETHODS <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'LINKEDVIEWMETHODS' . $this->hhh]
= '';
// JMODELADMIN_BEFORE_DELETE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_BEFORE_DELETE' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_before_delete', $viewName_single, PHP_EOL
+ 'php_before_delete',
+ $name_single_code, PHP_EOL
);
// JMODELADMIN_AFTER_DELETE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_AFTER_DELETE' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_after_delete', $viewName_single, PHP_EOL . PHP_EOL
+ 'php_after_delete', $name_single_code,
+ PHP_EOL . PHP_EOL
);
// JMODELADMIN_BEFORE_DELETE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_BEFORE_PUBLISH' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_before_publish', $viewName_single, PHP_EOL
+ 'php_before_publish',
+ $name_single_code, PHP_EOL
);
// JMODELADMIN_AFTER_DELETE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_AFTER_PUBLISH' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_after_publish', $viewName_single, PHP_EOL . PHP_EOL
+ 'php_after_publish',
+ $name_single_code, PHP_EOL . PHP_EOL
);
// CHECKBOX_SAVE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'CHECKBOX_SAVE' . $this->hhh]
- = $this->setCheckboxSave($viewName_single);
+ = $this->setCheckboxSave(
+ $name_single_code
+ );
// METHOD_ITEM_SAVE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'METHOD_ITEM_SAVE' . $this->hhh]
- = $this->setMethodItemSave($viewName_single);
+ = $this->setMethodItemSave(
+ $name_single_code
+ );
// POSTSAVEHOOK <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'POSTSAVEHOOK' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_postsavehook', $viewName_single, PHP_EOL, null,
+ 'php_postsavehook', $name_single_code,
+ PHP_EOL, null,
true, PHP_EOL . $this->_t(2) . "return;",
PHP_EOL . PHP_EOL . $this->_t(2) . "return;"
);
// VIEWCSS <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'VIEWCSS' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'css_view', $viewName_single, '', null, true
+ 'css_view', $name_single_code, '',
+ null, true
);
// add css to front end
@@ -600,59 +617,65 @@ class Infusion extends Interpretation
)
&& $view['edit_create_site_view'] > 0)
{
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'SITE_VIEWCSS' . $this->hhh]
- = $this->fileContentDynamic[$viewName_single][$this->hhh
+ = $this->fileContentDynamic[$name_single_code][$this->hhh
. 'VIEWCSS' . $this->hhh];
// check if we should add a create menu
if ($view['edit_create_site_view'] == 2)
{
// SITE_MENU_XML <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'SITE_MENU_XML' . $this->hhh]
= $this->setAdminViewMenu(
- $viewName_single, $view
+ $name_single_code, $view
);
}
// SITE_VIEW_CONTROLLER_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'SITE_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'site.admin.view.controller', $viewName_single
+ 'site.admin.view.controller',
+ $name_single_code
);
// SITE_ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'SITE_ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'site.admin.view.model', $viewName_single
+ 'site.admin.view.model',
+ $name_single_code
);
}
// TABLAYOUTFIELDSARRAY <<>> add the tab layout fields array to the model
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'TABLAYOUTFIELDSARRAY' . $this->hhh]
- = $this->getTabLayoutFieldsArray($viewName_single);
+ = $this->getTabLayoutFieldsArray(
+ $name_single_code
+ );
// ADMIN_VIEW_CONTROLLER_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'admin.view.controller', $viewName_single
+ 'admin.view.controller',
+ $name_single_code
);
// ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'admin.view.model', $viewName_single
+ 'admin.view.model', $name_single_code
);
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
$this->triggerEvent(
'jcb_ce_onAfterBuildAdminEditViewContent',
array(&$this->componentContext, &$view,
- &$viewName_single, &$viewName_list,
+ &$name_single_code,
+ &$name_list_code,
&$this->fileContentStatic,
- &$this->fileContentDynamic[$viewName_single],
+ &$this->fileContentDynamic[$name_single_code],
&$this->placeholders, &$this->hhh)
);
}
@@ -663,7 +686,7 @@ class Infusion extends Interpretation
$this->lang = 'admin';
// ICOMOON <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ICOMOON' . $this->hhh]
= $view['icomoon'];
@@ -671,9 +694,10 @@ class Infusion extends Interpretation
$this->triggerEvent(
'jcb_ce_onBeforeBuildAdminListViewContent',
array(&$this->componentContext, &$view,
- &$viewName_single, &$viewName_list,
+ &$name_single_code,
+ &$name_list_code,
&$this->fileContentStatic,
- &$this->fileContentDynamic[$viewName_list],
+ &$this->fileContentDynamic[$name_list_code],
&$this->placeholders, &$this->hhh)
);
@@ -681,117 +705,135 @@ class Infusion extends Interpretation
if (isset($view['port']) && $view['port']
|| 1 == $view['settings']->add_custom_import)
{
- $this->eximportView[$viewName_list] = true;
+ $this->eximportView[$name_list_code]
+ = true;
if (1 == $view['settings']->add_custom_import)
{
// this view has custom import scripting
- $this->importCustomScripts[$viewName_list] = true;
+ $this->importCustomScripts[$name_list_code]
+ = true;
// set all custom scripts
- $this->setImportCustomScripts($viewName_list);
+ $this->setImportCustomScripts(
+ $name_list_code
+ );
}
}
else
{
- $this->eximportView[$viewName_list] = false;
+ $this->eximportView[$name_list_code]
+ = false;
}
// set Auto check in function
if (isset($view['checkin']) && $view['checkin'] == 1)
{
// AUTOCHECKIN <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'AUTOCHECKIN' . $this->hhh]
= $this->setAutoCheckin(
- $viewName_single, $this->componentCodeName
+ $name_single_code,
+ $this->componentCodeName
);
// CHECKINCALL <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'CHECKINCALL' . $this->hhh]
= $this->setCheckinCall();
}
else
{
// AUTOCHECKIN <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'AUTOCHECKIN' . $this->hhh]
= '';
// CHECKINCALL <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'CHECKINCALL' . $this->hhh]
= '';
}
// admin list file contnet
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ADMIN_JAVASCRIPT_FILE' . $this->hhh]
= $this->setViewScript(
- $viewName_list, 'list_fileScript'
+ $name_list_code, 'list_fileScript'
);
// ADMIN_CUSTOM_BUTTONS_LIST
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ADMIN_CUSTOM_BUTTONS_LIST' . $this->hhh]
= $this->setCustomButtons($view, 3, $this->_t(1));
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST' . $this->hhh]
- = $this->setFunctionOnlyButtons($viewName_list);
+ = $this->setFunctionOnlyButtons(
+ $name_list_code
+ );
// GET_ITEMS_METHOD_STRING_FIX <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'GET_ITEMS_METHOD_STRING_FIX' . $this->hhh]
= $this->setGetItemsMethodStringFix(
- $viewName_single, $viewName_list,
+ $name_single_code,
+ $name_list_code,
$this->fileContentStatic[$this->hhh . 'Component'
. $this->hhh]
);
// GET_ITEMS_METHOD_AFTER_ALL <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'GET_ITEMS_METHOD_AFTER_ALL' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_getitems_after_all', $viewName_single, PHP_EOL
+ 'php_getitems_after_all',
+ $name_single_code, PHP_EOL
);
// SELECTIONTRANSLATIONFIX <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'SELECTIONTRANSLATIONFIX' . $this->hhh]
= $this->setSelectionTranslationFix(
- $viewName_list,
+ $name_list_code,
$this->fileContentStatic[$this->hhh . 'Component'
. $this->hhh]
);
// SELECTIONTRANSLATIONFIXFUNC <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'SELECTIONTRANSLATIONFIXFUNC' . $this->hhh]
= $this->setSelectionTranslationFixFunc(
- $viewName_list,
+ $name_list_code,
$this->fileContentStatic[$this->hhh . 'Component'
. $this->hhh]
);
// FILTER_FIELDS <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'FILTER_FIELDS' . $this->hhh]
- = $this->setFilterFields($viewName_list);
+ = $this->setFilterFields(
+ $name_list_code
+ );
// STOREDID <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'STOREDID' . $this->hhh]
- = $this->setStoredId($viewName_list);
+ = $this->setStoredId($name_list_code);
// POPULATESTATE <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'POPULATESTATE' . $this->hhh]
- = $this->setPopulateState($viewName_list);
+ = $this->setPopulateState(
+ $name_list_code
+ );
// SORTFIELDS <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'SORTFIELDS' . $this->hhh]
- = $this->setSortFields($viewName_list);
+ = $this->setSortFields(
+ $name_list_code
+ );
// CATEGORYFILTER <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'CATEGORYFILTER' . $this->hhh]
- = $this->setCategoryFilter($viewName_list);
+ = $this->setCategoryFilter(
+ $name_list_code
+ );
// CATEGORY_VIEWS
if (!isset(
@@ -806,93 +848,118 @@ class Infusion extends Interpretation
$this->fileContentStatic[$this->hhh
. 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
.= $this->setRouterCategoryViews(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// OTHERFILTERS <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'OTHERFILTERS' . $this->hhh]
- = $this->setOtherFilter($viewName_list);
+ = $this->setOtherFilter(
+ $name_list_code
+ );
// FILTERFUNCTIONS <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'FILTERFUNCTIONS' . $this->hhh]
= $this->setFilterFunctions(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// LISTQUERY <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'LISTQUERY' . $this->hhh]
- = $this->setListQuery($viewName_single, $viewName_list);
+ = $this->setListQuery(
+ $name_single_code,
+ $name_list_code
+ );
// MODELEXPORTMETHOD <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'MODELEXPORTMETHOD' . $this->hhh]
= $this->setGetItemsModelMethod(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// MODELEXIMPORTMETHOD <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'CONTROLLEREXIMPORTMETHOD' . $this->hhh]
= $this->setControllerEximportMethod(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// EXPORTBUTTON <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'EXPORTBUTTON' . $this->hhh]
= $this->setExportButton(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// IMPORTBUTTON <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'IMPORTBUTTON' . $this->hhh]
= $this->setImportButton(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// LISTHEAD <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'LISTHEAD' . $this->hhh]
- = $this->setListHead($viewName_single, $viewName_list);
+ = $this->setListHead(
+ $name_single_code,
+ $name_list_code
+ );
// LISTBODY <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'LISTBODY' . $this->hhh]
- = $this->setListBody($viewName_single, $viewName_list);
+ = $this->setListBody(
+ $name_single_code,
+ $name_list_code
+ );
// LISTCOLNR <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'LISTCOLNR' . $this->hhh]
- = $this->setListColnr($viewName_list);
+ = $this->setListColnr(
+ $name_list_code
+ );
// JVIEWLISTCANDO <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'JVIEWLISTCANDO' . $this->hhh]
= $this->setJviewListCanDo(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// VIEWSCSS <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'VIEWSCSS' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'css_views', $viewName_single, '', null, true
+ 'css_views', $name_single_code, '',
+ null, true
);
// ADMIN_DIPLAY_METHOD <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ADMIN_DIPLAY_METHOD' . $this->hhh]
- = $this->setAdminViewDisplayMethod($viewName_list);
+ = $this->setAdminViewDisplayMethod(
+ $name_list_code
+ );
// VIEWS_FOOTER_SCRIPT <<>>
$scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__)
- . ' ' . $viewName_list . ' footer script';
+ . ' ' . $name_list_code
+ . ' footer script';
if ($footerScript = $this->getCustomScriptBuilder(
- 'views_footer', $viewName_single, '', $scriptNote, true,
+ 'views_footer', $name_single_code, '',
+ $scriptNote, true,
false, PHP_EOL
))
{
@@ -907,7 +974,7 @@ class Infusion extends Interpretation
// clear some memory
unset($minifier);
}
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'VIEWS_FOOTER_SCRIPT' . $this->hhh]
= PHP_EOL . '";
@@ -916,138 +983,158 @@ class Infusion extends Interpretation
}
else
{
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'VIEWS_FOOTER_SCRIPT' . $this->hhh]
= '';
}
// ADMIN_VIEWS_CONTROLLER_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'admin.views.controller', $viewName_list
+ 'admin.views.controller',
+ $name_list_code
);
// ADMIN_VIEWS_MODEL_HEADER <<>> add the header details for the model
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'ADMIN_VIEWS_MODEL_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'admin.views.model', $viewName_list
+ 'admin.views.model', $name_list_code
);
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
$this->triggerEvent(
'jcb_ce_onAfterBuildAdminListViewContent',
array(&$this->componentContext, &$view,
- &$viewName_single, &$viewName_list,
+ &$name_single_code,
+ &$name_list_code,
&$this->fileContentStatic,
- &$this->fileContentDynamic[$viewName_list],
+ &$this->fileContentDynamic[$name_list_code],
&$this->placeholders, &$this->hhh)
);
}
// set u fields used in batch
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'UNIQUEFIELDS' . $this->hhh]
- = $this->setUniqueFields($viewName_single);
+ = $this->setUniqueFields(
+ $name_single_code
+ );
// TITLEALIASFIX <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'TITLEALIASFIX' . $this->hhh]
- = $this->setAliasTitleFix($viewName_single);
+ = $this->setAliasTitleFix(
+ $name_single_code
+ );
// GENERATENEWTITLE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'GENERATENEWTITLE' . $this->hhh]
- = $this->setGenerateNewTitle($viewName_single);
+ = $this->setGenerateNewTitle(
+ $name_single_code
+ );
// GENERATENEWALIAS <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'GENERATENEWALIAS' . $this->hhh]
- = $this->setGenerateNewAlias($viewName_single);
+ = $this->setGenerateNewAlias(
+ $name_single_code
+ );
// MODEL_BATCH_COPY <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'MODEL_BATCH_COPY' . $this->hhh]
- = $this->setBatchCopy($viewName_single);
+ = $this->setBatchCopy($name_single_code);
// MODEL_BATCH_MOVE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'MODEL_BATCH_MOVE' . $this->hhh]
- = $this->setBatchMove($viewName_single);
+ = $this->setBatchMove($name_single_code);
// BATCH_ONCLICK_CANCEL_SCRIPT <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh]
= ''; // TODO <-- must still be build
// JCONTROLLERFORM_ALLOWADD <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JCONTROLLERFORM_ALLOWADD' . $this->hhh]
= $this->setJcontrollerAllowAdd(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// JCONTROLLERFORM_BEFORECANCEL <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_before_cancel', $viewName_single, PHP_EOL, null, null,
+ 'php_before_cancel', $name_single_code,
+ PHP_EOL, null, null,
''
);
// JCONTROLLERFORM_AFTERCANCEL <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh]
= $this->getCustomScriptBuilder(
- 'php_after_cancel', $viewName_single, PHP_EOL, null, null,
+ 'php_after_cancel', $name_single_code,
+ PHP_EOL, null, null,
''
);
// JCONTROLLERFORM_ALLOWEDIT <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh]
= $this->setJcontrollerAllowEdit(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// JMODELADMIN_GETFORM <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_GETFORM' . $this->hhh]
= $this->setJmodelAdminGetForm(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// JMODELADMIN_ALLOWEDIT <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_ALLOWEDIT' . $this->hhh]
= $this->setJmodelAdminAllowEdit(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// JMODELADMIN_CANDELETE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_CANDELETE' . $this->hhh]
= $this->setJmodelAdminCanDelete(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// JMODELADMIN_CANEDITSTATE <<>>
- $this->fileContentDynamic[$viewName_single][$this->hhh
+ $this->fileContentDynamic[$name_single_code][$this->hhh
. 'JMODELADMIN_CANEDITSTATE' . $this->hhh]
= $this->setJmodelAdminCanEditState(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// set custom admin view Toolbare buttons
// CUSTOM_ADMIN_DYNAMIC_BUTTONS <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'CUSTOM_ADMIN_DYNAMIC_BUTTONS' . $this->hhh]
- = $this->setCustomAdminDynamicButton($viewName_list);
+ = $this->setCustomAdminDynamicButton(
+ $name_list_code
+ );
// CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER <<>>
- $this->fileContentDynamic[$viewName_list][$this->hhh
+ $this->fileContentDynamic[$name_list_code][$this->hhh
. 'CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER' . $this->hhh]
= $this->setCustomAdminDynamicButtonController(
- $viewName_list
+ $name_list_code
);
// set helper router
@@ -1062,7 +1149,10 @@ class Infusion extends Interpretation
}
$this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
. $this->hhh]
- .= $this->setRouterHelp($viewName_single, $viewName_list);
+ .= $this->setRouterHelp(
+ $name_single_code,
+ $name_list_code
+ );
if (isset($view['edit_create_site_view'])
&& is_numeric(
@@ -1074,11 +1164,13 @@ class Infusion extends Interpretation
$this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
. $this->hhh]
.= $this->routerParseSwitch(
- $viewName_single, null, false
+ $name_single_code, null, false
);
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
. $this->hhh]
- .= $this->routerBuildViews($viewName_single);
+ .= $this->routerBuildViews(
+ $name_single_code
+ );
}
// ACCESS_SECTIONS
@@ -1094,7 +1186,8 @@ class Infusion extends Interpretation
$this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
. $this->hhh]
.= $this->setAccessSectionsCategory(
- $viewName_single, $viewName_list
+ $name_single_code,
+ $name_list_code
);
// set the Joomla Fields ACCESS section if needed
if (isset($view['joomla_fields'])
@@ -1108,8 +1201,10 @@ class Infusion extends Interpretation
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
$this->triggerEvent(
'jcb_ce_onAfterBuildAdminViewContent',
- array(&$this->componentContext, &$view, &$viewName_single,
- &$viewName_list, &$this->fileContentStatic,
+ array(&$this->componentContext, &$view,
+ &$name_single_code,
+ &$name_list_code,
+ &$this->fileContentStatic,
&$this->fileContentDynamic, &$this->placeholders,
&$this->hhh)
);
@@ -1368,7 +1463,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'custom.admin.view.controller', $view['settings']->code
+ 'custom.admin.view.controller',
+ $view['settings']->code
);
// CUSTOM_ADMIN_VIEW_MODEL_HEADER <<>> add the header details for the model
$this->fileContentDynamic[$view['settings']->code][$this->hhh
@@ -1383,7 +1479,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh
. 'CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh]
= $this->setClassHeaders(
- 'custom.admin.views.controller', $view['settings']->code
+ 'custom.admin.views.controller',
+ $view['settings']->code
);
// CUSTOM_ADMIN_VIEWS_MODEL_HEADER <<>> add the header details for the model
$this->fileContentDynamic[$view['settings']->code][$this->hhh
@@ -1689,7 +1786,7 @@ class Infusion extends Interpretation
.= $this->setRouterHelp(
$view['settings']->code, $view['settings']->code, true
);
- // build route details
+ // build route details
$this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
. $this->hhh]
.= $this->routerParseSwitch(
@@ -2214,109 +2311,112 @@ class Infusion extends Interpretation
$this->clearFromPlaceHolders('view');
// VIEW <<>>
- if (isset($view->name_single))
+ if (isset($view->name_single) && $view->name_single != 'null')
{
// set main keys
- $viewName_single = ComponentbuilderHelper::safeString(
- $view->name_single
- );
- $viewName_u = ComponentbuilderHelper::safeString(
+ $name_single_code = $view->name_single_code;
+ $name_single_uppercase = ComponentbuilderHelper::safeString(
$view->name_single, 'U'
);
- $viewName_f = ComponentbuilderHelper::safeString(
+ $name_single_first_uppercase = ComponentbuilderHelper::safeString(
$view->name_single, 'F'
);
// set some place holder for the views
$this->placeholders[$this->hhh . 'view' . $this->hhh]
- = $viewName_single;
- $this->placeholders[$this->hhh . 'View' . $this->hhh] = $viewName_f;
- $this->placeholders[$this->hhh . 'VIEW' . $this->hhh] = $viewName_u;
+ = $name_single_code;
+ $this->placeholders[$this->hhh . 'View' . $this->hhh]
+ = $name_single_first_uppercase;
+ $this->placeholders[$this->hhh . 'VIEW' . $this->hhh]
+ = $name_single_uppercase;
$this->placeholders[$this->bbb . 'view' . $this->ddd]
- = $viewName_single;
- $this->placeholders[$this->bbb . 'View' . $this->ddd] = $viewName_f;
- $this->placeholders[$this->bbb . 'VIEW' . $this->ddd] = $viewName_u;
+ = $name_single_code;
+ $this->placeholders[$this->bbb . 'View' . $this->ddd]
+ = $name_single_first_uppercase;
+ $this->placeholders[$this->bbb . 'VIEW' . $this->ddd]
+ = $name_single_uppercase;
}
// VIEWS <<>>
- if (isset($view->name_list))
+ if (isset($view->name_list) && $view->name_list != 'null')
{
- $viewName_list = ComponentbuilderHelper::safeString(
- $view->name_list
- );
- $viewsName_u = ComponentbuilderHelper::safeString(
+ $name_list_code = $view->name_list_code;
+ $name_list_uppercase = ComponentbuilderHelper::safeString(
$view->name_list, 'U'
);
- $viewsName_f = ComponentbuilderHelper::safeString(
+ $name_list_first_uppercase = ComponentbuilderHelper::safeString(
$view->name_list, 'F'
);
// set some place holder for the views
$this->placeholders[$this->hhh . 'views' . $this->hhh]
- = $viewName_list;
+ = $name_list_code;
$this->placeholders[$this->hhh . 'Views' . $this->hhh]
- = $viewsName_f;
+ = $name_list_first_uppercase;
$this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]
- = $viewsName_u;
+ = $name_list_uppercase;
$this->placeholders[$this->bbb . 'views' . $this->ddd]
- = $viewName_list;
+ = $name_list_code;
$this->placeholders[$this->bbb . 'Views' . $this->ddd]
- = $viewsName_f;
+ = $name_list_first_uppercase;
$this->placeholders[$this->bbb . 'VIEWS' . $this->ddd]
- = $viewsName_u;
+ = $name_list_uppercase;
}
// view <<>>
- if (isset($viewName_single))
+ if (isset($name_single_code))
{
- $this->fileContentDynamic[$viewName_single][$this->hhh . 'view'
+ $this->fileContentDynamic[$name_single_code][$this->hhh . 'view'
. $this->hhh]
- = $viewName_single;
- $this->fileContentDynamic[$viewName_single][$this->hhh . 'VIEW'
+ = $name_single_code;
+ $this->fileContentDynamic[$name_single_code][$this->hhh . 'VIEW'
. $this->hhh]
- = $viewName_u;
- $this->fileContentDynamic[$viewName_single][$this->hhh . 'View'
+ = $name_single_uppercase;
+ $this->fileContentDynamic[$name_single_code][$this->hhh . 'View'
. $this->hhh]
- = $viewName_f;
+ = $name_single_first_uppercase;
- if (isset($viewName_list))
+ if (isset($name_list_code))
{
- $this->fileContentDynamic[$viewName_list][$this->hhh . 'view'
+ $this->fileContentDynamic[$name_list_code][$this->hhh . 'view'
. $this->hhh]
- = $viewName_single;
- $this->fileContentDynamic[$viewName_list][$this->hhh . 'VIEW'
+ = $name_single_code;
+ $this->fileContentDynamic[$name_list_code][$this->hhh . 'VIEW'
. $this->hhh]
- = $viewName_u;
- $this->fileContentDynamic[$viewName_list][$this->hhh . 'View'
+ = $name_single_uppercase;
+ $this->fileContentDynamic[$name_list_code][$this->hhh . 'View'
. $this->hhh]
- = $viewName_f;
+ = $name_single_first_uppercase;
}
}
// views <<>>
- if (isset($viewName_list))
+ if (isset($name_list_code))
{
- $this->fileContentDynamic[$viewName_list][$this->hhh . 'views'
+ $this->fileContentDynamic[$name_list_code][$this->hhh . 'views'
. $this->hhh]
- = $viewName_list;
- $this->fileContentDynamic[$viewName_list][$this->hhh . 'VIEWS'
+ = $name_list_code;
+ $this->fileContentDynamic[$name_list_code][$this->hhh . 'VIEWS'
. $this->hhh]
- = $viewsName_u;
- $this->fileContentDynamic[$viewName_list][$this->hhh . 'Views'
+ = $name_list_uppercase;
+ $this->fileContentDynamic[$name_list_code][$this->hhh . 'Views'
. $this->hhh]
- = $viewsName_f;
+ = $name_list_first_uppercase;
- if (isset($viewName_single))
+ if (isset($name_single_code))
{
- $this->fileContentDynamic[$viewName_single][$this->hhh . 'views'
+ $this->fileContentDynamic[$name_single_code][$this->hhh
+ . 'views'
. $this->hhh]
- = $viewName_list;
- $this->fileContentDynamic[$viewName_single][$this->hhh . 'VIEWS'
+ = $name_list_code;
+ $this->fileContentDynamic[$name_single_code][$this->hhh
+ . 'VIEWS'
. $this->hhh]
- = $viewsName_u;
- $this->fileContentDynamic[$viewName_single][$this->hhh . 'Views'
+ = $name_list_uppercase;
+ $this->fileContentDynamic[$name_single_code][$this->hhh
+ . 'Views'
. $this->hhh]
- = $viewsName_f;
+ = $name_list_first_uppercase;
}
}
}
diff --git a/admin/models/forms/component_admin_views.xml b/admin/models/forms/component_admin_views.xml
index 3e9d65516..a5d7a72ee 100644
--- a/admin/models/forms/component_admin_views.xml
+++ b/admin/models/forms/component_admin_views.xml
@@ -106,7 +106,7 @@
layout="repeatablejcb"
multiple="true"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_ADDADMIN_VIEWS_DESCRIPTION"
- default="[{"submenu":"1","checkin":"1","history":"1","access":"1","port":"1","filter":"1"}]"
+ default="[{"submenu":"1","checkin":"1","history":"1","access":"1","port":"1","filter":"2"}]"
icon="list"
min="1">