update 2024-04-27 15:33:41
This commit is contained in:
parent
5e42dd1f70
commit
37ad7da5ad
@ -158,28 +158,38 @@ class Data
|
|||||||
// check if layout keys were passed
|
// check if layout keys were passed
|
||||||
if (!ArrayHelper::check($layouts))
|
if (!ArrayHelper::check($layouts))
|
||||||
{
|
{
|
||||||
|
$layout_bucket = [];
|
||||||
// set the Layout data
|
// set the Layout data
|
||||||
$lay1 = GetHelper::allBetween(
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
$content, "LayoutHelper::render('", "',"
|
$content, "LayoutHelper::render('", "',"
|
||||||
);
|
)) !== null)
|
||||||
$lay2 = GetHelper::allBetween(
|
{
|
||||||
|
$layout_bucket[] = $layouts_found;
|
||||||
|
}
|
||||||
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
$content, 'LayoutHelper::render("', '",'
|
$content, 'LayoutHelper::render("', '",'
|
||||||
);
|
)) !== null)
|
||||||
if (ArrayHelper::check($lay1)
|
|
||||||
&& ArrayHelper::check($lay2))
|
|
||||||
{
|
{
|
||||||
$layouts = array_merge($lay1, $lay2);
|
$layout_bucket[] = $layouts_found;
|
||||||
}
|
}
|
||||||
else
|
// set the Layout data
|
||||||
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
|
$content, "Joomla__" . "_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('", "',"
|
||||||
|
)) !== null)
|
||||||
{
|
{
|
||||||
if (ArrayHelper::check($lay1))
|
$layout_bucket[] = $layouts_found;
|
||||||
{
|
|
||||||
$layouts = $lay1;
|
|
||||||
}
|
}
|
||||||
elseif (ArrayHelper::check($lay2))
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
|
$content, 'Joomla__' . '_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render("', '",'
|
||||||
|
)) !== null)
|
||||||
{
|
{
|
||||||
$layouts = $lay2;
|
$layout_bucket[] = $layouts_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flatten and merge all collected layouts if any
|
||||||
|
if ($layout_bucket !== [])
|
||||||
|
{
|
||||||
|
$layouts = array_merge($layouts, ...$layout_bucket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,28 +129,38 @@
|
|||||||
// check if layout keys were passed
|
// check if layout keys were passed
|
||||||
if (!ArrayHelper::check($layouts))
|
if (!ArrayHelper::check($layouts))
|
||||||
{
|
{
|
||||||
|
$layout_bucket = [];
|
||||||
// set the Layout data
|
// set the Layout data
|
||||||
$lay1 = GetHelper::allBetween(
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
$content, "LayoutHelper::render('", "',"
|
$content, "LayoutHelper::render('", "',"
|
||||||
);
|
)) !== null)
|
||||||
$lay2 = GetHelper::allBetween(
|
{
|
||||||
|
$layout_bucket[] = $layouts_found;
|
||||||
|
}
|
||||||
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
$content, 'LayoutHelper::render("', '",'
|
$content, 'LayoutHelper::render("', '",'
|
||||||
);
|
)) !== null)
|
||||||
if (ArrayHelper::check($lay1)
|
|
||||||
&& ArrayHelper::check($lay2))
|
|
||||||
{
|
{
|
||||||
$layouts = array_merge($lay1, $lay2);
|
$layout_bucket[] = $layouts_found;
|
||||||
}
|
}
|
||||||
else
|
// set the Layout data
|
||||||
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
|
$content, "Joomla__" . "_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('", "',"
|
||||||
|
)) !== null)
|
||||||
{
|
{
|
||||||
if (ArrayHelper::check($lay1))
|
$layout_bucket[] = $layouts_found;
|
||||||
{
|
|
||||||
$layouts = $lay1;
|
|
||||||
}
|
}
|
||||||
elseif (ArrayHelper::check($lay2))
|
if (($layouts_found = GetHelper::allBetween(
|
||||||
|
$content, 'Joomla__' . '_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render("', '",'
|
||||||
|
)) !== null)
|
||||||
{
|
{
|
||||||
$layouts = $lay2;
|
$layout_bucket[] = $layouts_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flatten and merge all collected layouts if any
|
||||||
|
if ($layout_bucket !== [])
|
||||||
|
{
|
||||||
|
$layouts = array_merge($layouts, ...$layout_bucket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,10 +546,14 @@ final class CustomFieldTypeFile
|
|||||||
if ($this->config->get('joomla_version', 3) != 3)
|
if ($this->config->get('joomla_version', 3) != 3)
|
||||||
{
|
{
|
||||||
$placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
$placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||||
|
$placeholders['\JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||||
$placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
$placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||||
$placeholders['JFactory::'] = 'Factory::';
|
$placeholders['JFactory::'] = 'Factory::';
|
||||||
|
$placeholders['\JFactory::'] = 'Factory::';
|
||||||
$placeholders['JHtml::'] = 'Html::';
|
$placeholders['JHtml::'] = 'Html::';
|
||||||
|
$placeholders['\JHtml::'] = 'Html::';
|
||||||
$placeholders['JText::'] = 'Text::';
|
$placeholders['JText::'] = 'Text::';
|
||||||
|
$placeholders['\JText::'] = 'Text::';
|
||||||
$placeholders['JComponentHelper::'] = 'ComponentHelper::';
|
$placeholders['JComponentHelper::'] = 'ComponentHelper::';
|
||||||
$placeholders['\JComponentHelper::'] = 'ComponentHelper::';
|
$placeholders['\JComponentHelper::'] = 'ComponentHelper::';
|
||||||
}
|
}
|
||||||
|
@ -500,10 +500,14 @@
|
|||||||
if ($this->config->get('joomla_version', 3) != 3)
|
if ($this->config->get('joomla_version', 3) != 3)
|
||||||
{
|
{
|
||||||
$placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
$placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||||
|
$placeholders['\JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||||
$placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
$placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()';
|
||||||
$placeholders['JFactory::'] = 'Factory::';
|
$placeholders['JFactory::'] = 'Factory::';
|
||||||
|
$placeholders['\JFactory::'] = 'Factory::';
|
||||||
$placeholders['JHtml::'] = 'Html::';
|
$placeholders['JHtml::'] = 'Html::';
|
||||||
|
$placeholders['\JHtml::'] = 'Html::';
|
||||||
$placeholders['JText::'] = 'Text::';
|
$placeholders['JText::'] = 'Text::';
|
||||||
|
$placeholders['\JText::'] = 'Text::';
|
||||||
$placeholders['JComponentHelper::'] = 'ComponentHelper::';
|
$placeholders['JComponentHelper::'] = 'ComponentHelper::';
|
||||||
$placeholders['\JComponentHelper::'] = 'ComponentHelper::';
|
$placeholders['\JComponentHelper::'] = 'ComponentHelper::';
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,9 @@ class Extractor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// now get the JText: :script()
|
// now get the JText: :script()
|
||||||
if (in_array('JText:' . ':script(', $lang_string_targets) || in_array('Text:' . ':script(', $lang_string_targets))
|
if (in_array('JText:' . ':script(', $lang_string_targets)
|
||||||
|
|| in_array('Text:' . ':script(', $lang_string_targets)
|
||||||
|
|| in_array('Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(', $lang_string_targets))
|
||||||
{
|
{
|
||||||
$sc_text[] = GetHelper::allBetween(
|
$sc_text[] = GetHelper::allBetween(
|
||||||
$content, "JText:" . ":script('", "'"
|
$content, "JText:" . ":script('", "'"
|
||||||
@ -161,6 +163,12 @@ class Extractor
|
|||||||
$sc_text[] = GetHelper::allBetween(
|
$sc_text[] = GetHelper::allBetween(
|
||||||
$content, 'Text:' . ':script("', '"'
|
$content, 'Text:' . ':script("', '"'
|
||||||
);
|
);
|
||||||
|
$sc_text[] = GetHelper::allBetween(
|
||||||
|
$content, "Joomla__" ."_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:" . ":script('", "'"
|
||||||
|
);
|
||||||
|
$sc_text[] = GetHelper::allBetween(
|
||||||
|
$content, 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script("', '"'
|
||||||
|
);
|
||||||
// combine into one array
|
// combine into one array
|
||||||
$sc_text = ArrayHelper::merge($sc_text);
|
$sc_text = ArrayHelper::merge($sc_text);
|
||||||
// we need to add a check to insure these JavaScript lang matchup
|
// we need to add a check to insure these JavaScript lang matchup
|
||||||
@ -192,6 +200,7 @@ class Extractor
|
|||||||
if ($lang_string_target === 'Joomla' . '.JText._('
|
if ($lang_string_target === 'Joomla' . '.JText._('
|
||||||
|| $lang_string_target === 'JText:' . ':script('
|
|| $lang_string_target === 'JText:' . ':script('
|
||||||
|| $lang_string_target === 'Text:' . ':script('
|
|| $lang_string_target === 'Text:' . ':script('
|
||||||
|
|| $lang_string_target === 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script('
|
||||||
|| $lang_string_target === 'JustTEXT:' . ':_(')
|
|| $lang_string_target === 'JustTEXT:' . ':_(')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -118,7 +118,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// now get the JText: :script()
|
// now get the JText: :script()
|
||||||
if (in_array('JText:' . ':script(', $lang_string_targets) || in_array('Text:' . ':script(', $lang_string_targets))
|
if (in_array('JText:' . ':script(', $lang_string_targets)
|
||||||
|
|| in_array('Text:' . ':script(', $lang_string_targets)
|
||||||
|
|| in_array('Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(', $lang_string_targets))
|
||||||
{
|
{
|
||||||
$sc_text[] = GetHelper::allBetween(
|
$sc_text[] = GetHelper::allBetween(
|
||||||
$content, "JText:" . ":script('", "'"
|
$content, "JText:" . ":script('", "'"
|
||||||
@ -132,6 +134,12 @@
|
|||||||
$sc_text[] = GetHelper::allBetween(
|
$sc_text[] = GetHelper::allBetween(
|
||||||
$content, 'Text:' . ':script("', '"'
|
$content, 'Text:' . ':script("', '"'
|
||||||
);
|
);
|
||||||
|
$sc_text[] = GetHelper::allBetween(
|
||||||
|
$content, "Joomla__" ."_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:" . ":script('", "'"
|
||||||
|
);
|
||||||
|
$sc_text[] = GetHelper::allBetween(
|
||||||
|
$content, 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script("', '"'
|
||||||
|
);
|
||||||
// combine into one array
|
// combine into one array
|
||||||
$sc_text = ArrayHelper::merge($sc_text);
|
$sc_text = ArrayHelper::merge($sc_text);
|
||||||
// we need to add a check to insure these JavaScript lang matchup
|
// we need to add a check to insure these JavaScript lang matchup
|
||||||
@ -163,6 +171,7 @@
|
|||||||
if ($lang_string_target === 'Joomla' . '.JText._('
|
if ($lang_string_target === 'Joomla' . '.JText._('
|
||||||
|| $lang_string_target === 'JText:' . ':script('
|
|| $lang_string_target === 'JText:' . ':script('
|
||||||
|| $lang_string_target === 'Text:' . ':script('
|
|| $lang_string_target === 'Text:' . ':script('
|
||||||
|
|| $lang_string_target === 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script('
|
||||||
|| $lang_string_target === 'JustTEXT:' . ':_(')
|
|| $lang_string_target === 'JustTEXT:' . ':_(')
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -656,7 +656,10 @@ class Config extends BaseConfig
|
|||||||
'js' => 'Text:' . ':script(',
|
'js' => 'Text:' . ':script(',
|
||||||
't' => 'Text:' . ':_(', // namespace and J version will be found
|
't' => 'Text:' . ':_(', // namespace and J version will be found
|
||||||
'ts' => 'Text:' . ':sprintf(', // namespace and J version will be found
|
'ts' => 'Text:' . ':sprintf(', // namespace and J version will be found
|
||||||
'jt' => 'JustTEXT:' . ':_('
|
'jt' => 'JustTEXT:' . ':_(',
|
||||||
|
'spjs' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(', // the joomla power version
|
||||||
|
'spt' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':_(', // the joomla power version
|
||||||
|
'spts' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':sprintf(' // the joomla power version
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,7 +622,10 @@
|
|||||||
'js' => 'Text:' . ':script(',
|
'js' => 'Text:' . ':script(',
|
||||||
't' => 'Text:' . ':_(', // namespace and J version will be found
|
't' => 'Text:' . ':_(', // namespace and J version will be found
|
||||||
'ts' => 'Text:' . ':sprintf(', // namespace and J version will be found
|
'ts' => 'Text:' . ':sprintf(', // namespace and J version will be found
|
||||||
'jt' => 'JustTEXT:' . ':_('
|
'jt' => 'JustTEXT:' . ':_(',
|
||||||
|
'spjs' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(', // the joomla power version
|
||||||
|
'spt' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':_(', // the joomla power version
|
||||||
|
'spts' => 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':sprintf(' // the joomla power version
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user