aboutsummaryrefslogtreecommitdiffstats
path: root/include/dir_fns.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/dir_fns.php')
-rw-r--r--include/dir_fns.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 71800cb47..2f4830d05 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -98,7 +98,14 @@ function sync_directories($dirmode) {
foreach($r as $rr) {
if(! $rr['site_directory'])
continue;
- $x = z_fetch_url($rr['site_directory'] . '?f=&sync=' . urlencode($rr['site_sync']));
+
+ logger('sync directories: ' . $rr['site_directory']);
+
+ // for brand new directory servers, only load the last couple of days. Everything before that will be repeats.
+
+ $syncdate = (($rr['site_sync'] === '0000-00-00 00:00:00') ? datetime_convert('UTC','UTC','now - 2 days') : $rr['site_sync']);
+ $x = z_fetch_url($rr['site_directory'] . '?f=&sync=' . urlencode($syncdate));
+
if(! $x['success'])
continue;
$j = json_decode($x['body'],true);