Remove unused templates when switching back and forth from legacy mode to appfeed mode

Typo in path also caused app of the day json file to be stored in the wrong location
pull/2/head
Squidly271 2017-10-08 21:52:50 -04:00
parent 9b52250bfb
commit 0b3b4fc618
3 changed files with 3 additions and 1 deletions

View File

@ -222,6 +222,8 @@ function DownloadCommunityTemplates() {
function DownloadApplicationFeed() {
global $communityPaths, $infoFile, $plugin, $communitySettings, $statistics;
exec("rm -rf '{$communityPaths['templates-community']}'");
exec("mkdir -p '{$communityPaths['templates-community']}'");
$betaComment = "The author of this template has designated it to be a beta. You may experience issues with this application";
$moderation = readJsonFile($communityPaths['moderation']);
if ( ! is_array($moderation) ) {

View File

@ -33,7 +33,7 @@ $communityPaths['updateErrors'] = $communityPaths['tempFiles'].
$communityPaths['dockerUpdateStatus'] = "/var/lib/docker/unraid-update-status.json";
$communityPaths['pinnedRam'] = $communityPaths['tempFiles']."/pinned_apps.json"; # the ram copy of pinned apps for speed
$communityPaths['pinned'] = "/boot/config/plugins/community.applications/pinned_apps.json"; # stored on flash instead of docker.img so it will work without docker running
$communityPaths['appOfTheDay'] = $communityPaths['tmpeFiles']."/appOfTheDay.json";
$communityPaths['appOfTheDay'] = $communityPaths['tempFiles']."/appOfTheDay.json";
$communityPaths['defaultSkin'] = "/usr/local/emhttp/plugins/community.applications/skins/default.skin";
$communityPaths['legacySkin'] = "/usr/local/emhttp/plugins/community.applications/skins/legacy.skin";
$communityPaths['LegacyMode'] = $communityPaths['templates-community']."/legacyModeActive";