diff options
author | friendica <info@friendica.com> | 2013-04-18 20:47:35 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-04-18 20:47:35 -0700 |
commit | 0fbb3b6a97e51fbfc02e56f3651d4bf9fdd0575c (patch) | |
tree | ef5ec7f30cc08270baeedb76b9476f2225f32783 /include/poller.php | |
parent | 2679a5990e8551d8d63ef561d762ca16dde520c4 (diff) | |
download | volse-hubzilla-0fbb3b6a97e51fbfc02e56f3651d4bf9fdd0575c.tar.gz volse-hubzilla-0fbb3b6a97e51fbfc02e56f3651d4bf9fdd0575c.tar.bz2 volse-hubzilla-0fbb3b6a97e51fbfc02e56f3651d4bf9fdd0575c.zip |
for directory sync, ensure we have a fallback master; even if we have nothing else
Diffstat (limited to 'include/poller.php')
-rw-r--r-- | include/poller.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/poller.php b/include/poller.php index 1dd065196..33e882735 100644 --- a/include/poller.php +++ b/include/poller.php @@ -50,16 +50,23 @@ function poller_run($argv, $argc){ if($d2 != intval($d1)) { + // If this is a directory server, request a sync with an upstream + // directory at least once a day, up to once every poll interval. + // Pull remote changes and push local changes. + // potential issue: how do we keep from creating an endless update loop? + + $dirmode = get_config('system','directory_mode'); + if($dirmode == DIRECTORY_MODE_SECONDARY || $dirmode == DIRECTORY_MODE_PRIMARY) { + require_once('include/dir_fns.php'); + sync_directories($dirmode); + } + // update_suggestions(); set_config('system','last_expire_day',$d2); proc_run('php','include/expire.php'); } - // If this is a directory server, request a sync with an upstream - // directory at least once a day, up to once every poll interval. - // Pull remote changes and push local changes. - // potential issue: how do we keep from creating an endless update loop? $manual_id = 0; $generation = 0; |