diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Onedirsync.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Zotlabs/Daemon/Onedirsync.php b/Zotlabs/Daemon/Onedirsync.php index a952b8117..f29fbe5b8 100644 --- a/Zotlabs/Daemon/Onedirsync.php +++ b/Zotlabs/Daemon/Onedirsync.php @@ -11,14 +11,14 @@ require_once('include/dir_fns.php'); class Onedirsync { - static public function run($argc,$argv) { + static public function run($argc, $argv) { logger('onedirsync: start ' . intval($argv[1])); - if(($argc > 1) && (intval($argv[1]))) + if (($argc > 1) && (intval($argv[1]))) $update_id = intval($argv[1]); - if(! $update_id) { + if (!$update_id) { logger('onedirsync: no update'); return; } @@ -27,9 +27,9 @@ class Onedirsync { intval($update_id) ); - if(! $r) + if (!$r) return; - if(($r[0]['ud_flags'] & UPDATE_FLAGS_UPDATED) || (! $r[0]['ud_addr'])) + if (($r[0]['ud_flags'] & UPDATE_FLAGS_UPDATED) || (!$r[0]['ud_addr'])) return; // Have we probed this channel more recently than the other directory server @@ -41,8 +41,8 @@ class Onedirsync { dbesc($r[0]['ud_date']), intval(UPDATE_FLAGS_UPDATED) ); - if($x) { - $y = q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 and ud_date != '%s'", + if ($x) { + q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 and ud_date != '%s'", intval(UPDATE_FLAGS_UPDATED), dbesc($r[0]['ud_addr']), intval(UPDATE_FLAGS_UPDATED), @@ -59,8 +59,8 @@ class Onedirsync { $h = Libzot::zot_record_preferred($h); - if(($h) && ($h['hubloc_status'] & HUBLOC_OFFLINE)) { - $y = q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 ", + if (($h) && ($h['hubloc_status'] & HUBLOC_OFFLINE)) { + q("update updates set ud_flags = ( ud_flags | %d ) where ud_addr = '%s' and ( ud_flags & %d ) = 0 ", intval(UPDATE_FLAGS_UPDATED), dbesc($r[0]['ud_addr']), intval(UPDATE_FLAGS_UPDATED) @@ -72,7 +72,7 @@ class Onedirsync { // we might have to pull this out some day, but for now update_directory_entry() // runs zot_finger() and is kind of zot specific - if($h && ! in_array($h['hubloc_network'], ['zot6', 'zot'])) + if ($h && !in_array($h['hubloc_network'], ['zot6', 'zot'])) return; Libzotdir::update_directory_entry($r[0]); |