Adds the initial classes needed for the new search feature. Adds the empty view for the search feature. #952
This commit is contained in:
@ -1307,10 +1307,7 @@ class Get
|
||||
);
|
||||
|
||||
// load the global placeholders
|
||||
if (ArrayHelper::check($this->globalPlaceholders))
|
||||
{
|
||||
CFactory::_('Placeholder')->active = $this->globalPlaceholders;
|
||||
}
|
||||
CFactory::_('Placeholder')->active = CFactory::_('Component.Placeholder')->get();
|
||||
|
||||
// set component sales name
|
||||
$component->sales_name = StringHelper::safe(
|
||||
@ -7567,7 +7564,7 @@ class Get
|
||||
CFactory::_('Config')->build_target = $_backup_target;
|
||||
CFactory::_('Config')->lang_target = $_backup_lang;
|
||||
$this->langPrefix = $_backup_langPrefix;
|
||||
CFactory::_('Config')->set('lang_prefix', $_backup_langPrefix);
|
||||
CFactory::_('Config')->lang_prefix = $_backup_langPrefix;
|
||||
|
||||
unset(
|
||||
CFactory::_('Placeholder')->active[Placefix::_('Module_name')]
|
||||
@ -7816,15 +7813,14 @@ class Get
|
||||
$plugin->official_name = ucwords(
|
||||
$plugin->group . ' - ' . $plugin->name
|
||||
);
|
||||
// set langPrefix
|
||||
$this->langPrefix
|
||||
= PluginHelper::safeLangPrefix(
|
||||
$plugin->code_name,
|
||||
$plugin->group
|
||||
);
|
||||
CFactory::_('Config')->set('lang_prefix', $this->langPrefix);
|
||||
// set lang prefix
|
||||
$plugin->lang_prefix = CFactory::_('Config')->lang_prefix;
|
||||
$plugin->lang_prefix = PluginHelper::safeLangPrefix(
|
||||
$plugin->code_name,
|
||||
$plugin->group
|
||||
);
|
||||
// set langPrefix
|
||||
CFactory::_('Config')->lang_prefix = $plugin->lang_prefix;
|
||||
$this->langPrefix = $plugin->lang_prefix;
|
||||
// set plugin class name
|
||||
$plugin->class_name
|
||||
= PluginHelper::safeClassName(
|
||||
|
@ -3954,7 +3954,7 @@ class Fields extends Structure
|
||||
}
|
||||
// now build the layout
|
||||
if (StringHelper::check($tabName)
|
||||
&& $tabName != 'publishing')
|
||||
&& strtolower($tabName) != 'publishing')
|
||||
{
|
||||
$this->tabCounter[$nameSingleCode][(int) $field['tab']]
|
||||
= $tabName;
|
||||
@ -5032,6 +5032,8 @@ class Fields extends Structure
|
||||
$this->buildSiteFieldData(
|
||||
$nameSingleCode, $name, 'json', $typeName
|
||||
);
|
||||
// add open close method to field data
|
||||
$field['store'] = 'json';
|
||||
break;
|
||||
case 2:
|
||||
// BASE_SIXTY_FOUR
|
||||
@ -5040,6 +5042,8 @@ class Fields extends Structure
|
||||
$this->buildSiteFieldData(
|
||||
$nameSingleCode, $name, 'base64', $typeName
|
||||
);
|
||||
// add open close method to field data
|
||||
$field['store'] = 'base64';
|
||||
break;
|
||||
case 3:
|
||||
// BASIC_ENCRYPTION_LOCALKEY
|
||||
@ -5048,6 +5052,8 @@ class Fields extends Structure
|
||||
$this->buildSiteFieldData(
|
||||
$nameSingleCode, $name, 'basic_encryption', $typeName
|
||||
);
|
||||
// add open close method to field data
|
||||
$field['store'] = 'basic_encryption';
|
||||
break;
|
||||
case 4:
|
||||
// WHMCS_ENCRYPTION_VDMKEY (DUE REMOVAL)
|
||||
@ -5056,6 +5062,8 @@ class Fields extends Structure
|
||||
$this->buildSiteFieldData(
|
||||
$nameSingleCode, $name, 'whmcs_encryption', $typeName
|
||||
);
|
||||
// add open close method to field data
|
||||
$field['store'] = 'whmcs_encryption';
|
||||
break;
|
||||
case 5:
|
||||
// MEDIUM_ENCRYPTION_LOCALFILE
|
||||
@ -5064,6 +5072,8 @@ class Fields extends Structure
|
||||
$this->buildSiteFieldData(
|
||||
$nameSingleCode, $name, 'medium_encryption', $typeName
|
||||
);
|
||||
// add open close method to field data
|
||||
$field['store'] = 'medium_encryption';
|
||||
break;
|
||||
case 6:
|
||||
// EXPERT_MODE
|
||||
@ -5096,6 +5106,8 @@ class Fields extends Structure
|
||||
);
|
||||
// no londer add the json again (already added)
|
||||
$subformJsonSwitch = false;
|
||||
// add open close method to field data
|
||||
$field['store'] = 'json';
|
||||
break;
|
||||
}
|
||||
// just a heads-up for usergroups set to multiple
|
||||
@ -5286,6 +5298,22 @@ class Fields extends Structure
|
||||
$tabName = 'publishing';
|
||||
}
|
||||
$this->setLayoutBuilder($nameSingleCode, $tabName, $name, $field);
|
||||
|
||||
// only load fields we want to search
|
||||
if ($dbSwitch && ComponentbuilderHelper::fieldCheck($typeName, 'search'))
|
||||
{
|
||||
// load a search array of view, field, and [encryption, type, tab]
|
||||
CFactory::_('Registry')->set('all_search_fields.' . $nameSingleCode . '.' . $name,
|
||||
[
|
||||
'name' => $name,
|
||||
'type' => $typeName,
|
||||
'title' => (isset($this->titleBuilder[$nameSingleCode]) && $name === $this->titleBuilder[$nameSingleCode]) ? true : false,
|
||||
'list' => $nameListCode,
|
||||
'store' => (isset($field['store'])) ? $field['store'] : null,
|
||||
'tab_name' => $tabName
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5384,15 +5412,9 @@ class Fields extends Structure
|
||||
$replace[$replacekey] = $replacevalue;
|
||||
}
|
||||
// load the global placeholders
|
||||
if (ArrayHelper::check($this->globalPlaceholders))
|
||||
foreach (CFactory::_('Component.Placeholder')->get() as $globalPlaceholder => $gloabalValue)
|
||||
{
|
||||
foreach (
|
||||
$this->globalPlaceholders as $globalPlaceholder =>
|
||||
$gloabalValue
|
||||
)
|
||||
{
|
||||
$replace[$globalPlaceholder] = $gloabalValue;
|
||||
}
|
||||
$replace[$globalPlaceholder] = $gloabalValue;
|
||||
}
|
||||
// start loading the field type
|
||||
$this->fileContentDynamic['customfield_' . $data['type']] = array();
|
||||
|
@ -24106,17 +24106,9 @@ class Interpretation extends Fields
|
||||
$placeholders[Placefix::_('views')]
|
||||
= $nameListCode;
|
||||
// load the global placeholders
|
||||
if (ArrayHelper::check(
|
||||
$this->globalPlaceholders
|
||||
))
|
||||
foreach (CFactory::_('Component.Placeholder')->get() as $globalPlaceholder => $gloabalValue)
|
||||
{
|
||||
foreach (
|
||||
$this->globalPlaceholders as $globalPlaceholder =>
|
||||
$gloabalValue
|
||||
)
|
||||
{
|
||||
$placeholders[$globalPlaceholder] = $gloabalValue;
|
||||
}
|
||||
$placeholders[$globalPlaceholder] = $gloabalValue;
|
||||
}
|
||||
$view = '';
|
||||
$viewType = 0;
|
||||
@ -29015,10 +29007,12 @@ function vdm_dkim() {
|
||||
public function getExtensionFieldsetXML(&$extension, &$fields, $dbkey = 'zz'
|
||||
)
|
||||
{
|
||||
// get global placeholders
|
||||
$placeholder = CFactory::_('Component.Placeholder')->get();
|
||||
// build the fieldset
|
||||
return $this->getFieldsetXML(
|
||||
$fields, $extension->lang_prefix, $extension->key, $extension->key,
|
||||
$this->globalPlaceholders, $dbkey
|
||||
$placeholder, $dbkey
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -324,17 +324,13 @@ class Infusion extends Interpretation
|
||||
= $this->addEmailHelper();
|
||||
|
||||
// load the global placeholders
|
||||
if (ArrayHelper::check($this->globalPlaceholders))
|
||||
foreach (CFactory::_('Component.Placeholder')->get() as $globalPlaceholder =>
|
||||
$gloabalValue
|
||||
)
|
||||
{
|
||||
foreach (
|
||||
$this->globalPlaceholders as $globalPlaceholder =>
|
||||
$gloabalValue
|
||||
)
|
||||
{
|
||||
$this->fileContentStatic[$globalPlaceholder]
|
||||
= $gloabalValue;
|
||||
}
|
||||
$this->fileContentStatic[$globalPlaceholder] = $gloabalValue;
|
||||
}
|
||||
|
||||
// reset view array
|
||||
$viewarray = array();
|
||||
$site_edit_view_array = array();
|
||||
@ -1169,6 +1165,10 @@ class Infusion extends Interpretation
|
||||
CFactory::_('Placeholder')->active = $this->placeholders;
|
||||
}
|
||||
|
||||
// all fields stored in database
|
||||
$this->fileContentStatic[Placefix::_h('ARRAY_ALL_SEARCH_FIELDS')] =
|
||||
CFactory::_('Registry')->varExport('all_search_fields', 1);
|
||||
|
||||
// setup the layouts
|
||||
$this->setCustomViewLayouts();
|
||||
|
||||
|
@ -3550,6 +3550,9 @@ abstract class ComponentbuilderHelper
|
||||
),
|
||||
'special' => array(
|
||||
'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform'
|
||||
),
|
||||
'search' => array(
|
||||
'editor', 'email', 'tel', 'text', 'textarea', 'url', 'subform'
|
||||
)
|
||||
);
|
||||
|
||||
@ -6318,6 +6321,11 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_COMPILER'), 'index.php?option=com_componentbuilder&view=compiler', $submenu === 'compiler');
|
||||
}
|
||||
// Access control (search.submenu).
|
||||
if ($user->authorise('search.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_SEARCH'), 'index.php?option=com_componentbuilder&view=search', $submenu === 'search');
|
||||
}
|
||||
if ($user->authorise('joomla_component.access', 'com_componentbuilder') && $user->authorise('joomla_component.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS'), 'index.php?option=com_componentbuilder&view=joomla_components', $submenu === 'joomla_components');
|
||||
|
Reference in New Issue
Block a user