diff --git a/archive/community.applications-2023.03.03-x86_64-1.txz b/archive/community.applications-2023.03.03-x86_64-1.txz new file mode 100644 index 00000000..8d561c02 Binary files /dev/null and b/archive/community.applications-2023.03.03-x86_64-1.txz differ diff --git a/plugins/community.applications.plg b/plugins/community.applications.plg index 4942706a..523f4139 100644 --- a/plugins/community.applications.plg +++ b/plugins/community.applications.plg @@ -2,8 +2,8 @@ - - + + @@ -13,6 +13,9 @@ +###2023.03.03 +- PHP8 Upgrades + ###2023.02.25 - PHP8 Upgrades 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 09504938..d932aaaa 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 @@ -2,8 +2,8 @@ 106b521c1feebda4d7b3f558cc016cda ./CA_notices.page eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg -2afc8f78a574f96fd8e363fdc79b01cc ./include/exec.php -30945223728e4349d4dd8054cda0a0e1 ./include/helpers.php +6f37a8e88b8b7ff82c8be2cc8d686005 ./include/exec.php +41fd8377dadc9dad5abb4c5fc3fe71ea ./include/helpers.php 8e053d6cd83fbe2202c13b692beabb4f ./include/paths.php 532fffdf939594c143e679da02bd841e ./javascript/libraries.js 71f911a818d88d3d567f8a2898094ee2 ./README.md @@ -17,9 +17,9 @@ fbd7122dbf5312c30d164312aa6c13e4 ./scripts/installMultiPlugin.php 5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh 053585561f8764e01787459f4bcf3a2a ./scripts/notices.php ed42a35b3524b55e2024cdd56a795733 ./scripts/pluginInstall.php -3888e6583182d12a6e993488f0bbbae0 ./scripts/showStatistics.php +f2a86fd875cb73bb095388e69ca035fd ./scripts/showStatistics.php 4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh 5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php 230290ceb59b21a3fae7fa7674d5d89d ./skins/Narrow/css.php d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html -e0ee2a325ef43100b4c810bb61514df4 ./skins/Narrow/skin.php +8ae1b7aabc7e3bd17284dcee30eccc97 ./skins/Narrow/skin.php diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/include/exec.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/include/exec.php index 6d82dd68..ce36e6a5 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/include/exec.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/include/exec.php @@ -847,7 +847,7 @@ function get_content() { } else continue; } if ( $template['Deprecated'] && $displayDeprecated && ! $template['Blacklist']) { - if ( ! $template['BranchID'] ) + if ( ! ($template['BranchID']??false) ) $display[] = $template; continue; } @@ -1468,29 +1468,30 @@ function statistics() { $templates = &$GLOBALS['templates']; pluginDupe(); $invalidXML = readJsonFile($caPaths['invalidXML_txt']); - $statistics['private'] = 0; + $statistics['blacklist'] = $statistics['plugin'] = $statistics['docker'] = $statistics['private'] = $statistics['totalDeprecated'] = $statistics['totalIncompatible'] = $statistics['official'] = $statistics['invalidXML'] = 0; + foreach ($templates as $template) { - if ( $template['Deprecated'] && ! $template['Blacklist'] && ! $template['BranchID']) $statistics['totalDeprecated']++; + if ( ($template['Deprecated']??false) && ! ($template['Blacklist']??false) && ! ($template['BranchID']??false)) $statistics['totalDeprecated']++; - if ( ! $template['Compatible'] ) $statistics['totalIncompatible']++; + if ( ! ($template['Compatible']??false) ) $statistics['totalIncompatible']++; - if ( $template['Blacklist'] ) $statistics['blacklist']++; + if ( $template['Blacklist']??false ) $statistics['blacklist']++; - if ( $template['Private'] && ! $template['Blacklist']) { - if ( ! ($caSettings['hideDeprecated'] == 'true' && $template['Deprecated']) ) + if ( ($template['Private']??false) && ! ($template['Blacklist']??false)) { + if ( ! ($caSettings['hideDeprecated'] == 'true' && ($template['Deprecated']??false)) ) $statistics['private']++; } - if ( $template['Official'] && ! $template['Blacklist'] ) + if ( ($template['Official']??false) && ! ($template['Blacklist']??false) ) $statistics['official']++; - if ( ! $template['PluginURL'] && ! $template['Repository'] ) + if ( ! ($template['PluginURL']??false) && ! ($template['Repository']??false) ) $statistics['invalidXML']++; else { - if ( $template['PluginURL'] ) + if ( $template['PluginURL'] ?? false) $statistics['plugin']++; else { - if ( $template['BranchID'] ) { + if ( $template['BranchID'] ?? false) { continue; } else { $statistics['docker']++; @@ -1851,7 +1852,7 @@ function createXML() { if ( $template['Config'] ) { $testarray = $template['Config'] ?: []; - if (!$testarray[0]) $testarray = [$testarray]; + if (!($testarray[0]??false)) $testarray = [$testarray]; foreach ($testarray as &$config) { if ( is_array($config['@attributes']) ) { 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 7cfdf875..8741517f 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 @@ -244,7 +244,7 @@ function fixTemplates($template) { } else { if (is_array($template['Config'])) { foreach ($template['Config'] as &$config) { - if (preg_match("/^(Container Path:|Container Port:|Container Label:|Container Variable:|Container Device:)/",$config['@attributes']['Description']) ) { + if (preg_match("/^(Container Path:|Container Port:|Container Label:|Container Variable:|Container Device:)/",$config['@attributes']['Description']??"") ) { $config['@attributes']['Description'] = ""; } } @@ -623,10 +623,9 @@ function languageCheck($template) { return false; $OSupdates = readXmlFile($dynamixUpdate,true); // Because the OS might check for an update before the feed - if ( ! $OSupdates ) { - $OSupdates = []; + if ( ! $OSupdates ) $OSupdates['Version'] = "1900.01.01"; - } + $xmlFile = readXmlFile($installedLanguage,true); if ( !$xmlFile['Version'] ) return false; diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/showStatistics.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/showStatistics.php index a7744529..bac6b341 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/showStatistics.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/scripts/showStatistics.php @@ -16,9 +16,10 @@ require_once "$docroot/plugins/dynamix/include/Helpers.php"; $_SERVER['REQUEST_URI'] = "docker/apps"; require_once "$docroot/plugins/dynamix/include/Translations.php"; - require_once "$docroot/plugins/community.applications/include/helpers.php"; +$caSettings = parse_plugin_cfg("community.applications"); + function tr($string,$ret=true) { $string = str_replace('"',""",str_replace("'","'",_($string))); if ( $ret ) @@ -98,7 +99,7 @@ switch ($_GET['arg1']) { foreach (array_keys($dupeList) as $dupe) { echo "$dupe
"; foreach ($templates as $template) { - if ( basename($template['PluginURL']) == $dupe ) { + if ( basename($template['PluginURL']??"") == $dupe ) { echo "{$template['Author']} - {$template['Name']}
"; } } @@ -106,6 +107,7 @@ switch ($_GET['arg1']) { } } $templates = readJsonFile($caPaths['community-templates-info']); + $dupeRepos = ""; foreach ($templates as $template) { $template['Repository'] = str_replace(":latest","",$template['Repository']); $count = 0; @@ -130,8 +132,9 @@ switch ($_GET['arg1']) { case 'Moderation': echo "
".tr("If any of these entries are incorrect then contact the moderators of CA to discuss")."


"; $moderation = file_get_contents($caPaths['moderation']); + $repoComment = ""; foreach ($repositories as $repo) { - if ($repo['RepoComment']) { + if ($repo['RepoComment']??false) { $repoComment .= "{$repo['name']}{$repo['RepoComment']}"; } } diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php index 698f229b..b58bcb15 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/skins/Narrow/skin.php @@ -783,7 +783,7 @@ function getPopupDescriptionSkin($appNumber) { if ( $template['Registry'] ) $supportContext[] = ["icon"=>"ca_fa-docker","link"=>$template['Registry'],"text"=> tr("Registry")]; if ( $caSettings['dev'] == "yes" ) - $supportContext[] = ["icon"=>"ca_fa-template","link"=> $template['caTemplateURL'] ?: $template['TemplateURL'],"text"=>tr("Application Template")]; + $supportContext[] = ["icon"=>"ca_fa-template","link"=> $template['caTemplateURL'] ?: ($template['TemplateURL']??""),"text"=>tr("Application Template")]; $author = $template['PluginURL'] ? $template['PluginAuthor'] : $template['SortAuthor'];