diff options
author | Mario <mario@mariovavti.com> | 2021-01-18 14:24:44 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-01-18 14:24:44 +0000 |
commit | 08d2fb4ed4e7573e81a646a194361976c0f8f0c3 (patch) | |
tree | 86a248e88513725a01abc05091f1423ffa0f0c7a | |
parent | 836637621d7cbe930917fac483af46a5abc6c081 (diff) | |
download | volse-hubzilla-08d2fb4ed4e7573e81a646a194361976c0f8f0c3.tar.gz volse-hubzilla-08d2fb4ed4e7573e81a646a194361976c0f8f0c3.tar.bz2 volse-hubzilla-08d2fb4ed4e7573e81a646a194361976c0f8f0c3.zip |
more cleanup daemon/onedirsync
-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]); |