The Hubzilla
 All Classes Namespaces Files Functions Variables Pages
hubloc.php File Reference

Hubloc related functions. More...

Functions

 hubloc_store_lowlevel ($arr)
 Create an array for hubloc table and insert record. More...
 
 site_store_lowlevel ($arr)
 
 prune_hub_reinstalls ()
 
 remove_obsolete_hublocs ()
 Remove obsolete hublocs. More...
 
 hubloc_change_primary ($hubloc)
 Change primary hubloc. More...
 
 hubloc_mark_as_down ($posturl)
 Mark a hubloc as down. More...
 
 ping_site ($url)
 

Detailed Description

Hubloc related functions.

Function Documentation

hubloc_change_primary (   $hubloc)

Change primary hubloc.

This actually changes other structures to match the given (presumably current) hubloc primary selection.

Parameters
array$hubloc
Returns
boolean

Referenced by sync_locations().

hubloc_mark_as_down (   $posturl)

Mark a hubloc as down.

We use the post url to distinguish between http and https hublocs. The https might be alive, and the http dead.

Parameters
string$posturlHubloc callback url which to disable

Referenced by Zotlabs\Module\Admin\Queue\get().

hubloc_store_lowlevel (   $arr)

Create an array for hubloc table and insert record.

Creates an assoziative array which will be inserted into the hubloc table.

Parameters
array$arrAn assoziative array with hubloc values
Returns
boolean|PDOStatement

Referenced by change_channel_keys(), channel_change_address(), check_zotinfo(), create_identity(), Zotlabs\Module\Fhublocs\get(), Zotlabs\Module\Import\import_account(), process_channel_sync_delivery(), and sync_locations().

ping_site (   $url)
prune_hub_reinstalls ( )
remove_obsolete_hublocs ( )

Remove obsolete hublocs.

Get rid of any hublocs which are ours but aren't valid anymore - e.g. they point to a different and perhaps transient URL that we aren't using.

I need to stress that this shouldn't happen. fix_system_urls() fixes hublocs when it discovers the URL has changed. So it's unclear how we could end up with URLs pointing to the old site name. But it happens. This may be an artifact of an old bug or maybe a regression in some newer code. In any event, they mess up communications and we have to take action if we find any.

Referenced by Zotlabs\Daemon\Cron_daily\run().

site_store_lowlevel (   $arr)