GlobalContact created

Moved DirSearch and GlobalContact related functions to Friendica\Model namespace
This commit is contained in:
Adam Magness 2017-11-15 09:47:28 -05:00
commit 47db624105
26 changed files with 2715 additions and 2610 deletions

1004
src/Model/GlobalContact.php Normal file

File diff suppressed because it is too large Load diff

View file

@ -12,6 +12,7 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Model\GlobalContact;
use Friendica\Database\DBM;
use Friendica\Util\XML;
@ -1675,9 +1676,9 @@ class DFRN
$poco["photo"] = $author["avatar"];
$poco["hide"] = $hide;
$poco["contact-type"] = $contact["contact-type"];
$gcid = update_gcontact($poco);
$gcid = GlobalContact::update($poco);
link_gcontact($gcid, $importer["uid"], $contact["id"]);
GlobalContact::link($gcid, $importer["uid"], $contact["id"]);
}
return($author);

View file

@ -16,6 +16,7 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Util\XML;
@ -2246,9 +2247,9 @@ class Diaspora
"addr" => $author, "nick" => $nick, "keywords" => $keywords,
"hide" => !$searchable, "nsfw" => $nsfw);
$gcid = update_gcontact($gcontact);
$gcid = GlobalContact::update($gcontact);
link_gcontact($gcid, $importer["uid"], $contact["id"]);
GlobalContact::link($gcid, $importer["uid"], $contact["id"]);
logger("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], LOGGER_DEBUG);

File diff suppressed because it is too large Load diff

View file

@ -4,11 +4,13 @@ namespace Friendica\Worker;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Protocol\PortableContact;
use dba;
require_once 'include/follow.php';
Class OnePoll {
Class OnePoll
{
public static function execute($contact_id = 0, $command = '') {
global $a;
@ -16,7 +18,6 @@ Class OnePoll {
require_once 'include/items.php';
require_once 'include/Contact.php';
require_once 'include/email.php';
require_once 'include/socgraph.php';
require_once 'include/queue_fn.php';
logger('onepoll: start');
@ -72,7 +73,7 @@ Class OnePoll {
);
if (DBM::is_result($r)) {
if (!$r[0]['total']) {
poco_load($contact['id'], $importer_uid, 0, $contact['poco']);
PortableContact::loadWorker($contact['id'], $importer_uid, 0, $contact['poco']);
}
}
}