From 5ee8e390617b7ee4aa556bb54fa36eccb35f02d0 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Thu, 6 Jan 2022 15:14:10 +0100
Subject: [PATCH] filtrer les depots modifies selon le critere de temps

---
 spip-cli/SalvatoreRecharger.php | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/spip-cli/SalvatoreRecharger.php b/spip-cli/SalvatoreRecharger.php
index b5b9cab..81f9fc1 100644
--- a/spip-cli/SalvatoreRecharger.php
+++ b/spip-cli/SalvatoreRecharger.php
@@ -194,12 +194,14 @@ class SalvatoreRecharger extends Command {
 			];
 			 */
 
-			foreach ($liste_trad as $k=>$source) {
-				if ($source['url'] === $c['url']
-					and $source['branche'] === $c['branche']
-				) {
-					$changed_trad[$k] = $source;
-					unset($liste_trad[$k]);
+			if ($c['time'] >= $t_since) {
+				foreach ($liste_trad as $k=>$source) {
+					if ($source['url'] === $c['url']
+						and $source['branche'] === $c['branche']
+					) {
+						$changed_trad[$k] = $source;
+						unset($liste_trad[$k]);
+					}
 				}
 			}
 		}
-- 
GitLab