Fixing SQL error when receiving DFRN posts (#5527)
* Some more notices * Fixed nasty to find notice in DFRN and OStatus * And more notices ... * Yeah, some removed notices ... again ... * Fixing bad SQL query
This commit is contained in:
parent
a2cea16954
commit
1eb8f04274
3 changed files with 30 additions and 5 deletions
|
|
@ -54,10 +54,32 @@ function hovercard_content()
|
|||
$contact = [];
|
||||
// if it's the url containing https it should be converted to http
|
||||
$nurl = normalise_link(GContact::cleanContactUrl($profileurl));
|
||||
if ($nurl) {
|
||||
// Search for contact data
|
||||
if (!$nurl) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Search for contact data
|
||||
// Look if the local user has got the contact
|
||||
if (local_user()) {
|
||||
$contact = Contact::getDetailsByURL($nurl, local_user());
|
||||
}
|
||||
|
||||
// If not then check the global user
|
||||
if (!count($contact)) {
|
||||
$contact = Contact::getDetailsByURL($nurl);
|
||||
}
|
||||
|
||||
// Feeds url could have been destroyed through "cleanContactUrl", so we now use the original url
|
||||
if (!count($contact) && local_user()) {
|
||||
$nurl = normalise_link($profileurl);
|
||||
$contact = Contact::getDetailsByURL($nurl, local_user());
|
||||
}
|
||||
|
||||
if (!count($contact)) {
|
||||
$nurl = normalise_link($profileurl);
|
||||
$contact = Contact::getDetailsByURL($nurl);
|
||||
}
|
||||
|
||||
if (!count($contact)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue