Log function

implement log() function.
This commit is contained in:
Adam Magness 2018-10-29 17:20:46 -04:00
parent d6d593d724
commit 14fde5dc9b
122 changed files with 1280 additions and 1161 deletions

View file

@ -17,6 +17,7 @@ use Friendica\Content\Text\HTML;
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\Database\DBA;
@ -175,7 +176,7 @@ class DFRN
);
if (! DBA::isResult($r)) {
logger(sprintf('No contact found for nickname=%d', $owner_nick), LOGGER_WARNING);
Logger::log(sprintf('No contact found for nickname=%d', $owner_nick), LOGGER_WARNING);
killme();
}
@ -211,7 +212,7 @@ class DFRN
);
if (! DBA::isResult($r)) {
logger(sprintf('No contact found for uid=%d', $owner_id), LOGGER_WARNING);
Logger::log(sprintf('No contact found for uid=%d', $owner_id), LOGGER_WARNING);
killme();
}
@ -1171,7 +1172,7 @@ class DFRN
if (!$dissolve && !$legacy_transport) {
$curlResult = self::transmit($owner, $contact, $atom);
if ($curlResult >= 200) {
logger('Delivery via Diaspora transport layer was successful with status ' . $curlResult);
Logger::log('Delivery via Diaspora transport layer was successful with status ' . $curlResult);
return $curlResult;
}
}
@ -1188,7 +1189,7 @@ class DFRN
$rino = Config::get('system', 'rino_encrypt');
$rino = intval($rino);
logger("Local rino version: ". $rino, LOGGER_DEBUG);
Logger::log("Local rino version: ". $rino, LOGGER_DEBUG);
$ssl_val = intval(Config::get('system', 'ssl_policy'));
$ssl_policy = '';
@ -1208,7 +1209,7 @@ class DFRN
$url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino='.$rino : '');
logger('dfrn_deliver: ' . $url);
Logger::log('dfrn_deliver: ' . $url);
$curlResult = Network::curl($url);
@ -1225,7 +1226,7 @@ class DFRN
return -3; // timed out
}
logger('dfrn_deliver: ' . $xml, LOGGER_DATA);
Logger::log('dfrn_deliver: ' . $xml, LOGGER_DATA);
if (empty($xml)) {
Contact::markForArchival($contact);
@ -1233,8 +1234,8 @@ class DFRN
}
if (strpos($xml, '<?xml') === false) {
logger('dfrn_deliver: no valid XML returned');
logger('dfrn_deliver: returned XML: ' . $xml, LOGGER_DATA);
Logger::log('dfrn_deliver: no valid XML returned');
Logger::log('dfrn_deliver: returned XML: ' . $xml, LOGGER_DATA);
Contact::markForArchival($contact);
return 3;
}
@ -1261,7 +1262,7 @@ class DFRN
$rino_remote_version = intval($res->rino);
$page = (($owner['page-flags'] == Contact::PAGE_COMMUNITY) ? 1 : 0);
logger("Remote rino version: ".$rino_remote_version." for ".$contact["url"], LOGGER_DEBUG);
Logger::log("Remote rino version: ".$rino_remote_version." for ".$contact["url"], LOGGER_DEBUG);
if ($owner['page-flags'] == Contact::PAGE_PRVGROUP) {
$page = 2;
@ -1297,7 +1298,7 @@ class DFRN
}
if ($final_dfrn_id != $orig_id) {
logger('dfrn_deliver: wrong dfrn_id.');
Logger::log('dfrn_deliver: wrong dfrn_id.');
// did not decode properly - cannot trust this site
Contact::markForArchival($contact);
return 3;
@ -1325,7 +1326,7 @@ class DFRN
if ($rino > 0 && $rino_remote_version > 0 && (! $dissolve)) {
logger('rino version: '. $rino_remote_version);
Logger::log('rino version: '. $rino_remote_version);
switch ($rino_remote_version) {
case 1:
@ -1334,7 +1335,7 @@ class DFRN
break;
default:
logger("rino: invalid requested version '$rino_remote_version'");
Logger::log("rino: invalid requested version '$rino_remote_version'");
Contact::markForArchival($contact);
return -8;
}
@ -1359,19 +1360,19 @@ class DFRN
}
}
logger('md5 rawkey ' . md5($postvars['key']));
Logger::log('md5 rawkey ' . md5($postvars['key']));
$postvars['key'] = bin2hex($postvars['key']);
}
logger('dfrn_deliver: ' . "SENDING: " . print_r($postvars, true), LOGGER_DATA);
Logger::log('dfrn_deliver: ' . "SENDING: " . print_r($postvars, true), LOGGER_DATA);
$postResult = Network::post($contact['notify'], $postvars);
$xml = $postResult->getBody();
logger('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA);
Logger::log('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA);
$curl_stat = $postResult->getReturnCode();
if (empty($curl_stat) || empty($xml)) {
@ -1385,8 +1386,8 @@ class DFRN
}
if (strpos($xml, '<?xml') === false) {
logger('dfrn_deliver: phase 2: no valid XML returned');
logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
Logger::log('dfrn_deliver: phase 2: no valid XML returned');
Logger::log('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA);
Contact::markForArchival($contact);
return 3;
}
@ -1404,7 +1405,7 @@ class DFRN
}
if (!empty($res->message)) {
logger('Delivery returned status '.$res->status.' - '.$res->message, LOGGER_DEBUG);
Logger::log('Delivery returned status '.$res->status.' - '.$res->message, LOGGER_DEBUG);
}
if (($res->status >= 200) && ($res->status <= 299)) {
@ -1429,14 +1430,14 @@ class DFRN
if (!$public_batch) {
if (empty($contact['addr'])) {
logger('Empty contact handle for ' . $contact['id'] . ' - ' . $contact['url'] . ' - trying to update it.');
Logger::log('Empty contact handle for ' . $contact['id'] . ' - ' . $contact['url'] . ' - trying to update it.');
if (Contact::updateFromProbe($contact['id'])) {
$new_contact = DBA::selectFirst('contact', ['addr'], ['id' => $contact['id']]);
$contact['addr'] = $new_contact['addr'];
}
if (empty($contact['addr'])) {
logger('Unable to find contact handle for ' . $contact['id'] . ' - ' . $contact['url']);
Logger::log('Unable to find contact handle for ' . $contact['id'] . ' - ' . $contact['url']);
Contact::markForArchival($contact);
return -21;
}
@ -1444,7 +1445,7 @@ class DFRN
$fcontact = Diaspora::personByHandle($contact['addr']);
if (empty($fcontact)) {
logger('Unable to find contact details for ' . $contact['id'] . ' - ' . $contact['addr']);
Logger::log('Unable to find contact details for ' . $contact['id'] . ' - ' . $contact['addr']);
Contact::markForArchival($contact);
return -22;
}
@ -1473,7 +1474,7 @@ class DFRN
$curl_stat = $postResult->getReturnCode();
if (empty($curl_stat) || empty($xml)) {
logger('Empty answer from ' . $contact['id'] . ' - ' . $dest_url);
Logger::log('Empty answer from ' . $contact['id'] . ' - ' . $dest_url);
Contact::markForArchival($contact);
return -9; // timed out
}
@ -1484,8 +1485,8 @@ class DFRN
}
if (strpos($xml, '<?xml') === false) {
logger('No valid XML returned from ' . $contact['id'] . ' - ' . $dest_url);
logger('Returned XML: ' . $xml, LOGGER_DATA);
Logger::log('No valid XML returned from ' . $contact['id'] . ' - ' . $dest_url);
Logger::log('Returned XML: ' . $xml, LOGGER_DATA);
Contact::markForArchival($contact);
return 3;
}
@ -1498,7 +1499,7 @@ class DFRN
}
if (!empty($res->message)) {
logger('Transmit to ' . $dest_url . ' returned status '.$res->status.' - '.$res->message, LOGGER_DEBUG);
Logger::log('Transmit to ' . $dest_url . ' returned status '.$res->status.' - '.$res->message, LOGGER_DEBUG);
}
if (($res->status >= 200) && ($res->status <= 299)) {
@ -1525,7 +1526,7 @@ class DFRN
return;
}
logger('updating birthday: ' . $birthday . ' for contact ' . $contact['id']);
Logger::log('updating birthday: ' . $birthday . ' for contact ' . $contact['id']);
$bdtext = L10n::t('%s\'s birthday', $contact['name']);
$bdtext2 = L10n::t('Happy Birthday %s', ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]');
@ -1575,7 +1576,7 @@ class DFRN
$author["network"] = $contact_old["network"];
} else {
if (!$onlyfetch) {
logger("Contact ".$author["link"]." wasn't found for user ".$importer["importer_uid"]." XML: ".$xml, LOGGER_DEBUG);
Logger::log("Contact ".$author["link"]." wasn't found for user ".$importer["importer_uid"]." XML: ".$xml, LOGGER_DEBUG);
}
$author["contact-unknown"] = true;
@ -1624,11 +1625,11 @@ class DFRN
}
if (empty($author['avatar'])) {
logger('Empty author: ' . $xml);
Logger::log('Empty author: ' . $xml);
}
if (DBA::isResult($contact_old) && !$onlyfetch) {
logger("Check if contact details for contact " . $contact_old["id"] . " (" . $contact_old["nick"] . ") have to be updated.", LOGGER_DEBUG);
Logger::log("Check if contact details for contact " . $contact_old["id"] . " (" . $contact_old["nick"] . ") have to be updated.", LOGGER_DEBUG);
$poco = ["url" => $contact_old["url"]];
@ -1689,7 +1690,7 @@ class DFRN
// If the "hide" element is present then the profile isn't searchable.
$hide = intval(XML::getFirstNodeValue($xpath, $element . "/dfrn:hide/text()", $context) == "true");
logger("Hidden status for contact " . $contact_old["url"] . ": " . $hide, LOGGER_DEBUG);
Logger::log("Hidden status for contact " . $contact_old["url"] . ": " . $hide, LOGGER_DEBUG);
// If the contact isn't searchable then set the contact to "hidden".
// Problem: This can be manually overridden by the user.
@ -1761,20 +1762,20 @@ class DFRN
$contact[$field] = DateTimeFormat::utc($contact[$field]);
if (strtotime($contact[$field]) > strtotime($contact_old[$field])) {
logger("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $contact_old[$field] . "'", LOGGER_DEBUG);
Logger::log("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $contact_old[$field] . "'", LOGGER_DEBUG);
$update = true;
}
}
foreach ($fields as $field => $data) {
if ($contact[$field] != $contact_old[$field]) {
logger("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $contact_old[$field] . "'", LOGGER_DEBUG);
Logger::log("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $contact_old[$field] . "'", LOGGER_DEBUG);
$update = true;
}
}
if ($update) {
logger("Update contact data for contact " . $contact["id"] . " (" . $contact["nick"] . ")", LOGGER_DEBUG);
Logger::log("Update contact data for contact " . $contact["id"] . " (" . $contact["nick"] . ")", LOGGER_DEBUG);
q(
"UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s',
@ -1881,7 +1882,7 @@ class DFRN
*/
private static function processMail($xpath, $mail, $importer)
{
logger("Processing mails");
Logger::log("Processing mails");
/// @TODO Rewrite this to one statement
$msg = [];
@ -1921,7 +1922,7 @@ class DFRN
notification($notif_params);
logger("Mail is processed, notification was sent.");
Logger::log("Mail is processed, notification was sent.");
}
/**
@ -1937,7 +1938,7 @@ class DFRN
{
$a = get_app();
logger("Processing suggestions");
Logger::log("Processing suggestions");
/// @TODO Rewrite this to one statement
$suggest = [];
@ -2053,7 +2054,7 @@ class DFRN
*/
private static function processRelocation($xpath, $relocation, $importer)
{
logger("Processing relocations");
Logger::log("Processing relocations");
/// @TODO Rewrite this to one statement
$relocate = [];
@ -2088,7 +2089,7 @@ class DFRN
);
if (!DBA::isResult($r)) {
logger("Query failed to execute, no result returned in " . __FUNCTION__);
Logger::log("Query failed to execute, no result returned in " . __FUNCTION__);
return false;
}
@ -2115,7 +2116,7 @@ class DFRN
Contact::updateAvatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true);
logger('Contacts are updated.');
Logger::log('Contacts are updated.');
/// @TODO
/// merge with current record, current contents have priority
@ -2174,7 +2175,7 @@ class DFRN
if ($importer["page-flags"] == Contact::PAGE_COMMUNITY || $importer["page-flags"] == Contact::PAGE_PRVGROUP) {
$sql_extra = "";
$community = true;
logger("possible community action");
Logger::log("possible community action");
} else {
$sql_extra = " AND `contact`.`self` AND `item`.`wall` ";
}
@ -2211,7 +2212,7 @@ class DFRN
*/
if ($is_a_remote_action && $community && (!$r[0]["forum_mode"]) && (!$r[0]["wall"])) {
$is_a_remote_action = false;
logger("not a community action");
Logger::log("not a community action");
}
if ($is_a_remote_action) {
@ -2298,7 +2299,7 @@ class DFRN
*/
private static function processVerbs($entrytype, $importer, &$item, &$is_like)
{
logger("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype, LOGGER_DEBUG);
Logger::log("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype, LOGGER_DEBUG);
if (($entrytype == DFRN::TOP_LEVEL)) {
// The filling of the the "contact" variable is done for legcy reasons
@ -2310,22 +2311,22 @@ class DFRN
// Big question: Do we need these functions? They were part of the "consume_feed" function.
// This function once was responsible for DFRN and OStatus.
if (activity_match($item["verb"], ACTIVITY_FOLLOW)) {
logger("New follower");
Logger::log("New follower");
Contact::addRelationship($importer, $contact, $item, $nickname);
return false;
}
if (activity_match($item["verb"], ACTIVITY_UNFOLLOW)) {
logger("Lost follower");
Logger::log("Lost follower");
Contact::removeFollower($importer, $contact, $item);
return false;
}
if (activity_match($item["verb"], ACTIVITY_REQ_FRIEND)) {
logger("New friend request");
Logger::log("New friend request");
Contact::addRelationship($importer, $contact, $item, $nickname, true);
return false;
}
if (activity_match($item["verb"], ACTIVITY_UNFRIEND)) {
logger("Lost sharer");
Logger::log("Lost sharer");
Contact::removeSharer($importer, $contact, $item);
return false;
}
@ -2369,7 +2370,7 @@ class DFRN
$item_tag = Item::selectFirst(['id', 'tag'], ['uri' => $xt->id, 'uid' => $importer["importer_uid"]]);
if (!DBA::isResult($item_tag)) {
logger("Query failed to execute, no result returned in " . __FUNCTION__);
Logger::log("Query failed to execute, no result returned in " . __FUNCTION__);
return false;
}
@ -2445,7 +2446,7 @@ class DFRN
*/
private static function processEntry($header, $xpath, $entry, $importer, $xml)
{
logger("Processing entries");
Logger::log("Processing entries");
$item = $header;
@ -2463,7 +2464,7 @@ class DFRN
);
// Is there an existing item?
if (DBA::isResult($current) && !self::isEditedTimestampNewer($current, $item)) {
logger("Item ".$item["uri"]." (".$item['edited'].") already existed.", LOGGER_DEBUG);
Logger::log("Item ".$item["uri"]." (".$item['edited'].") already existed.", LOGGER_DEBUG);
return;
}
@ -2671,10 +2672,10 @@ class DFRN
// Is it an event?
if (($item["object-type"] == ACTIVITY_OBJ_EVENT) && !$owner_unknown) {
logger("Item ".$item["uri"]." seems to contain an event.", LOGGER_DEBUG);
Logger::log("Item ".$item["uri"]." seems to contain an event.", LOGGER_DEBUG);
$ev = Event::fromBBCode($item["body"]);
if ((x($ev, "desc") || x($ev, "summary")) && x($ev, "start")) {
logger("Event in item ".$item["uri"]." was found.", LOGGER_DEBUG);
Logger::log("Event in item ".$item["uri"]." was found.", LOGGER_DEBUG);
$ev["cid"] = $importer["id"];
$ev["uid"] = $importer["importer_uid"];
$ev["uri"] = $item["uri"];
@ -2690,20 +2691,20 @@ class DFRN
}
$event_id = Event::store($ev);
logger("Event ".$event_id." was stored", LOGGER_DEBUG);
Logger::log("Event ".$event_id." was stored", LOGGER_DEBUG);
return;
}
}
}
if (!self::processVerbs($entrytype, $importer, $item, $is_like)) {
logger("Exiting because 'processVerbs' told us so", LOGGER_DEBUG);
Logger::log("Exiting because 'processVerbs' told us so", LOGGER_DEBUG);
return;
}
// This check is done here to be able to receive connection requests in "processVerbs"
if (($entrytype == DFRN::TOP_LEVEL) && $owner_unknown) {
logger("Item won't be stored because user " . $importer["importer_uid"] . " doesn't follow " . $item["owner-link"] . ".", LOGGER_DEBUG);
Logger::log("Item won't be stored because user " . $importer["importer_uid"] . " doesn't follow " . $item["owner-link"] . ".", LOGGER_DEBUG);
return;
}
@ -2711,9 +2712,9 @@ class DFRN
// Update content if 'updated' changes
if (DBA::isResult($current)) {
if (self::updateContent($current, $item, $importer, $entrytype)) {
logger("Item ".$item["uri"]." was updated.", LOGGER_DEBUG);
Logger::log("Item ".$item["uri"]." was updated.", LOGGER_DEBUG);
} else {
logger("Item " . $item["uri"] . " already existed.", LOGGER_DEBUG);
Logger::log("Item " . $item["uri"] . " already existed.", LOGGER_DEBUG);
}
return;
}
@ -2723,7 +2724,7 @@ class DFRN
$parent = 0;
if ($posted_id) {
logger("Reply from contact ".$item["contact-id"]." was stored with id ".$posted_id, LOGGER_DEBUG);
Logger::log("Reply from contact ".$item["contact-id"]." was stored with id ".$posted_id, LOGGER_DEBUG);
if ($item['uid'] == 0) {
Item::distribute($posted_id);
@ -2733,7 +2734,7 @@ class DFRN
}
} else { // $entrytype == DFRN::TOP_LEVEL
if (($importer["uid"] == 0) && ($importer["importer_uid"] != 0)) {
logger("Contact ".$importer["id"]." isn't known to user ".$importer["importer_uid"].". The post will be ignored.", LOGGER_DEBUG);
Logger::log("Contact ".$importer["id"]." isn't known to user ".$importer["importer_uid"].". The post will be ignored.", LOGGER_DEBUG);
return;
}
if (!link_compare($item["owner-link"], $importer["url"])) {
@ -2743,13 +2744,13 @@ class DFRN
* the tgroup delivery code called from Item::insert will correct it if it's a forum,
* but we're going to unconditionally correct it here so that the post will always be owned by our contact.
*/
logger('Correcting item owner.', LOGGER_DEBUG);
Logger::log('Correcting item owner.', LOGGER_DEBUG);
$item["owner-link"] = $importer["url"];
$item["owner-id"] = Contact::getIdForURL($importer["url"], 0);
}
if (($importer["rel"] == Contact::FOLLOWER) && (!self::tgroupCheck($importer["importer_uid"], $item))) {
logger("Contact ".$importer["id"]." is only follower and tgroup check was negative.", LOGGER_DEBUG);
Logger::log("Contact ".$importer["id"]." is only follower and tgroup check was negative.", LOGGER_DEBUG);
return;
}
@ -2763,7 +2764,7 @@ class DFRN
$posted_id = $notify;
}
logger("Item was stored with id ".$posted_id, LOGGER_DEBUG);
Logger::log("Item was stored with id ".$posted_id, LOGGER_DEBUG);
if ($item['uid'] == 0) {
Item::distribute($posted_id);
@ -2786,7 +2787,7 @@ class DFRN
*/
private static function processDeletion($xpath, $deletion, $importer)
{
logger("Processing deletions");
Logger::log("Processing deletions");
$uri = null;
foreach ($deletion->attributes as $attributes) {
@ -2802,18 +2803,18 @@ class DFRN
$condition = ['uri' => $uri, 'uid' => $importer["importer_uid"]];
$item = Item::selectFirst(['id', 'parent', 'contact-id', 'file', 'deleted'], $condition);
if (!DBA::isResult($item)) {
logger("Item with uri " . $uri . " for user " . $importer["importer_uid"] . " wasn't found.", LOGGER_DEBUG);
Logger::log("Item with uri " . $uri . " for user " . $importer["importer_uid"] . " wasn't found.", LOGGER_DEBUG);
return;
}
if (strstr($item['file'], '[')) {
logger("Item with uri " . $uri . " for user " . $importer["importer_uid"] . " is filed. So it won't be deleted.", LOGGER_DEBUG);
Logger::log("Item with uri " . $uri . " for user " . $importer["importer_uid"] . " is filed. So it won't be deleted.", LOGGER_DEBUG);
return;
}
// When it is a starting post it has to belong to the person that wants to delete it
if (($item['id'] == $item['parent']) && ($item['contact-id'] != $importer["id"])) {
logger("Item with uri " . $uri . " don't belong to contact " . $importer["id"] . " - ignoring deletion.", LOGGER_DEBUG);
Logger::log("Item with uri " . $uri . " don't belong to contact " . $importer["id"] . " - ignoring deletion.", LOGGER_DEBUG);
return;
}
@ -2821,7 +2822,7 @@ class DFRN
if (($item['id'] != $item['parent']) && ($item['contact-id'] != $importer["id"])) {
$condition = ['id' => $item['parent'], 'contact-id' => $importer["id"]];
if (!Item::exists($condition)) {
logger("Item with uri " . $uri . " wasn't found or mustn't be deleted by contact " . $importer["id"] . " - ignoring deletion.", LOGGER_DEBUG);
Logger::log("Item with uri " . $uri . " wasn't found or mustn't be deleted by contact " . $importer["id"] . " - ignoring deletion.", LOGGER_DEBUG);
return;
}
}
@ -2830,7 +2831,7 @@ class DFRN
return;
}
logger('deleting item '.$item['id'].' uri='.$uri, LOGGER_DEBUG);
Logger::log('deleting item '.$item['id'].' uri='.$uri, LOGGER_DEBUG);
Item::delete(['id' => $item['id']]);
}
@ -2884,7 +2885,7 @@ class DFRN
self::fetchauthor($xpath, $doc->firstChild, $importer, "dfrn:owner", false, $xml);
}
logger("Import DFRN message for user " . $importer["importer_uid"] . " from contact " . $importer["id"], LOGGER_DEBUG);
Logger::log("Import DFRN message for user " . $importer["importer_uid"] . " from contact " . $importer["id"], LOGGER_DEBUG);
// is it a public forum? Private forums aren't exposed with this method
$forum = intval(XML::getFirstNodeValue($xpath, "/atom:feed/dfrn:community/text()"));
@ -2950,7 +2951,7 @@ class DFRN
self::processEntry($header, $xpath, $entry, $importer, $xml);
}
}
logger("Import done for user " . $importer["importer_uid"] . " from contact " . $importer["id"], LOGGER_DEBUG);
Logger::log("Import done for user " . $importer["importer_uid"] . " from contact " . $importer["id"], LOGGER_DEBUG);
return 200;
}
@ -3035,7 +3036,7 @@ class DFRN
$url = curPageURL();
logger('auto_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
Logger::log('auto_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
$dest = (($url) ? '&destination_url=' . $url : '');
System::externalRedirect($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest);
@ -3090,7 +3091,7 @@ class DFRN
foreach ($matches as $mtch) {
if (link_compare($link, $mtch[1]) || link_compare($dlink, $mtch[1])) {
$mention = true;
logger('mention found: ' . $mtch[2]);
Logger::log('mention found: ' . $mtch[2]);
}
}
}