From 37ad7da5ad40f88b2026aba3c552fbf624263b11 Mon Sep 17 00:00:00 2001 From: aB0t Date: Sat, 27 Apr 2024 15:33:41 +0200 Subject: [PATCH] update 2024-04-27 15:33:41 --- .../code.php | 44 ++++++++++++------- .../code.power | 44 ++++++++++++------- .../code.php | 4 ++ .../code.power | 4 ++ .../code.php | 11 ++++- .../code.power | 11 ++++- .../code.php | 7 ++- .../code.power | 7 ++- 8 files changed, 92 insertions(+), 40 deletions(-) diff --git a/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.php b/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.php index 1f15a35..a38a8b2 100644 --- a/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.php +++ b/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.php @@ -158,28 +158,38 @@ class Data // check if layout keys were passed if (!ArrayHelper::check($layouts)) { + $layout_bucket = []; // set the Layout data - $lay1 = GetHelper::allBetween( + if (($layouts_found = GetHelper::allBetween( $content, "LayoutHelper::render('", "'," - ); - $lay2 = GetHelper::allBetween( - $content, 'LayoutHelper::render("', '",' - ); - if (ArrayHelper::check($lay1) - && ArrayHelper::check($lay2)) + )) !== null) { - $layouts = array_merge($lay1, $lay2); + $layout_bucket[] = $layouts_found; } - else + if (($layouts_found = GetHelper::allBetween( + $content, 'LayoutHelper::render("', '",' + )) !== null) { - if (ArrayHelper::check($lay1)) - { - $layouts = $lay1; - } - elseif (ArrayHelper::check($lay2)) - { - $layouts = $lay2; - } + $layout_bucket[] = $layouts_found; + } + // set the Layout data + if (($layouts_found = GetHelper::allBetween( + $content, "Joomla__" . "_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('", "'," + )) !== null) + { + $layout_bucket[] = $layouts_found; + } + if (($layouts_found = GetHelper::allBetween( + $content, 'Joomla__' . '_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render("', '",' + )) !== null) + { + $layout_bucket[] = $layouts_found; + } + + // Flatten and merge all collected layouts if any + if ($layout_bucket !== []) + { + $layouts = array_merge($layouts, ...$layout_bucket); } } diff --git a/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.power b/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.power index cd3f67a..7658d9b 100644 --- a/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.power +++ b/src/39ea8150-f124-4e47-909d-641bf1c96d5e/code.power @@ -129,28 +129,38 @@ // check if layout keys were passed if (!ArrayHelper::check($layouts)) { + $layout_bucket = []; // set the Layout data - $lay1 = GetHelper::allBetween( + if (($layouts_found = GetHelper::allBetween( $content, "LayoutHelper::render('", "'," - ); - $lay2 = GetHelper::allBetween( - $content, 'LayoutHelper::render("', '",' - ); - if (ArrayHelper::check($lay1) - && ArrayHelper::check($lay2)) + )) !== null) { - $layouts = array_merge($lay1, $lay2); + $layout_bucket[] = $layouts_found; } - else + if (($layouts_found = GetHelper::allBetween( + $content, 'LayoutHelper::render("', '",' + )) !== null) { - if (ArrayHelper::check($lay1)) - { - $layouts = $lay1; - } - elseif (ArrayHelper::check($lay2)) - { - $layouts = $lay2; - } + $layout_bucket[] = $layouts_found; + } + // set the Layout data + if (($layouts_found = GetHelper::allBetween( + $content, "Joomla__" . "_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render('", "'," + )) !== null) + { + $layout_bucket[] = $layouts_found; + } + if (($layouts_found = GetHelper::allBetween( + $content, 'Joomla__' . '_7ab82272_0b3d_4bb1_af35_e63a096cfe0b___Power::render("', '",' + )) !== null) + { + $layout_bucket[] = $layouts_found; + } + + // Flatten and merge all collected layouts if any + if ($layout_bucket !== []) + { + $layouts = array_merge($layouts, ...$layout_bucket); } } diff --git a/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.php b/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.php index 2ec77fe..0dae631 100644 --- a/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.php +++ b/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.php @@ -546,10 +546,14 @@ final class CustomFieldTypeFile if ($this->config->get('joomla_version', 3) != 3) { $placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()'; + $placeholders['\JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()'; $placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()'; $placeholders['JFactory::'] = 'Factory::'; + $placeholders['\JFactory::'] = 'Factory::'; $placeholders['JHtml::'] = 'Html::'; + $placeholders['\JHtml::'] = 'Html::'; $placeholders['JText::'] = 'Text::'; + $placeholders['\JText::'] = 'Text::'; $placeholders['JComponentHelper::'] = 'ComponentHelper::'; $placeholders['\JComponentHelper::'] = 'ComponentHelper::'; } diff --git a/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.power b/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.power index 80b3540..5138f8d 100644 --- a/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.power +++ b/src/6dced3d9-7d10-4ea1-bcf6-a5e6af4b9c96/code.power @@ -500,10 +500,14 @@ if ($this->config->get('joomla_version', 3) != 3) { $placeholders['JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()'; + $placeholders['\JFactory::getUser()'] = 'Factory::getApplication()->getIdentity()'; $placeholders['Factory::getUser()'] = 'Factory::getApplication()->getIdentity()'; $placeholders['JFactory::'] = 'Factory::'; + $placeholders['\JFactory::'] = 'Factory::'; $placeholders['JHtml::'] = 'Html::'; + $placeholders['\JHtml::'] = 'Html::'; $placeholders['JText::'] = 'Text::'; + $placeholders['\JText::'] = 'Text::'; $placeholders['JComponentHelper::'] = 'ComponentHelper::'; $placeholders['\JComponentHelper::'] = 'ComponentHelper::'; } diff --git a/src/d33b9278-c409-4aec-a047-b72f56712391/code.php b/src/d33b9278-c409-4aec-a047-b72f56712391/code.php index 7ade065..57a0bd7 100644 --- a/src/d33b9278-c409-4aec-a047-b72f56712391/code.php +++ b/src/d33b9278-c409-4aec-a047-b72f56712391/code.php @@ -147,7 +147,9 @@ class Extractor } } // 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( $content, "JText:" . ":script('", "'" @@ -161,6 +163,12 @@ class Extractor $sc_text[] = GetHelper::allBetween( $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 $sc_text = ArrayHelper::merge($sc_text); // we need to add a check to insure these JavaScript lang matchup @@ -192,6 +200,7 @@ class Extractor if ($lang_string_target === 'Joomla' . '.JText._(' || $lang_string_target === 'JText:' . ':script(' || $lang_string_target === 'Text:' . ':script(' + || $lang_string_target === 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(' || $lang_string_target === 'JustTEXT:' . ':_(') { continue; diff --git a/src/d33b9278-c409-4aec-a047-b72f56712391/code.power b/src/d33b9278-c409-4aec-a047-b72f56712391/code.power index 41496a6..2c56ade 100644 --- a/src/d33b9278-c409-4aec-a047-b72f56712391/code.power +++ b/src/d33b9278-c409-4aec-a047-b72f56712391/code.power @@ -118,7 +118,9 @@ } } // 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( $content, "JText:" . ":script('", "'" @@ -132,6 +134,12 @@ $sc_text[] = GetHelper::allBetween( $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 $sc_text = ArrayHelper::merge($sc_text); // we need to add a check to insure these JavaScript lang matchup @@ -163,6 +171,7 @@ if ($lang_string_target === 'Joomla' . '.JText._(' || $lang_string_target === 'JText:' . ':script(' || $lang_string_target === 'Text:' . ':script(' + || $lang_string_target === 'Joomla__' . '_ba6326ef_cb79_4348_80f4_ab086082e3c5___Power:' . ':script(' || $lang_string_target === 'JustTEXT:' . ':_(') { continue; diff --git a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php index e0c8b98..30852bd 100644 --- a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php +++ b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.php @@ -654,9 +654,12 @@ class Config extends BaseConfig return [ 'jjt' => 'Joomla' . '.JText._(', '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 - '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 ]; } diff --git a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power index 4f12f96..0d65089 100644 --- a/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power +++ b/src/fa4bf18e-301e-42e3-91fb-6e0096c07adc/code.power @@ -620,9 +620,12 @@ return [ 'jjt' => 'Joomla' . '.JText._(', '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 - '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 ]; }