From a59ab5552e21c927d861b2b4ef193a545b956b2c Mon Sep 17 00:00:00 2001
From: Adam Magness
Date: Tue, 9 Jan 2018 09:59:52 -0500
Subject: [PATCH] Includes and calls
Remove includes and update function calls
---
mod/contacts.php | 5 ++---
mod/follow.php | 7 ++++---
mod/fsuggest.php | 6 +++---
mod/ostatus_subscribe.php | 9 +++++----
mod/repair_ostatus.php | 9 +++++----
mod/salmon.php | 4 ++--
mod/unfollow.php | 5 +++--
src/Protocol/OStatus.php | 1 -
src/Worker/OnePoll.php | 3 +--
9 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/mod/contacts.php b/mod/contacts.php
index b347617a1c..ea384fbefd 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -14,7 +14,6 @@ use Friendica\Network\Probe;
require_once 'include/contact_selectors.php';
require_once 'include/contact_widgets.php';
-require_once 'include/follow.php';
require_once 'mod/proxy.php';
function contacts_init(App $a)
@@ -243,7 +242,7 @@ function _contact_update($contact_id)
$uid = $contact["uid"];
if ($r[0]["network"] == NETWORK_OSTATUS) {
- $result = new_contact($uid, $contact["url"], false, $contact["network"]);
+ $result = Contact::new($uid, $contact["url"], false, $contact["network"]);
if ($result['success']) {
q("UPDATE `contact` SET `subhub` = 1 WHERE `id` = %d", intval($contact_id));
@@ -275,7 +274,7 @@ function _contact_update_profile($contact_id)
$update = array();
if ($data["network"] == NETWORK_OSTATUS) {
- $result = new_contact($uid, $data["url"], false);
+ $result = Contact::new($uid, $data["url"], false);
if ($result['success']) {
$update["subhub"] = true;
diff --git a/mod/follow.php b/mod/follow.php
index 41c008da51..1f5abccae0 100644
--- a/mod/follow.php
+++ b/mod/follow.php
@@ -1,12 +1,13 @@
".t("Keep this window open until done.")."
";
- $result = new_contact($uid,$r[0]["url"],true);
+ $result = Contact::new($uid,$r[0]["url"],true);
$a->page['htmlhead'] = '';
diff --git a/mod/salmon.php b/mod/salmon.php
index bd08431a4c..1cb118355b 100644
--- a/mod/salmon.php
+++ b/mod/salmon.php
@@ -5,12 +5,12 @@
use Friendica\App;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
+use Friendica\Model\Contact;
use Friendica\Protocol\OStatus;
use Friendica\Protocol\Salmon;
use Friendica\Util\Crypto;
require_once 'include/items.php';
-require_once 'include/follow.php';
function salmon_return($val) {
@@ -164,7 +164,7 @@ function salmon_post(App $a) {
if (! DBM::is_result($r)) {
logger('mod-salmon: Author unknown to us.');
if(PConfig::get($importer['uid'],'system','ostatus_autofriend')) {
- $result = new_contact($importer['uid'],$author_link);
+ $result = Contact::new($importer['uid'], $author_link);
if($result['success']) {
$r = q("SELECT * FROM `contact` WHERE `network` = '%s' AND ( `url` = '%s' OR `alias` = '%s')
AND `uid` = %d LIMIT 1",
diff --git a/mod/unfollow.php b/mod/unfollow.php
index 907982cd8a..98ad9fd026 100644
--- a/mod/unfollow.php
+++ b/mod/unfollow.php
@@ -1,11 +1,12 @@