diff options
author | mrjive <mrjive@mrjive.it> | 2018-02-02 09:23:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 09:23:55 +0100 |
commit | d7ecaa8b23a36ea1e9a0f185017930b5552c00b5 (patch) | |
tree | bc3c6b600f7949ea3adf6854c0bf1690ae6e772e /include/hubloc.php | |
parent | 7ac4b477020689572a50dbc777c968263e86f6c4 (diff) | |
parent | 512f3a764361dde44e36fb72c105265d6df298ad (diff) | |
download | volse-hubzilla-d7ecaa8b23a36ea1e9a0f185017930b5552c00b5.tar.gz volse-hubzilla-d7ecaa8b23a36ea1e9a0f185017930b5552c00b5.tar.bz2 volse-hubzilla-d7ecaa8b23a36ea1e9a0f185017930b5552c00b5.zip |
Merge pull request #14 from redmatrix/dev
Dev
Diffstat (limited to 'include/hubloc.php')
-rw-r--r-- | include/hubloc.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/hubloc.php b/include/hubloc.php index 0daa5908c..0d1a2e560 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -257,6 +257,24 @@ function hubloc_mark_as_down($posturl) { } +/** + * @brief return comma separated string of non-dead clone locations (net addresses) for a given netid + * + * @param string $netid network identity (typically xchan_hash or hubloc_hash) + * @return string + */ + +function locations_by_netid($netid) { + + $locs = q("select hubloc_addr as location from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s' and hubloc_deleted = 0 and site_dead = 0", + dbesc($netid) + ); + + return array_elm_to_str($locs,'location',', '); + +} + + function ping_site($url) { |