use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
+use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Core\Worker;
return;
}
} elseif (!isset($contact['url'])) {
- logger('Empty contact: ' . json_encode($contact) . ' - ' . System::callstack(20), LOGGER_DEBUG);
+ Logger::log('Empty contact: ' . json_encode($contact) . ' - ' . System::callstack(20), LOGGER_DEBUG);
}
// Contact already archived or "self" contact? => nothing to do
*/
public static function getIdForURL($url, $uid = 0, $no_update = false, $default = [], $in_loop = false)
{
- logger("Get contact data for url " . $url . " and user " . $uid . " - " . System::callstack(), LOGGER_DEBUG);
+ Logger::log("Get contact data for url " . $url . " and user " . $uid . " - " . System::callstack(), LOGGER_DEBUG);
$contact_id = 0;
}
if (($network != '') && ($ret['network'] != $network)) {
- logger('Expected network ' . $network . ' does not match actual network ' . $ret['network']);
+ Logger::log('Expected network ' . $network . ' does not match actual network ' . $ret['network']);
return $result;
}
}
} elseif ($contact['network'] == Protocol::DIASPORA) {
$ret = Diaspora::sendShare($a->user, $contact);
- logger('share returns: ' . $ret);
+ Logger::log('share returns: ' . $ret);
} elseif ($contact['network'] == Protocol::ACTIVITYPUB) {
$ret = ActivityPub\Transmitter::sendActivity('Follow', $contact['url'], $uid);
- logger('Follow returns: ' . $ret);
+ Logger::log('Follow returns: ' . $ret);
}
}
// send email notification to owner?
} else {
if (DBA::exists('contact', ['nurl' => normalise_link($url), 'uid' => $importer['uid'], 'pending' => true])) {
- logger('ignoring duplicated connection request from pending contact ' . $url);
+ Logger::log('ignoring duplicated connection request from pending contact ' . $url);
return;
}
// create contact record
$r = q("SELECT * FROM `contact` WHERE `bd` != '' AND `bd` > '0001-01-01' AND SUBSTRING(`bd`, 1, 4) != `bdyear` ");
if (DBA::isResult($r)) {
foreach ($r as $rr) {
- logger('update_contact_birthday: ' . $rr['bd']);
+ Logger::log('update_contact_birthday: ' . $rr['bd']);
$nextbd = DateTimeFormat::utcNow('Y') . substr($rr['bd'], 4);