Updated doc in include/probe.php

- Fix standards
This commit is contained in:
Hypolite Petovan 2017-05-07 15:00:38 -04:00
parent ee7650795d
commit 92550861e9

View File

@ -2,15 +2,6 @@
use Friendica\Network\Probe; 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 * PROBE_DIASPORA has a bias towards returning Diaspora information
@ -19,16 +10,30 @@ use Friendica\Network\Probe;
* of network. * of network.
* *
*/ */
define('PROBE_NORMAL', 0); define('PROBE_NORMAL', 0);
define('PROBE_DIASPORA', 1); 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; $network = NETWORK_DIASPORA;
else } else {
$network = ""; $network = '';
}
$data = Probe::uri($url, $network); $data = Probe::uri($url, $network);