- $data = Probe::uri($url);
- if ($data["network"] == NETWORK_OSTATUS) {
- $result = new_contact($uid, $url, true, NETWORK_OSTATUS);
- if ($result["success"]) {
- $o .= " - ".t("success");
+ $probed = Probe::uri($url);
+ if ($probed['network'] == Protocol::OSTATUS) {
+ $result = Contact::createFromProbe($uid, $url, true, Protocol::OSTATUS);
+ if ($result['success']) {
+ $o .= ' - ' . DI::l10n()->t('success');