diff --git a/archive/community.applications-2022.11.18-x86_64-1.txz b/archive/community.applications-2022.11.18-x86_64-1.txz index 2f4bc9f0..aac7dae9 100644 Binary files a/archive/community.applications-2022.11.18-x86_64-1.txz and b/archive/community.applications-2022.11.18-x86_64-1.txz differ diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 b/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 index d9512219..7bc019d9 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/ca.md5 @@ -3,7 +3,7 @@ ae9874967a4715939f3e97c53676cc33 ./Apps.page 4c5d4598e1bafa46bd90c27cbe302122 ./ca_settings.page e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg 5865b879fdb3dbfb6c893cb49418c6bd ./include/exec.php -58943e7d6c7ded15b71f160bd4493f1d ./include/helpers.php +779ead1d9a8859dd9eed735e673dd8f4 ./include/helpers.php 116042a918060278e77379b0dd73482c ./include/paths.php 532fffdf939594c143e679da02bd841e ./javascript/libraries.js 71f911a818d88d3d567f8a2898094ee2 ./README.md diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/include/helpers.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/include/helpers.php index 4630d057..d9cd488d 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/include/helpers.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/include/helpers.php @@ -63,7 +63,6 @@ function writeJsonFile($filename,$jsonArray) { if ( ! $result ) debug("Write error $filename"); - } function download_url($url, $path = "", $bg = false, $timeout = 45) { @@ -374,7 +373,7 @@ function moderateTemplates() { } writeJsonFile($caPaths['community-templates-info'],$o); $GLOBALS['templates'] = $o; - pluginDupe($o); + pluginDupe(); } ####################################################### # Function to check for a valid URL # @@ -401,12 +400,12 @@ function filterMatch($filter,$searchArray,$exact=true) { ########################################################## # Used to figure out which plugins have duplicated names # ########################################################## -function pluginDupe($templates) { +function pluginDupe() { global $caPaths; $pluginList = []; $dupeList = []; - foreach ($templates as $template) { + foreach ($GLOBALS['templates'] as $template) { if ( $template['Plugin'] ) $pluginList[basename($template['Repository'])]++; } @@ -538,8 +537,7 @@ function formatTags($leadTemplate,$rename="false") { $type = $rename == "true" ? "second" : "default"; -// $file = readJsonFile($caPaths['community-templates-info']); - $file = &$GLOBALS['templates']; + $file = &$GLOBALS['templat`12es']; $template = $file[$leadTemplate]; $childTemplates = $file[$leadTemplate]['BranchID']; @@ -573,19 +571,17 @@ function postReturn($retArray) { #################################### # Translation backwards compatible # #################################### -if ( ! function_exists("tr") ) { - function tr($string,$options=-1) { - $translated = _($string,$options); - if ( ! trim($translated) ) - $translated = $string; - - if ( startsWith($translated,""") && endsWith($translated,""") ) - $translated = first_str_replace(last_str_replace($translated,""",""),""",""); +function tr($string,$options=-1) { + $translated = _($string,$options); + if ( ! trim($translated) ) + $translated = $string; + + if ( startsWith($translated,""") && endsWith($translated,""") ) + $translated = first_str_replace(last_str_replace($translated,""",""),""",""); - $translated = str_replace('"',""",str_replace("'","'",$translated)); + $translated = str_replace('"',""",str_replace("'","'",$translated)); - return $translated; - } + return $translated; } ############################# # Check for language update #