Moved all placeholder behaviour to class function. Moved dynamic content to the content class.
This commit is contained in:
@ -99,7 +99,7 @@ class Compiler extends Infusion
|
||||
$this->repoPath = $this->params->get('git_folder_path', null);
|
||||
}
|
||||
// remove site folder if not needed (TODO add check if custom script was moved to site folder then we must do a more complex cleanup here)
|
||||
if ($this->removeSiteFolder && $this->removeSiteEditFolder)
|
||||
if (CFactory::_('Config')->remove_site_folder && CFactory::_('Config')->remove_site_edit_folder)
|
||||
{
|
||||
// first remove the files and folders
|
||||
$this->removeFolder($this->componentPath . '/site');
|
||||
@ -397,9 +397,9 @@ class Compiler extends Infusion
|
||||
// now we do the dynamic files
|
||||
foreach ($this->newFiles['dynamic'] as $view => $files)
|
||||
{
|
||||
if (isset($this->fileContentDynamic[$view])
|
||||
if (CFactory::_('Content')->exist_($view)
|
||||
&& ArrayHelper::check(
|
||||
$this->fileContentDynamic[$view]
|
||||
CFactory::_('Content')->get_($view)
|
||||
))
|
||||
{
|
||||
foreach ($files as $file)
|
||||
@ -417,7 +417,7 @@ class Compiler extends Infusion
|
||||
}
|
||||
}
|
||||
// free up some memory
|
||||
unset($this->fileContentDynamic[$view]);
|
||||
CFactory::_('Content')->remove_($view);
|
||||
}
|
||||
// free up some memory
|
||||
unset($this->newFiles['dynamic']);
|
||||
@ -498,7 +498,7 @@ class Compiler extends Infusion
|
||||
}
|
||||
// free up some memory
|
||||
unset($this->newFiles[$module->key]);
|
||||
unset($this->fileContentDynamic[$module->key]);
|
||||
CFactory::_('Content')->remove_($module->key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -579,7 +579,7 @@ class Compiler extends Infusion
|
||||
}
|
||||
// free up some memory
|
||||
unset($this->newFiles[$plugin->key]);
|
||||
unset($this->fileContentDynamic[$plugin->key]);
|
||||
CFactory::_('Content')->remove_($plugin->key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -607,7 +607,7 @@ class Compiler extends Infusion
|
||||
}
|
||||
// free up some memory
|
||||
unset($this->newFiles[$power->key]);
|
||||
unset($this->fileContentDynamic[$power->key]);
|
||||
CFactory::_('Content')->remove_($power->key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -661,7 +661,7 @@ class Compiler extends Infusion
|
||||
if ($view)
|
||||
{
|
||||
$answer = CFactory::_('Placeholder')->update(
|
||||
$answer, $this->fileContentDynamic[$view], 3
|
||||
$answer, CFactory::_('Content')->get_($view), 3
|
||||
);
|
||||
}
|
||||
// check if this file needs extra care :)
|
||||
@ -1421,8 +1421,8 @@ class Compiler extends Infusion
|
||||
$target['id']
|
||||
);
|
||||
$data = $placeholder['start'] . PHP_EOL
|
||||
. CFactory::_('Placeholder')->update(
|
||||
$target['code'], CFactory::_('Placeholder')->active
|
||||
. CFactory::_('Placeholder')->update_(
|
||||
$target['code']
|
||||
) . $placeholder['end'] . PHP_EOL;
|
||||
if ($target['type'] == 2)
|
||||
{
|
||||
|
@ -2275,49 +2275,31 @@ class Get
|
||||
CFactory::_('Customcode.Dispenser')->hub['token'][$view->name_single_code]
|
||||
= false;
|
||||
CFactory::_('Customcode.Dispenser')->hub['token'][$view->name_list_code] = false;
|
||||
|
||||
// set some placeholders
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('view')]
|
||||
= $view->name_single_code;
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('views')]
|
||||
= $view->name_list_code;
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('View')]
|
||||
= StringHelper::safe(
|
||||
CFactory::_('Placeholder')->set('view', $view->name_single_code);
|
||||
CFactory::_('Placeholder')->set('views', $view->name_list_code);
|
||||
CFactory::_('Placeholder')->set('View', StringHelper::safe(
|
||||
$view->name_single, 'F'
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('Views')]
|
||||
= StringHelper::safe(
|
||||
));
|
||||
CFactory::_('Placeholder')->set('Views', StringHelper::safe(
|
||||
$view->name_list, 'F'
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('VIEW')]
|
||||
= StringHelper::safe(
|
||||
));
|
||||
CFactory::_('Placeholder')->set('VIEW', StringHelper::safe(
|
||||
$view->name_single, 'U'
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')]
|
||||
= StringHelper::safe(
|
||||
));
|
||||
CFactory::_('Placeholder')->set('VIEWS', StringHelper::safe(
|
||||
$view->name_list, 'U'
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('view')]
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('view')];
|
||||
CFactory::_('Placeholder')->active[Placefix::_('views')]
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('views')];
|
||||
CFactory::_('Placeholder')->active[Placefix::_('View')]
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('View')];
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Views')]
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('Views')];
|
||||
CFactory::_('Placeholder')->active[Placefix::_('VIEW')]
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('VIEW')];
|
||||
CFactory::_('Placeholder')->active[Placefix::_('VIEWS')]
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')];
|
||||
));
|
||||
|
||||
// for plugin event TODO change event api signatures
|
||||
$this->placeholders = CFactory::_('Placeholder')->active;
|
||||
$placeholders = CFactory::_('Placeholder')->active;
|
||||
// Trigger Event: jcb_ce_onBeforeModelViewData
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onBeforeModelViewData',
|
||||
array(&$this->componentContext, &$view, &$this->placeholders)
|
||||
array(&$this->componentContext, &$view, &$placeholders)
|
||||
);
|
||||
// for plugin event TODO change event api signatures
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
unset($placeholders);
|
||||
|
||||
// add the tables
|
||||
$view->addtables = (isset($view->addtables)
|
||||
@ -2343,9 +2325,8 @@ class Get
|
||||
// set the view name
|
||||
$tab['view'] = $view->name_single_code;
|
||||
// load the dynamic data
|
||||
$tab['html'] = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($tab['html']),
|
||||
CFactory::_('Placeholder')->active
|
||||
$tab['html'] = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($tab['html'])
|
||||
);
|
||||
// set the tab name
|
||||
$tab['name'] = (isset($tab['name'])
|
||||
@ -2425,7 +2406,7 @@ class Get
|
||||
$tab['lang_permission_desc'] = $tab['lang']
|
||||
. '_TAB_PERMISSION_DESC';
|
||||
$tab['lang_permission_title']
|
||||
= CFactory::_('Placeholder')->active[Placefix::_h('Views')] . ' View '
|
||||
= CFactory::_('Placeholder')->get('Views') . ' View '
|
||||
. $tab['name'] . ' Tab';
|
||||
CFactory::_('Language')->set(
|
||||
'both', $tab['lang_permission'],
|
||||
@ -2435,7 +2416,7 @@ class Get
|
||||
'both', $tab['lang_permission_desc'],
|
||||
'Allow the users in this group to view '
|
||||
. $tab['name'] . ' Tab of '
|
||||
. CFactory::_('Placeholder')->active[Placefix::_h('views')]
|
||||
. CFactory::_('Placeholder')->get('views')
|
||||
);
|
||||
// set the sort key
|
||||
$tab['sortKey']
|
||||
@ -3261,28 +3242,21 @@ class Get
|
||||
}
|
||||
|
||||
// for plugin event TODO change event api signatures
|
||||
$this->placeholders = CFactory::_('Placeholder')->active;
|
||||
$placeholders = CFactory::_('Placeholder')->active;
|
||||
// Trigger Event: jcb_ce_onAfterModelViewData
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onAfterModelViewData',
|
||||
array(&$this->componentContext, &$view, &$this->placeholders)
|
||||
array(&$this->componentContext, &$view, &$placeholders)
|
||||
);
|
||||
// for plugin event TODO change event api signatures
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
unset($placeholders);
|
||||
|
||||
// clear placeholders
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_h('view')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_h('views')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_h('View')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_h('Views')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_h('VIEW')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('view')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('views')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('View')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('Views')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('VIEW')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('VIEWS')]);
|
||||
CFactory::_('Placeholder')->remove('view');
|
||||
CFactory::_('Placeholder')->remove('views');
|
||||
CFactory::_('Placeholder')->remove('View');
|
||||
CFactory::_('Placeholder')->remove('Views');
|
||||
CFactory::_('Placeholder')->remove('VIEW');
|
||||
CFactory::_('Placeholder')->remove('VIEWS');
|
||||
|
||||
// store this view to class object
|
||||
$this->_adminViewData[$id] = $view;
|
||||
@ -4272,10 +4246,10 @@ class Get
|
||||
$option2['operator']
|
||||
= $operatorArray[$option2['operator']];
|
||||
$option2['state_key']
|
||||
= CFactory::_('Placeholder')->update(
|
||||
= CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
$option2['state_key']
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
);
|
||||
$option2['key'] = $result->key;
|
||||
}
|
||||
@ -6884,8 +6858,8 @@ class Get
|
||||
$guiMapper = array('table' => 'joomla_module',
|
||||
'id' => (int) $id, 'type' => 'php');
|
||||
// update the name if it has dynamic values
|
||||
$module->name = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($module->name), CFactory::_('Placeholder')->active
|
||||
$module->name = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($module->name)
|
||||
);
|
||||
// set safe class function name
|
||||
$module->code_name
|
||||
@ -6927,22 +6901,17 @@ class Get
|
||||
$module->key, CFactory::_('Config')->lang_prefix, $module->official_name
|
||||
);
|
||||
// set some placeholder for this module
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Module_name')]
|
||||
= $module->official_name;
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Module')]
|
||||
= ucfirst(
|
||||
CFactory::_('Placeholder')->set('Module_name', $module->official_name);
|
||||
CFactory::_('Placeholder')->set('Module', ucfirst(
|
||||
$module->code_name
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('module')]
|
||||
= strtolower(
|
||||
));
|
||||
CFactory::_('Placeholder')->set('module', strtolower(
|
||||
$module->code_name
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('module.version')]
|
||||
= $module->module_version;
|
||||
CFactory::_('Placeholder')->active[Placefix::_('module_version')]
|
||||
= str_replace(
|
||||
));
|
||||
CFactory::_('Placeholder')->set('module.version', $module->module_version);
|
||||
CFactory::_('Placeholder')->set('module_version', str_replace(
|
||||
'.', '_', $module->module_version
|
||||
);
|
||||
));
|
||||
// set description (TODO) add description field to module
|
||||
if (!isset($module->description)
|
||||
|| !StringHelper::check(
|
||||
@ -6953,9 +6922,8 @@ class Get
|
||||
}
|
||||
else
|
||||
{
|
||||
$module->description = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($module->description),
|
||||
CFactory::_('Placeholder')->active
|
||||
$module->description = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($module->description)
|
||||
);
|
||||
CFactory::_('Language')->set(
|
||||
$module->key, $module->lang_prefix . '_DESCRIPTION',
|
||||
@ -6982,9 +6950,8 @@ class Get
|
||||
// update the readme if set
|
||||
if ($module->addreadme == 1 && !empty($module->readme))
|
||||
{
|
||||
$module->readme = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update(base64_decode($module->readme)),
|
||||
CFactory::_('Placeholder')->active
|
||||
$module->readme = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(base64_decode($module->readme))
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -7022,12 +6989,12 @@ class Get
|
||||
// base64 Decode code
|
||||
$module->class_helper_header = PHP_EOL
|
||||
. CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode(
|
||||
$module->class_helper_header
|
||||
)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
) . PHP_EOL;
|
||||
@ -7041,10 +7008,10 @@ class Get
|
||||
$guiMapper['field'] = 'class_helper_code';
|
||||
// base64 Decode code
|
||||
$module->class_helper_code = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($module->class_helper_code)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7071,10 +7038,10 @@ class Get
|
||||
// set GUI mapper field
|
||||
$guiMapper['field'] = 'mod_code';
|
||||
$module->mod_code = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($module->mod_code)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7099,10 +7066,10 @@ class Get
|
||||
// set GUI mapper field
|
||||
$guiMapper['field'] = 'default_header';
|
||||
$module->default_header = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($module->default_header)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7119,10 +7086,10 @@ class Get
|
||||
$guiMapper['field'] = 'default';
|
||||
$guiMapper['type'] = 'html';
|
||||
$module->default = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($module->default)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7464,15 +7431,14 @@ class Get
|
||||
// set GUI mapper field
|
||||
$guiMapper['field'] = $scriptMethod . '_'
|
||||
. $scriptType;
|
||||
$module->{$scriptMethod . '_' . $scriptType}
|
||||
= CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
$module->{$scriptMethod . '_' . $scriptType} = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode(
|
||||
$module->{$scriptMethod . '_'
|
||||
. $scriptType}
|
||||
)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7491,9 +7457,8 @@ class Get
|
||||
if ($module->add_sql == 1
|
||||
&& StringHelper::check($module->sql))
|
||||
{
|
||||
$module->sql = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update(base64_decode($module->sql)),
|
||||
CFactory::_('Placeholder')->active
|
||||
$module->sql = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(base64_decode($module->sql))
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -7507,10 +7472,10 @@ class Get
|
||||
$module->sql_uninstall
|
||||
))
|
||||
{
|
||||
$module->sql_uninstall = CFactory::_('Placeholder')->update(
|
||||
$module->sql_uninstall = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($module->sql_uninstall)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -7524,9 +7489,8 @@ class Get
|
||||
$module->update_server_url
|
||||
))
|
||||
{
|
||||
$module->update_server_url = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($module->update_server_url),
|
||||
CFactory::_('Placeholder')->active
|
||||
$module->update_server_url = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($module->update_server_url)
|
||||
);
|
||||
}
|
||||
// add the update/sales server FTP details if that is the expected protocol
|
||||
@ -7566,17 +7530,11 @@ class Get
|
||||
$this->langPrefix = $_backup_langPrefix;
|
||||
CFactory::_('Config')->lang_prefix = $_backup_langPrefix;
|
||||
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Module_name')]
|
||||
);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('Module')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('module')]);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('module.version')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('module_version')]
|
||||
);
|
||||
CFactory::_('Placeholder')->remove('Module_name');
|
||||
CFactory::_('Placeholder')->remove('Module');
|
||||
CFactory::_('Placeholder')->remove('module');
|
||||
CFactory::_('Placeholder')->remove('module.version');
|
||||
CFactory::_('Placeholder')->remove('module_version');
|
||||
|
||||
$this->joomlaModules[$id] = $module;
|
||||
|
||||
@ -7801,8 +7759,8 @@ class Get
|
||||
$guiMapper = array('table' => 'joomla_plugin',
|
||||
'id' => (int) $id, 'type' => 'php');
|
||||
// update the name if it has dynamic values
|
||||
$plugin->name = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($plugin->name), CFactory::_('Placeholder')->active
|
||||
$plugin->name = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($plugin->name)
|
||||
);
|
||||
// update the name if it has dynamic values
|
||||
$plugin->code_name
|
||||
@ -7852,37 +7810,19 @@ class Get
|
||||
$plugin->key, CFactory::_('Config')->lang_prefix, $plugin->official_name
|
||||
);
|
||||
// set some placeholder for this plugin
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Plugin_name')]
|
||||
= $plugin->official_name;
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('PLUGIN_NAME')]
|
||||
= $plugin->official_name;
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Plugin')]
|
||||
= ucfirst(
|
||||
$plugin->code_name
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin')]
|
||||
= strtolower(
|
||||
$plugin->code_name
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Plugin_group')]
|
||||
= ucfirst(
|
||||
$plugin->group
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin_group')]
|
||||
= strtolower(
|
||||
$plugin->group
|
||||
);
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin.version')]
|
||||
= $plugin->plugin_version;
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('VERSION')]
|
||||
= $plugin->plugin_version;
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin_version')]
|
||||
= str_replace(
|
||||
CFactory::_('Placeholder')->set('Plugin_name', $plugin->official_name);
|
||||
CFactory::_('Placeholder')->set('PLUGIN_NAME', $plugin->official_name);
|
||||
CFactory::_('Placeholder')->set('Plugin', ucfirst($plugin->code_name));
|
||||
CFactory::_('Placeholder')->set('plugin', strtolower($plugin->code_name));
|
||||
CFactory::_('Placeholder')->set('Plugin_group', ucfirst($plugin->group));
|
||||
CFactory::_('Placeholder')->set('plugin_group', strtolower($plugin->group));
|
||||
CFactory::_('Placeholder')->set('plugin.version', $plugin->plugin_version);
|
||||
CFactory::_('Placeholder')->set('VERSION', $plugin->plugin_version);
|
||||
CFactory::_('Placeholder')->set('plugin_version', str_replace(
|
||||
'.', '_', $plugin->plugin_version
|
||||
);
|
||||
));
|
||||
// set description
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('DESCRIPTION')]
|
||||
= '';
|
||||
CFactory::_('Placeholder')->set('DESCRIPTION', '');
|
||||
if (!isset($plugin->description)
|
||||
|| !StringHelper::check(
|
||||
$plugin->description
|
||||
@ -7892,19 +7832,16 @@ class Get
|
||||
}
|
||||
else
|
||||
{
|
||||
$plugin->description = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($plugin->description),
|
||||
CFactory::_('Placeholder')->active
|
||||
$plugin->description = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($plugin->description)
|
||||
);
|
||||
CFactory::_('Language')->set(
|
||||
$plugin->key, $plugin->lang_prefix . '_DESCRIPTION',
|
||||
$plugin->description
|
||||
);
|
||||
// set description
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('DESCRIPTION')]
|
||||
= $plugin->description;
|
||||
$plugin->description = '<p>' . $plugin->description
|
||||
. '</p>';
|
||||
CFactory::_('Placeholder')->set('DESCRIPTION', $plugin->description);
|
||||
$plugin->description = '<p>' . $plugin->description . '</p>';
|
||||
}
|
||||
$plugin->xml_description = "<h1>" . $plugin->official_name
|
||||
. " (v." . $plugin->plugin_version
|
||||
@ -7924,9 +7861,8 @@ class Get
|
||||
// update the readme if set
|
||||
if ($plugin->addreadme == 1 && !empty($plugin->readme))
|
||||
{
|
||||
$plugin->readme = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update(base64_decode($plugin->readme)),
|
||||
CFactory::_('Placeholder')->active
|
||||
$plugin->readme = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(base64_decode($plugin->readme))
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -7941,10 +7877,10 @@ class Get
|
||||
$guiMapper['field'] = 'main_class_code';
|
||||
// base64 Decode main_class_code.
|
||||
$plugin->main_class_code = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($plugin->main_class_code)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7956,10 +7892,10 @@ class Get
|
||||
$guiMapper['field'] = 'head';
|
||||
// base64 Decode head.
|
||||
$plugin->head = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($plugin->head)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -7968,10 +7904,10 @@ class Get
|
||||
{
|
||||
// base64 Decode head.
|
||||
$plugin->head = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($plugin->class_head)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
array(
|
||||
'table' => 'class_extends',
|
||||
@ -7986,10 +7922,10 @@ class Get
|
||||
{
|
||||
// base64 Decode comment.
|
||||
$plugin->comment = CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($plugin->comment)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
array(
|
||||
'table' => 'class_extends',
|
||||
@ -8292,13 +8228,13 @@ class Get
|
||||
. $scriptType;
|
||||
$plugin->{$scriptMethod . '_' . $scriptType}
|
||||
= CFactory::_('Customcode.Gui')->set(
|
||||
CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode(
|
||||
$plugin->{$scriptMethod . '_'
|
||||
. $scriptType}
|
||||
)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
),
|
||||
$guiMapper
|
||||
);
|
||||
@ -8317,9 +8253,8 @@ class Get
|
||||
if ($plugin->add_sql == 1
|
||||
&& StringHelper::check($plugin->sql))
|
||||
{
|
||||
$plugin->sql = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update(base64_decode($plugin->sql)),
|
||||
CFactory::_('Placeholder')->active
|
||||
$plugin->sql = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(base64_decode($plugin->sql))
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -8333,10 +8268,10 @@ class Get
|
||||
$plugin->sql_uninstall
|
||||
))
|
||||
{
|
||||
$plugin->sql_uninstall = CFactory::_('Placeholder')->update(
|
||||
$plugin->sql_uninstall = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update(
|
||||
base64_decode($plugin->sql_uninstall)
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -8350,9 +8285,8 @@ class Get
|
||||
$plugin->update_server_url
|
||||
))
|
||||
{
|
||||
$plugin->update_server_url = CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Customcode')->update($plugin->update_server_url),
|
||||
CFactory::_('Placeholder')->active
|
||||
$plugin->update_server_url = CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Customcode')->update($plugin->update_server_url)
|
||||
);
|
||||
}
|
||||
// add the update/sales server FTP details if that is the expected protocol
|
||||
@ -8392,32 +8326,16 @@ class Get
|
||||
$this->langPrefix = $_backup_langPrefix;
|
||||
CFactory::_('Config')->set('lang_prefix', $_backup_langPrefix);
|
||||
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Plugin_name')]
|
||||
);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('Plugin')]);
|
||||
unset(CFactory::_('Placeholder')->active[Placefix::_('plugin')]);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Plugin_group')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin_group')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin.version')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('plugin_version')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('VERSION')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('DESCRIPTION')]
|
||||
);
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_h('PLUGIN_NAME')]
|
||||
);
|
||||
CFactory::_('Placeholder')->remove('Plugin_name');
|
||||
CFactory::_('Placeholder')->remove('Plugin');
|
||||
CFactory::_('Placeholder')->remove('plugin');
|
||||
CFactory::_('Placeholder')->remove('Plugin_group');
|
||||
CFactory::_('Placeholder')->remove('plugin_group');
|
||||
CFactory::_('Placeholder')->remove('plugin.version');
|
||||
CFactory::_('Placeholder')->remove('plugin_version');
|
||||
CFactory::_('Placeholder')->remove('VERSION');
|
||||
CFactory::_('Placeholder')->remove('DESCRIPTION');
|
||||
CFactory::_('Placeholder')->remove('PLUGIN_NAME');
|
||||
|
||||
$this->joomlaPlugins[$id] = $plugin;
|
||||
|
||||
|
@ -3087,8 +3087,8 @@ class Structure extends Get
|
||||
'//', '/', $custom['file']
|
||||
);
|
||||
// update the dynamic component name placholders in file names
|
||||
$custom['path'] = CFactory::_('Placeholder')->update(
|
||||
$custom['path'], CFactory::_('Placeholder')->active
|
||||
$custom['path'] = CFactory::_('Placeholder')->update_(
|
||||
$custom['path']
|
||||
);
|
||||
// get the path info
|
||||
$pathInfo = pathinfo($custom['path']);
|
||||
@ -3227,10 +3227,10 @@ class Structure extends Get
|
||||
*/
|
||||
protected function updateDynamicPath($path)
|
||||
{
|
||||
return CFactory::_('Placeholder')->update(
|
||||
return CFactory::_('Placeholder')->update_(
|
||||
CFactory::_('Placeholder')->update(
|
||||
$path, ComponentbuilderHelper::$constantPaths
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -403,9 +403,9 @@ class Fields extends Structure
|
||||
}
|
||||
// main lang prefix
|
||||
$langView = CFactory::_('Config')->lang_prefix . '_'
|
||||
. CFactory::_('Placeholder')->active[Placefix::_h('VIEW')];
|
||||
. CFactory::_('Placeholder')->get('VIEW');
|
||||
$langViews = CFactory::_('Config')->lang_prefix . '_'
|
||||
. CFactory::_('Placeholder')->active[Placefix::_h('VIEWS')];
|
||||
. CFactory::_('Placeholder')->get('VIEWS');
|
||||
// set default lang
|
||||
CFactory::_('Language')->set(
|
||||
CFactory::_('Config')->lang_target, $langView, $view['settings']->name_single
|
||||
@ -607,17 +607,16 @@ class Fields extends Structure
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// for plugin event TODO change event api signatures
|
||||
$this->placeholders = CFactory::_('Placeholder')->active;
|
||||
$placeholders = CFactory::_('Placeholder')->active;
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onBeforeBuildFields',
|
||||
array(&$this->componentContext, &$dynamicFields, &$readOnly,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$this->placeholders, &$langView,
|
||||
&$nameListCode, &$placeholders, &$langView,
|
||||
&$langViews)
|
||||
);
|
||||
// for plugin event TODO change event api signatures
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
unset($placeholders);
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
@ -628,17 +627,16 @@ class Fields extends Structure
|
||||
);
|
||||
}
|
||||
// for plugin event TODO change event api signatures
|
||||
$this->placeholders = CFactory::_('Placeholder')->active;
|
||||
$placeholders = CFactory::_('Placeholder')->active;
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onAfterBuildFields',
|
||||
array(&$this->componentContext, &$dynamicFields, &$readOnly,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$this->placeholders, &$langView,
|
||||
&$nameListCode, &$placeholders, &$langView,
|
||||
&$langViews)
|
||||
);
|
||||
// for plugin event TODO change event api signatures
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
unset($placeholders);
|
||||
// set the default fields
|
||||
$fieldSet = array();
|
||||
$fieldSet[] = '<fieldset name="details">';
|
||||
@ -1026,17 +1024,16 @@ class Fields extends Structure
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// for plugin event TODO change event api signatures
|
||||
$this->placeholders = CFactory::_('Placeholder')->active;
|
||||
$placeholders = CFactory::_('Placeholder')->active;
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onBeforeBuildFields',
|
||||
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$this->placeholders, &$langView,
|
||||
&$nameListCode, &$placeholders, &$langView,
|
||||
&$langViews)
|
||||
);
|
||||
// for plugin event TODO change event api signatures
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
unset($placeholders);
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
@ -1047,17 +1044,16 @@ class Fields extends Structure
|
||||
);
|
||||
}
|
||||
// for plugin event TODO change event api signatures
|
||||
$this->placeholders = CFactory::_('Placeholder')->active;
|
||||
$placeholders = CFactory::_('Placeholder')->active;
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
CFactory::_('Event')->trigger(
|
||||
'jcb_ce_onAfterBuildFields',
|
||||
array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$this->placeholders, &$langView,
|
||||
&$nameListCode, &$placeholders, &$langView,
|
||||
&$langViews)
|
||||
);
|
||||
// for plugin event TODO change event api signatures
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
unset($placeholders);
|
||||
// set the default fields
|
||||
$XML = new simpleXMLElement('<a/>');
|
||||
$fieldSetXML = $XML->addChild('fieldset');
|
||||
@ -4752,11 +4748,11 @@ class Fields extends Structure
|
||||
else
|
||||
{
|
||||
// get it from the field xml string
|
||||
$listFieldName = (string) CFactory::_('Placeholder')->update(
|
||||
$listFieldName = (string) CFactory::_('Placeholder')->update_(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'label="',
|
||||
'"'
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
);
|
||||
}
|
||||
// make sure there is no html in the list field name
|
||||
@ -4954,10 +4950,10 @@ class Fields extends Structure
|
||||
$otherView = $nameSingleCode;
|
||||
}
|
||||
// get the xml extension name
|
||||
$_extension = CFactory::_('Placeholder')->update(
|
||||
$_extension = CFactory::_('Placeholder')->update_(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'extension="', '"'
|
||||
), CFactory::_('Placeholder')->active
|
||||
)
|
||||
);
|
||||
// if they left out the extension for some reason
|
||||
if (!StringHelper::check($_extension))
|
||||
@ -5332,12 +5328,11 @@ class Fields extends Structure
|
||||
if (isset($data['custom']) && isset($data['custom']['extends'])
|
||||
&& ((isset($data['custom']['prime_php'])
|
||||
&& $data['custom']['prime_php'] == 1)
|
||||
|| !isset(
|
||||
$this->fileContentDynamic['customfield_' . $data['type']]
|
||||
)
|
||||
|| !CFactory::_('Content')->exist_('customfield_' . $data['type'])
|
||||
|| !ArrayHelper::check(
|
||||
$this->fileContentDynamic['customfield_' . $data['type']]
|
||||
)))
|
||||
CFactory::_('Content')->get_('customfield_' . $data['type'])
|
||||
)
|
||||
))
|
||||
{
|
||||
// set J prefix
|
||||
$jprefix = 'J';
|
||||
@ -5416,18 +5411,17 @@ class Fields extends Structure
|
||||
$replace[$globalPlaceholder] = $gloabalValue;
|
||||
}
|
||||
// start loading the field type
|
||||
$this->fileContentDynamic['customfield_' . $data['type']] = array();
|
||||
// $this->fileContentDynamic['customfield_' . $data['type']] = array();
|
||||
// JPREFIX <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_' . $data['type']][Placefix::_h('JPREFIX')]
|
||||
= $jprefix;
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JPREFIX', $jprefix);
|
||||
// Type <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_' . $data['type']][Placefix::_h('Type')]
|
||||
= StringHelper::safe(
|
||||
$data['custom']['type'], 'F'
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'Type',
|
||||
StringHelper::safe(
|
||||
$data['custom']['type'], 'F'
|
||||
)
|
||||
);
|
||||
// type <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_' . $data['type']][Placefix::_h('type')]
|
||||
= StringHelper::safe($data['custom']['type']);
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'type', StringHelper::safe($data['custom']['type']));
|
||||
// is this a own custom field
|
||||
if (isset($data['custom']['own_custom']))
|
||||
{
|
||||
@ -5457,28 +5451,28 @@ class Fields extends Structure
|
||||
);
|
||||
// JFORM_TYPE_HEADER <<<DYNAMIC>>>
|
||||
$add_default_header = true;
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
|
||||
= "//" . Line::_(
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JFORM_TYPE_HEADER',
|
||||
"//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Import the " . $JFORM_extends
|
||||
. " field type classes needed";
|
||||
. " field type classes needed"
|
||||
);
|
||||
// JFORM_extens <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_extends')]
|
||||
= $JFORM_extends;
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'],
|
||||
'JFORM_extends', $JFORM_extends
|
||||
);
|
||||
// JFORM_EXTENDS <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_EXTENDS')]
|
||||
= StringHelper::safe(
|
||||
$data['custom']['extends'], 'F'
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JFORM_EXTENDS',
|
||||
StringHelper::safe(
|
||||
$data['custom']['extends'], 'F'
|
||||
)
|
||||
);
|
||||
// JFORM_TYPE_PHP <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_PHP')]
|
||||
= PHP_EOL . PHP_EOL . Indent::_(1) . "//" . Line::_(
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JFORM_TYPE_PHP',
|
||||
PHP_EOL . PHP_EOL . Indent::_(1) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " A " . $data['custom']['own_custom'] . " Field";
|
||||
) . " A " . $data['custom']['own_custom'] . " Field"
|
||||
);
|
||||
// load the other PHP options
|
||||
foreach (ComponentbuilderHelper::$phpFieldArray as $x)
|
||||
{
|
||||
@ -5502,46 +5496,43 @@ class Fields extends Structure
|
||||
// check if this is header text
|
||||
if ('HEADER' === $x)
|
||||
{
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
|
||||
.= PHP_EOL . CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Content')->add_('customfield_' . $data['type'], 'JFORM_TYPE_HEADER',
|
||||
PHP_EOL . CFactory::_('Placeholder')->update(
|
||||
$phpBucket, $replace
|
||||
);
|
||||
)
|
||||
);
|
||||
// stop default headers from loading
|
||||
$add_default_header = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// JFORM_TYPE_PHP <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_PHP')]
|
||||
.= PHP_EOL . CFactory::_('Placeholder')->update(
|
||||
CFactory::_('Content')->add_('customfield_' . $data['type'], 'JFORM_TYPE_PHP',
|
||||
PHP_EOL . CFactory::_('Placeholder')->update(
|
||||
$phpBucket, $replace
|
||||
);
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// check if we should add default header
|
||||
if ($add_default_header)
|
||||
{
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
|
||||
.= PHP_EOL . "jimport('joomla.form.helper');";
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
|
||||
.= PHP_EOL . "JFormHelper::loadFieldClass('"
|
||||
. $JFORM_extends . "');";
|
||||
CFactory::_('Content')->add_('customfield_' . $data['type'], 'JFORM_TYPE_HEADER',
|
||||
PHP_EOL . "jimport('joomla.form.helper');"
|
||||
);
|
||||
CFactory::_('Content')->add_('customfield_' . $data['type'], 'JFORM_TYPE_HEADER',
|
||||
PHP_EOL . "JFormHelper::loadFieldClass('" . $JFORM_extends . "');"
|
||||
);
|
||||
}
|
||||
// check the the JFormHelper::loadFieldClass(..) was set
|
||||
elseif (strpos(
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_HEADER')], 'JFormHelper::loadFieldClass('
|
||||
) === false)
|
||||
elseif (strpos(CFactory::_('Content')->get_('customfield_' . $data['type'], 'JFORM_TYPE_HEADER'),
|
||||
'JFormHelper::loadFieldClass(') === false)
|
||||
{
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_TYPE_HEADER')]
|
||||
.= PHP_EOL . "JFormHelper::loadFieldClass('"
|
||||
. $JFORM_extends . "');";
|
||||
CFactory::_('Content')->add_('customfield_' . $data['type'], 'JFORM_TYPE_HEADER',
|
||||
PHP_EOL . "JFormHelper::loadFieldClass('"
|
||||
. $JFORM_extends . "');"
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5637,25 +5628,25 @@ class Fields extends Structure
|
||||
// build the Group Control
|
||||
$this->setGroupControl[$data['type']] = $groupLangName;
|
||||
// JFORM_GETGROUPS_PHP <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_GETGROUPS_PHP')]
|
||||
= $phpCode;
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JFORM_GETGROUPS_PHP',
|
||||
$phpCode
|
||||
);
|
||||
// JFORM_GETEXCLUDED_PHP <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_GETEXCLUDED_PHP')]
|
||||
= $phpxCode;
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JFORM_GETEXCLUDED_PHP',
|
||||
$phpxCode
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
// JFORM_GETOPTIONS_PHP <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('JFORM_GETOPTIONS_PHP')]
|
||||
= $phpCode;
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'JFORM_GETOPTIONS_PHP',
|
||||
$phpCode
|
||||
);
|
||||
}
|
||||
// type <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfield_'
|
||||
. $data['type']][Placefix::_h('ADD_BUTTON')]
|
||||
= $this->setAddButtonToListField($data['custom']);
|
||||
CFactory::_('Content')->set_('customfield_' . $data['type'], 'ADD_BUTTON',
|
||||
$this->setAddButtonToListField($data['custom'])
|
||||
);
|
||||
}
|
||||
}
|
||||
// if this field gets used in plugin or module we should track it so if needed we can copy it over
|
||||
@ -6065,42 +6056,34 @@ class Fields extends Structure
|
||||
public function setFilterFieldFile($getOptions, $filter)
|
||||
{
|
||||
// make sure it is not already been build
|
||||
if (!isset(
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']]
|
||||
)
|
||||
if (!CFactory::_('Content')->exist_('customfilterfield_' . $filter['filter_type'])
|
||||
|| !ArrayHelper::check(
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']]
|
||||
CFactory::_('Content')->get_('customfilterfield_' . $filter['filter_type'])
|
||||
)
|
||||
)
|
||||
{
|
||||
// start loading the field type
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']]
|
||||
= array();
|
||||
// $this->fileContentDynamic['customfilterfield_'
|
||||
// . $filter['filter_type']]
|
||||
// = array();
|
||||
// JPREFIX <<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']][Placefix::_h('JPREFIX')]
|
||||
= 'J';
|
||||
CFactory::_('Content')->set_('customfilterfield_' . $filter['filter_type'], 'JPREFIX', 'J');
|
||||
// Type <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']][Placefix::_h('Type')]
|
||||
= StringHelper::safe(
|
||||
$filter['filter_type'], 'F'
|
||||
CFactory::_('Content')->set_('customfilterfield_' . $filter['filter_type'], 'Type',
|
||||
StringHelper::safe(
|
||||
$filter['filter_type'], 'F'
|
||||
)
|
||||
);
|
||||
// type <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']][Placefix::_h('type')]
|
||||
= StringHelper::safe($filter['filter_type']);
|
||||
CFactory::_('Content')->set_('customfilterfield_' . $filter['filter_type'], 'type',
|
||||
StringHelper::safe($filter['filter_type'])
|
||||
);
|
||||
// JFORM_GETOPTIONS_PHP <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']][Placefix::_h('JFORM_GETOPTIONS_PHP')]
|
||||
= $getOptions;
|
||||
CFactory::_('Content')->set_('customfilterfield_' . $filter['filter_type'], 'JFORM_GETOPTIONS_PHP',
|
||||
$getOptions
|
||||
);
|
||||
// ADD_BUTTON <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic['customfilterfield_'
|
||||
. $filter['filter_type']][Placefix::_h('ADD_BUTTON')]
|
||||
= '';
|
||||
CFactory::_('Content')->set_('customfilterfield_' . $filter['filter_type'], 'ADD_BUTTON', '');
|
||||
// now build the custom filter field type file
|
||||
$target = array('admin' => 'customfilterfield');
|
||||
$this->buildDynamique(
|
||||
@ -6153,8 +6136,8 @@ class Fields extends Structure
|
||||
$fieldData['component'], Placefix::b()
|
||||
) !== false) // should not be needed... but
|
||||
{
|
||||
$fieldData['component'] = CFactory::_('Placeholder')->update(
|
||||
$fieldData['component'], CFactory::_('Placeholder')->active
|
||||
$fieldData['component'] = CFactory::_('Placeholder')->update_(
|
||||
$fieldData['component']
|
||||
);
|
||||
}
|
||||
// get core permissions
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user