Poco and gcontact (mostly) removed

This commit is contained in:
Michael 2020-08-01 16:15:18 +00:00
parent a9a9f7d51d
commit 0c73531da1
34 changed files with 370 additions and 2032 deletions

View file

@ -34,7 +34,6 @@ use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Conversation;
use Friendica\Model\GContact;
use Friendica\Model\Item;
use Friendica\Model\ItemURI;
use Friendica\Model\Mail;
@ -1656,7 +1655,7 @@ class Diaspora
// Update the profile
self::receiveProfile($importer, $data->profile);
// change the technical stuff in contact and gcontact
// change the technical stuff in contact
$data = Probe::uri($new_handle);
if ($data['network'] == Protocol::PHANTOM) {
Logger::log('Account for '.$new_handle." couldn't be probed.");
@ -1671,14 +1670,6 @@ class Diaspora
DBA::update('contact', $fields, ['addr' => $old_handle]);
$fields = ['url' => $data['url'], 'nurl' => Strings::normaliseLink($data['url']),
'name' => $data['name'], 'nick' => $data['nick'],
'addr' => $data['addr'], 'connect' => $data['addr'],
'notify' => $data['notify'], 'photo' => $data['photo'],
'server_url' => $data['baseurl'], 'network' => $data['network']];
DBA::update('gcontact', $fields, ['addr' => $old_handle]);
Logger::log('Contacts are updated.');
return true;
@ -1702,8 +1693,6 @@ class Diaspora
}
DBA::close($contacts);
DBA::delete('gcontact', ['addr' => $author]);
Logger::log('Removed contacts for ' . $author);
return true;
@ -2438,18 +2427,6 @@ class Diaspora
DBA::update('contact', $fields, ['id' => $contact['id']]);
// @todo Update the public contact, then update the gcontact from that
$gcontact = ["url" => $contact["url"], "network" => Protocol::DIASPORA, "generation" => 2,
"photo" => $image_url, "name" => $name, "location" => $location,
"about" => $about, "birthday" => $birthday,
"addr" => $author, "nick" => $nick, "keywords" => $keywords,
"hide" => !$searchable, "nsfw" => $nsfw];
$gcid = GContact::update($gcontact);
GContact::link($gcid, $importer["uid"], $contact["id"]);
Logger::log("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], Logger::DEBUG);
return true;