mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:05:19 +02:00
Issue-#3873
Replace deprecated functions with new syntax.
This commit is contained in:
parent
9eb1f4b9c3
commit
0dfa57948f
124 changed files with 819 additions and 679 deletions
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Network\Probe;
|
||||
|
||||
require_once 'include/probe.php';
|
||||
require_once 'include/follow.php';
|
||||
|
||||
function ostatus_subscribe_content(App $a) {
|
||||
|
@ -22,13 +23,13 @@ function ostatus_subscribe_content(App $a) {
|
|||
|
||||
$counter = intval($_REQUEST['counter']);
|
||||
|
||||
if (get_pconfig($uid, "ostatus", "legacy_friends") == "") {
|
||||
if (PConfig::get($uid, "ostatus", "legacy_friends") == "") {
|
||||
|
||||
if ($_REQUEST["url"] == "") {
|
||||
return $o.t("No contact provided.");
|
||||
}
|
||||
|
||||
$contact = probe_url($_REQUEST["url"]);
|
||||
$contact = Probe::uri($_REQUEST["url"]);
|
||||
|
||||
if (!$contact) {
|
||||
return $o.t("Couldn't fetch information for contact.");
|
||||
|
@ -43,10 +44,10 @@ function ostatus_subscribe_content(App $a) {
|
|||
return $o.t("Couldn't fetch friends for contact.");
|
||||
}
|
||||
|
||||
set_pconfig($uid, "ostatus", "legacy_friends", $data["body"]);
|
||||
PConfig::set($uid, "ostatus", "legacy_friends", $data["body"]);
|
||||
}
|
||||
|
||||
$friends = json_decode(get_pconfig($uid, "ostatus", "legacy_friends"));
|
||||
$friends = json_decode(PConfig::get($uid, "ostatus", "legacy_friends"));
|
||||
|
||||
$total = sizeof($friends);
|
||||
|
||||
|
@ -64,7 +65,7 @@ function ostatus_subscribe_content(App $a) {
|
|||
|
||||
$o .= "<p>".$counter."/".$total.": ".$url;
|
||||
|
||||
$data = probe_url($url);
|
||||
$data = Probe::uri($url);
|
||||
if ($data["network"] == NETWORK_OSTATUS) {
|
||||
$result = new_contact($uid, $url, true, NETWORK_OSTATUS);
|
||||
if ($result["success"]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue