X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fprobe.php;h=8cf703be80d05da2e5a17ff2b58f18dfd3b781a3;hb=2148a2bdb0cb38d3a085109eeeb6acc5d65484e6;hp=2d52059847befbdc3a3ec7f2be05fa857582a1d7;hpb=3a2988c3fdd3c0c24940ade8aaf192934ed2cd3c;p=friendica.git diff --git a/include/probe.php b/include/probe.php index 2d52059847..8cf703be80 100644 --- a/include/probe.php +++ b/include/probe.php @@ -2,15 +2,6 @@ use Friendica\Network\Probe; -/** - * - * Probe a network address to discover what kind of protocols we need to communicate with it. - * - * Warning: this function is a bit touchy and there are some subtle dependencies within the logic flow. - * Edit with care. - * - */ - /** * * PROBE_DIASPORA has a bias towards returning Diaspora information @@ -19,16 +10,30 @@ use Friendica\Network\Probe; * of network. * */ - define('PROBE_NORMAL', 0); define('PROBE_DIASPORA', 1); -function probe_url($url, $mode = PROBE_NORMAL, $level = 1) { +/** + * @brief Probes a network address to discover what kind of protocols we need to communicate with it. + * + * Warning: this function is a bit touchy and there are some subtle dependencies within the logic flow. + * Edit with care. + * + * @deprecated Use Friendica\Network\Probe instead + * + * @see Friendica\Network\Probe::uri() + * + * @param string $url Any URI + * @param int $mode One of the PROBE_* constants + * @return array Same data array returned by Friendica\Network\Probe::uri() + */ +function probe_url($url, $mode = PROBE_NORMAL) { - if ($mode == PROBE_DIASPORA) + if ($mode == PROBE_DIASPORA) { $network = NETWORK_DIASPORA; - else - $network = ""; + } else { + $network = ''; + } $data = Probe::uri($url, $network);