From be6da3481ff2d04f63eebc4c2a8d6e96b05fea32 Mon Sep 17 00:00:00 2001 From: iglocska Date: Wed, 10 Jul 2019 15:10:23 +0200 Subject: [PATCH] fix: [sync] Proposal pull restricted to 14 days - no need to pull ancient proposals each time --- app/Controller/ShadowAttributesController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Controller/ShadowAttributesController.php b/app/Controller/ShadowAttributesController.php index 97f80cea9..0ba86e9ff 100644 --- a/app/Controller/ShadowAttributesController.php +++ b/app/Controller/ShadowAttributesController.php @@ -1024,7 +1024,10 @@ class ShadowAttributesController extends AppController if (!empty($this->request->data)) { foreach ($this->request->data as $eventUuid) { $temp = $this->ShadowAttribute->find('all', array( - 'conditions' => array('event_uuid' => $eventUuid), + 'conditions' => array( + 'event_uuid' => $eventUuid, + 'timestamp >' => strtotime("-14 day") + ), 'recursive' => -1, 'contain' => array( 'Org' => array('fields' => array('uuid', 'name')),