From 101cd50261dd267c668c61077add93e0ca667b98 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Mon, 13 Jan 2025 10:47:18 +0100 Subject: [PATCH] fixed cache disabling --- .../DashboardNew/DashboardNewController.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/application/DashboardNew/DashboardNewController.php b/application/DashboardNew/DashboardNewController.php index c8b930331..b5868d0fd 100644 --- a/application/DashboardNew/DashboardNewController.php +++ b/application/DashboardNew/DashboardNewController.php @@ -99,19 +99,7 @@ class DashboardNewController extends mfBaseController { } private function checkParameterAuthorization($campaign_ids = []) { - // $campaigns = PreordercampaignModel::search(["owner_id" => $this->me->address_id]); - // $campaign_filter = ["preordercampaign_id" => $campaign_ids]; - // if(!$campaign_ids) { - // foreach(PreordercampaignModel::search(["owner_id" => $this->me->address_id]) as $campaign) { - // $campaign_ids[] = $campaign->id; - // } - // } - // we need to use this if the user is not a admin to only show his campaigns - // we will pass the campaign_ids to the function and check if the user is allowed to see the data - // if the user is not allowed to see the data we will return an empty array - $campaigns = PreordercampaignModel::search(["owner_id" => $this->me->address_id]); - // loop through the campaigns and check if the user is allowed to see the data foreach ($campaigns as $campaign) { if (!in_array($campaign->id, $campaign_ids)) { $key = array_search($campaign->id, $campaign_ids); @@ -225,11 +213,6 @@ class DashboardNewController extends mfBaseController { return $timeline; } - - - // add Leerrohr to timeline - // add ont installed to timeline - private function getTimelineData($type, $params) { $timeline = []; $start = strtotime('-1 year'); @@ -247,7 +230,7 @@ class DashboardNewController extends mfBaseController { } // Load cached data if it exists - if (file_exists($cacheFile) && false) { + if (file_exists($cacheFile)) { $cachedData = json_decode(file_get_contents($cacheFile), true); $lastCachedDate = end($cachedData)['date']; $lastCachedTimestamp = strtotime($lastCachedDate);