aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/dir_fns.php7
-rw-r--r--mod/dirsearch.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 71800cb47..260fa3f93 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -98,7 +98,12 @@ 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']));
+
+ // 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);
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index b612adcc5..0ace4ecae 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -176,7 +176,7 @@ function dirsearch_content(&$a) {
if($sync) {
$spkt = array('transactions' => array());
- $r = q("select * from updates where ud_date >= '%s' and ud_guid != '' group by ud_addr order by ud_date desc",
+ $r = q("select * from updates where ud_date >= '%s' and ud_guid != '' order by ud_date desc",
dbesc($sync)
);
if($r) {