diff options
author | friendica <info@friendica.com> | 2013-11-28 16:46:47 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-11-28 16:46:47 -0800 |
commit | fafba385c1f7bebc61909ab4b9add075c08fcd4e (patch) | |
tree | 4aea812286a7baa96efa0bf1bdeb2510a5c86537 /include | |
parent | 13e73c005a9bb20b44cc5ef32646178b3b62f243 (diff) | |
download | volse-hubzilla-fafba385c1f7bebc61909ab4b9add075c08fcd4e.tar.gz volse-hubzilla-fafba385c1f7bebc61909ab4b9add075c08fcd4e.tar.bz2 volse-hubzilla-fafba385c1f7bebc61909ab4b9add075c08fcd4e.zip |
only list undeleted hublocs in zot_finger
Diffstat (limited to 'include')
-rw-r--r-- | include/zot.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php index 6ee7665ee..156a26e9c 100644 --- a/include/zot.php +++ b/include/zot.php @@ -19,7 +19,8 @@ function zot_new_uid($channel_nick) { /** * @function zot_get_hublocs($hash) - * Given a zot hash, return all distinct hubs + * Given a zot hash, return all distinct hubs. + * This function is used in building the zot discovery packet * @param string $hash - xchan_hash * @retuns array * @@ -27,10 +28,12 @@ function zot_new_uid($channel_nick) { function zot_get_hublocs($hash) { - $ret = q("select * from hubloc where hubloc_hash = '%s' group by hubloc_url ", - dbesc($hash) - ); + /** Only search for active hublocs - e.g. those that haven't been marked deleted */ + $ret = q("select * from hubloc where hubloc_hash = '%s' and not ( hubloc_flags & %d ) group by hubloc_url ", + dbesc($hash), + intval(HUBLOC_FLAGS_DELETED) + ); return $ret; } |