Logger::log("Fetch post from ".$source_url, Logger::DEBUG);
- $envelope = DI::httpRequest()->fetch($source_url);
+ $envelope = DI::httpClient()->fetch($source_url);
if ($envelope) {
Logger::log("Envelope was fetched.", Logger::DEBUG);
$x = self::verifyMagicEnvelope($envelope);
'notify' => $data['notify'], 'poll' => $data['poll'],
'network' => $data['network']];
- DBA::update('contact', $fields, ['addr' => $old_handle]);
+ Contact::update($fields, ['addr' => $old_handle]);
Logger::log('Contacts are updated.');
$fields['bd'] = $birthday;
}
- DBA::update('contact', $fields, ['id' => $contact['id']]);
+ Contact::update($fields, ['id' => $contact['id']]);
Logger::log("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], Logger::DEBUG);
return true;
} else {
Logger::log("Author ".$author." doesn't want to follow us anymore.", Logger::DEBUG);
- Contact::removeFollower($importer, $contact);
+ Contact::removeFollower($contact);
return true;
}
}
if (!intval(DI::config()->get("system", "diaspora_test"))) {
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
- $postResult = DI::httpRequest()->post($dest_url . "/", $envelope, ['Content-Type' => $content_type]);
+ $postResult = DI::httpClient()->post($dest_url . "/", $envelope, ['Content-Type' => $content_type]);
$return_code = $postResult->getReturnCode();
} else {
Logger::log("test_mode");
$dob = '';
if ($profile['dob'] && ($profile['dob'] > '0000-00-00')) {
- list($year, $month, $day) = sscanf($profile['dob'], '%4d-%2d-%2d');
+ [$year, $month, $day] = sscanf($profile['dob'], '%4d-%2d-%2d');
if ($year < 1004) {
$year = 1004;
}