diff --git a/archive/community.applications-2024.02.03-x86_64-1.txz b/archive/community.applications-2024.02.03-x86_64-1.txz new file mode 100644 index 00000000..bead2e2f Binary files /dev/null and b/archive/community.applications-2024.02.03-x86_64-1.txz differ diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page b/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page index a0aa0e38..5275ea2b 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/Apps.page @@ -267,7 +267,10 @@ $(function(){ if ( "" == "12/31" ) addBannerWarning(" ",false); if ( "" == "false" ) addBannerWarning("",true,true); if ( "" == "true" ) addBannerWarning(""); - + + addBannerWarning("*** LOCAL FEED RUNNING - DO NOT RELEASE ***",true,true); + + context.init({preventDoubleContext:false,left:false,right:false,bottom:true,above:true}); $(".maxPerPage").html(sprintf("","")); 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 8f1fb78e..60312e2b 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 @@ -1,10 +1,10 @@ -e846701491233a242570807f29517fed ./Apps.page +d2c361aeb0461a7f76f1fa106d315d60 ./Apps.page 2defe45163697e40c813a57ae9a50231 ./CA_notices.page a3cb6f32cb9453c058563b6860f70a31 ./ca_settings.page 01ed7990078dee7cecfeda9a4e49377e ./default.cfg -76538e21e626308522c1e13198a00bdd ./include/exec.php +1605a0265cab145fb2b4b26632215bb6 ./include/exec.php 1d21e20284741127836e4acdafff3cb1 ./include/helpers.php -024499c59dcea65a8cf1f224e2bd36e7 ./include/paths.php +da69c4eaa9879a32152dc5fc3fedbcbf ./include/paths.php 7234caf6800479df03abb222aaedaca5 ./javascript/libraries.js 71f911a818d88d3d567f8a2898094ee2 ./README.md d6d93feb1975100b513b15b31aa20068 ./scripts/checkForUpdates.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 808dd5f3..bc4bb7dd 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 @@ -218,17 +218,21 @@ function DownloadApplicationFeed() { @mkdir($caPaths['templates-community'],0777,true); $currentFeed = "Primary Server"; - $downloadURL = randomFile(); - $ApplicationFeed = download_json($caPaths['application-feed'],$downloadURL,"",20); - if ( (! is_array($ApplicationFeed['applist'])) || empty($ApplicationFeed['applist']) ) { - $currentFeed = "Backup Server"; - $ApplicationFeed = download_json($caPaths['application-feedBackup'],$downloadURL); - } - @unlink($downloadURL); - if ( (! is_array($ApplicationFeed['applist'])) || empty($ApplicationFeed['applist']) ) { - @unlink($caPaths['currentServer']); - ca_file_put_contents($caPaths['appFeedDownloadError'],$downloadURL); - return false; + if ( $caPaths['localONLY'] ) { + $ApplicationFeed = json_decode(file_get_contents($caPaths['application-feed-local']),true); + } else { + $downloadURL = randomFile(); + $ApplicationFeed = download_json($caPaths['application-feed'],$downloadURL,"",20); + if ( (! is_array($ApplicationFeed['applist'])) || empty($ApplicationFeed['applist']) ) { + $currentFeed = "Backup Server"; + $ApplicationFeed = download_json($caPaths['application-feedBackup'],$downloadURL); + } + @unlink($downloadURL); + if ( (! is_array($ApplicationFeed['applist'])) || empty($ApplicationFeed['applist']) ) { + @unlink($caPaths['currentServer']); + ca_file_put_contents($caPaths['appFeedDownloadError'],$downloadURL); + return false; + } } ca_file_put_contents($caPaths['currentServer'],$currentFeed); $i = 0; @@ -1022,6 +1026,12 @@ function get_content() { function force_update() { global $caPaths, $caSettings; + if ( $caPaths['localONLY'] ) { + exec("rm -rf '{$caPaths['tempFiles']}'"); + @mkdir($caPaths['templates-community'],0777,true); + $GLOBALS['templates'] = []; + } + $lastUpdatedOld = readJsonFile($caPaths['lastUpdated-old']); debug("old feed timestamp: ".($lastUpdatedOld['last_updated_timestamp'] ?? "")); @unlink($caPaths['lastUpdated']); diff --git a/source/community.applications/usr/local/emhttp/plugins/community.applications/include/paths.php b/source/community.applications/usr/local/emhttp/plugins/community.applications/include/paths.php index 27058a76..f952c9f3 100644 --- a/source/community.applications/usr/local/emhttp/plugins/community.applications/include/paths.php +++ b/source/community.applications/usr/local/emhttp/plugins/community.applications/include/paths.php @@ -38,10 +38,12 @@ $caPaths['community-templates-allSearchResults']= $caPaths['tempFiles']."/allSea $caPaths['community-templates-catSearchResults']= $caPaths['tempFiles']."/catSearchResults.json"; $caPaths['startupDisplayed'] = $caPaths['tempFiles']."/startupDisplayed"; $caPaths['repositoriesDisplayed'] = $caPaths['tempFiles']."/repositoriesDisplayed.json"; +$caPaths['localONLY'] = false; /* THIS MUST NOT BE SET TO TRUE WHEN DOING A RELEASE */ $caPaths['application-feed'] = "https://raw.githubusercontent.com/Squidly271/AppFeed/master/applicationFeed.json"; $caPaths['application-feed-last-updated'] = "https://raw.githubusercontent.com/Squidly271/AppFeed/master/applicationFeed-lastUpdated.json"; $caPaths['application-feedBackup'] = "https://dnld.lime-technology.com/appfeed/master/applicationFeed.json"; $caPaths['application-feed-last-updatedBackup'] = "https://dnld.lime-technology.com/appfeed/master/applicationFeed-lastUpdated.json"; +$caPaths['application-feed-local'] = "/tmp/GitHub/AppFeed/applicationFeed.json"; $caPaths['appFeedDownloadError'] = $caPaths['tempFiles']."/downloaderror.txt"; $caPaths['categoryList'] = $caPaths['tempFiles']."/categoryList.json"; $caPaths['repositoryList'] = $caPaths['tempFiles']."/repositoryList.json";