1
0
Fork 0

Removed notices, will it ever end?

This commit is contained in:
Michael 2018-08-17 03:19:42 +00:00
parent 3488b937ea
commit 0342f9e084
6 changed files with 21 additions and 4 deletions

View file

@ -5812,7 +5812,7 @@ function api_friendica_profile_show($type)
$nurls = q(
"SELECT `id`, `nurl` FROM `contact` WHERE `uid`= %d AND `profile-id` = %d",
intval(api_user()),
intval($rr['profile_id'])
intval($rr['id'])
);
foreach ($nurls as $nurl) {

View file

@ -449,7 +449,7 @@ function networkFlatView(App $a, $update = 0)
while ($term = DBA::fetch($result)) {
$posts[] = $term['oid'];
}
DBA::close($terms);
DBA::close($result);
$condition = ['uid' => local_user(), 'id' => $posts];
} else {

View file

@ -13,7 +13,7 @@ use Friendica\Core\System;
function smilies_content(App $a)
{
$smilies = Smilies::getList();
if ($a->argv[1] === "json") {
if (!empty($a->argv[1]) && ($a->argv[1] === "json")) {
$results = [];
for ($i = 0; $i < count($smilies['texts']); $i++) {
$results[] = ['text' => $smilies['texts'][$i], 'icon' => $smilies['icons'][$i]];

View file

@ -364,6 +364,11 @@ class Contact extends BaseObject
*/
public static function markForArchival(array $contact)
{
if (!isset($contact['url'])) {
logger('Empty contact. ' . System::callstack(10), LOGGER_DEBUG);
}
// Contact already archived or "self" contact? => nothing to do
if ($contact['archive'] || $contact['self']) {
return;

View file

@ -988,7 +988,9 @@ class Probe
if (!empty($webfinger["aliases"]) && is_array($webfinger["aliases"])) {
foreach ($webfinger["aliases"] as $alias) {
if (normalise_link($alias) != normalise_link($data["url"]) && ! strstr($alias, "@")) {
if (empty($data["url"]) && !strstr($alias, "@")) {
$data["url"] = $alias;
} elseif (!strstr($alias, "@") && normalise_link($alias) != normalise_link($data["url"])) {
$data["alias"] = $alias;
} elseif (substr($alias, 0, 5) == 'acct:') {
$data["addr"] = substr($alias, 5);

View file

@ -1580,6 +1580,16 @@ class DFRN
$author["avatar"] = current($avatarlist);
}
if (empty($author['avatar']) && !empty($author['link'])) {
$cid = Contact::getIdForURL($author['link'], 0);
if (!empty($cid)) {
$contact = DBA::selectFirst('contact', ['avatar'], ['id' => $cid]);
if (DBA::isResult($contact)) {
$author['avatar'] = $contact['avatar'];
}
}
}
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);