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)
$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));
$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;
<?php
-
+/**
+ * @file mod/follow.php
+ */
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
-require_once 'include/follow.php';
require_once 'include/contact_selectors.php';
function follow_post(App $a) {
// This is just a precaution if maybe this page is called somewhere directly via POST
$_SESSION["fastlane"] = $url;
- $result = new_contact($uid,$url,true);
+ $result = Contact::new($uid, $url, true);
if ($result['success'] == false) {
if ($result['message']) {
<?php
-
+/**
+ * @file mod/fsuggest.php
+ */
use Friendica\App;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
-require_once 'include/follow.php';
-
function fsuggest_post(App $a) {
if (! local_user()) {
<?php
-
+/**
+ * @file mod/ostatus_subscribe.php
+ */
use Friendica\App;
use Friendica\Core\PConfig;
use Friendica\Core\System;
+use Friendica\Model\Contact;
use Friendica\Network\Probe;
-require_once 'include/follow.php';
-
function ostatus_subscribe_content(App $a) {
if (! local_user()) {
$data = Probe::uri($url);
if ($data["network"] == NETWORK_OSTATUS) {
- $result = new_contact($uid, $url, true, NETWORK_OSTATUS);
+ $result = Contact::new($uid, $url, true, NETWORK_OSTATUS);
if ($result["success"]) {
$o .= " - ".t("success");
} else {
<?php
-
+/**
+ * @file mod/repair_ostatus.php
+ */
use Friendica\App;
use Friendica\Core\System;
-
-require_once 'include/follow.php';
+use Friendica\Model\Contact;
function repair_ostatus_content(App $a) {
$o .= "<p>".t("Keep this window open until done.")."</p>";
- $result = new_contact($uid,$r[0]["url"],true);
+ $result = Contact::new($uid,$r[0]["url"],true);
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.System::baseUrl().'/repair_ostatus?counter='.$counter.'">';
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) {
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",
<?php
-
+/**
+ * @file mod/unfollow.php
+ */
use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
-require_once 'include/follow.php';
require_once 'include/contact_selectors.php';
function unfollow_post(App $a) {
require_once 'include/items.php';
require_once 'mod/share.php';
require_once 'include/enotify.php';
-require_once 'include/follow.php';
require_once 'include/api.php';
require_once 'mod/proxy.php';
use dba;
require_once 'include/dba.php';
-require_once 'include/follow.php';
Class OnePoll
{
return;
}
- if (!update_contact($contact["id"])) {
+ if (!Contact::update($contact["id"])) {
Contact::markForArchival($contact);
logger('Contact is marked dead');