forked from friendica/friendica-addons
Merge pull request #1003 from annando/getid-default
Changed default value for "getIDForURL"
This commit is contained in:
commit
1534404e3a
|
@ -198,7 +198,7 @@ function discourse_get_user($post, $hostaddr)
|
||||||
$contact['nurl'] = Strings::normaliseLink($contact['url']);
|
$contact['nurl'] = Strings::normaliseLink($contact['url']);
|
||||||
$contact['baseurl'] = $hostaddr;
|
$contact['baseurl'] = $hostaddr;
|
||||||
Logger::info('Contact', $contact);
|
Logger::info('Contact', $contact);
|
||||||
$contact['id'] = Contact::getIdForURL($contact['url'], 0, true, $contact);
|
$contact['id'] = Contact::getIdForURL($contact['url'], 0, false, $contact);
|
||||||
if (!empty($contact['id'])) {
|
if (!empty($contact['id'])) {
|
||||||
$avatar = $contact['photo'];
|
$avatar = $contact['photo'];
|
||||||
unset($contact['photo']);
|
unset($contact['photo']);
|
||||||
|
@ -268,7 +268,7 @@ function discourse_get_html($message)
|
||||||
$profile = discourse_get_profile($xpath);
|
$profile = discourse_get_profile($xpath);
|
||||||
if (!empty($profile['url'])) {
|
if (!empty($profile['url'])) {
|
||||||
Logger::info('Found profile', $profile);
|
Logger::info('Found profile', $profile);
|
||||||
$message['item']['author-id'] = Contact::getIdForURL($profile['url'], 0, true, $profile);
|
$message['item']['author-id'] = Contact::getIdForURL($profile['url'], 0, false, $profile);
|
||||||
$message['item']['author-link'] = $profile['url'];
|
$message['item']['author-link'] = $profile['url'];
|
||||||
$message['item']['author-name'] = $profile['name'];
|
$message['item']['author-name'] = $profile['name'];
|
||||||
$message['item']['author-avatar'] = $profile['photo'];
|
$message['item']['author-avatar'] = $profile['photo'];
|
||||||
|
|
|
@ -1127,7 +1127,7 @@ function twitter_fetch_contact($uid, $data, $create_user)
|
||||||
if (DBA::isResult($pcontact)) {
|
if (DBA::isResult($pcontact)) {
|
||||||
$cid = $pcontact['id'];
|
$cid = $pcontact['id'];
|
||||||
} else {
|
} else {
|
||||||
$cid = Contact::getIdForURL($fields['url'], 0, true, $fields);
|
$cid = Contact::getIdForURL($fields['url'], 0, false, $fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($cid)) {
|
if (!empty($cid)) {
|
||||||
|
|
Loading…
Reference in a new issue