diff --git a/archive/community.applications-2022.12.29-x86_64-1.txz b/archive/community.applications-2022.12.29-x86_64-1.txz new file mode 100644 index 00000000..8b28802f Binary files /dev/null and b/archive/community.applications-2022.12.29-x86_64-1.txz differ diff --git a/plugins/community.applications.plg b/plugins/community.applications.plg index 8286787f..b5b912f1 100644 --- a/plugins/community.applications.plg +++ b/plugins/community.applications.plg @@ -2,8 +2,8 @@ - - + + @@ -13,6 +13,10 @@ +###2022.12.29 +- Fixed: Private App Category was not displaying +- Fixed: First load of Apps after a application feed download would result in system thinking no docker apps installed + ###2022.12.28 - Fixed: PHP8 compliance - Changed: Debugging banner enabled now will auto-hide 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 8185142d..5fe1b309 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 @@ b02e9cd2ed57b27e0d29cef4a759b65f ./Apps.page 4e55f7483b661af21a25b677179baffe ./CA_notices.page 600469ce287cb1ed78dc6cc11675cfaf ./ca_settings.page e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg -e7d0e2bf7aeecb97126436a82f36bebf ./include/exec.php -ed2434abe05335b87ddd9d2abc929ea8 ./include/helpers.php +565e74e0eb829851e13b19a8d7746400 ./include/exec.php +c0992dbf9aa4f038c7ac2a1c492370f1 ./include/helpers.php 8d15446d4edf60a1f4ac4493a494a301 ./include/paths.php 532fffdf939594c143e679da02bd841e ./javascript/libraries.js 71f911a818d88d3d567f8a2898094ee2 ./README.md 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 9c1e0722..76510148 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 @@ -212,7 +212,6 @@ function DownloadApplicationFeed() { $info = readJsonFile($caPaths['info']); exec("rm -rf '{$caPaths['tempFiles']}'"); @mkdir($caPaths['templates-community'],0777,true); - writeJsonFile($caPaths['info'],$info); $currentFeed = "Primary Server"; $downloadURL = randomFile(); @@ -442,7 +441,6 @@ function updatePluginSupport($templates) { } function getConvertedTemplates() { - return; global $caPaths, $caSettings, $statistics; # Start by removing any pre-existing private (converted templates) @@ -452,28 +450,25 @@ function getConvertedTemplates() { $myTemplates = []; foreach ($templates as $template) { - if ( ! ($template['Private'] ?? true) ) + if ( ! $template['Private'] ) $myTemplates[] = $template; } $appCount = count($myTemplates); $i = $appCount; - unset($Repos); if ( ! is_dir($caPaths['convertedTemplates']) ) { writeJsonFile($caPaths['community-templates-info'],$myTemplates); $GLOBALS['templates'] = $myTemplates; - return; } $privateTemplates = glob($caPaths['convertedTemplates']."*/*.xml"); - foreach ($privateTemplates as $template) { - $o = addMissingVars(readXmlFile($template)); - + foreach ($privateTemplates as $templateXML) { + $o = addMissingVars(readXmlFile($templateXML)); if ( ! $o['Repository'] ) continue; $o['Private'] = true; - $o['RepoName'] = basename(pathinfo($template,PATHINFO_DIRNAME))." Repository"; + $o['RepoName'] = basename(pathinfo($templateXML,PATHINFO_DIRNAME))." Repository"; $o['ID'] = $i; $o['Displayable'] = true; $o['Date'] = ( $o['Date'] ) ? strtotime( $o['Date'] ) : 0; @@ -487,7 +482,6 @@ function getConvertedTemplates() { } writeJsonFile($caPaths['community-templates-info'],$myTemplates); $GLOBALS['templates'] = $myTemplates; - return true; } ############################# 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 523382a2..0c20375a 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 @@ -652,8 +652,9 @@ function write_ini_file($file,$array) { function getAllInfo($force=false) { global $caSettings, $DockerTemplates, $DockerClient, $caPaths; - $containers = []; - if ( $force ) { + $containers = readJsonFile($caPaths['info']); + + if ( $force || ! $containers || empty($containers) ) { if ( $caSettings['dockerRunning'] ?? false ) { $info = $DockerTemplates->getAllInfo(false,true,true); $containers = $DockerClient->getDockerContainers(); @@ -666,7 +667,6 @@ function getAllInfo($force=false) { debug("Forced info update"); writeJsonFile($caPaths['info'],$containers); } else { - $containers = readJsonFile($caPaths['info']); debug("Cached info update"); } return $containers;