1
1
Fork 0

Merge pull request #9041 from MrPetovan/bug/notices

Fix various notices
This commit is contained in:
Michael Vogel 2020-08-20 16:21:18 +02:00 committed by GitHub
commit 61a2b225bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 14 deletions

View file

@ -140,6 +140,10 @@ abstract class BaseModule
return false;
}
if (empty($a->user)) {
return false;
}
$sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $x[0] . $typename);
return ($sec_hash == $x[1]);

View file

@ -350,7 +350,7 @@ class Acl extends BaseModule
'type' => 'c',
'photo' => Contact::getMicro($contact),
'name' => htmlspecialchars($contact['name']),
'id' => intval($contact['cid']),
'id' => intval($contact['id']),
'network' => $contact['network'],
'link' => $contact['url'],
'nick' => htmlentities(($contact['nick'] ?? '') ?: $contact['addr']),

View file

@ -114,14 +114,11 @@ class UserExport extends BaseSettings
$rows = DBA::p($query);
while ($row = DBA::fetch($rows)) {
$p = [];
foreach ($row as $k => $v) {
switch ($dbStructure[$table]['fields'][$k]['type']) {
case 'datetime':
$p[$k] = $v ?? DBA::NULL_DATETIME;
break;
default:
$p[$k] = $v;
break;
foreach ($dbStructure[$table]['fields'] as $column => $field) {
if ($field['type'] == 'datetime') {
$p[$column] = $v ?? DBA::NULL_DATETIME;
} else {
$p[$column] = $v;
}
}
$result[] = $p;

View file

@ -963,10 +963,12 @@ class DFRN
if ($item['gravity'] != GRAVITY_PARENT) {
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
$parent = Item::selectFirst(['guid', 'plink'], ['uri' => $parent_item, 'uid' => $item['uid']]);
$attributes = ["ref" => $parent_item, "type" => "text/html",
"href" => $parent['plink'],
"dfrn:diaspora_guid" => $parent['guid']];
XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
if (DBA::isResult($parent)) {
$attributes = ["ref" => $parent_item, "type" => "text/html",
"href" => $parent['plink'],
"dfrn:diaspora_guid" => $parent['guid']];
XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
}
}
// Add conversation data. This is used for OStatus

View file

@ -71,7 +71,7 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
}
}
$nav_bg = $nav_bg ?: DI::pConfig()->get($uid, 'frio', 'nav_bg', DI::config()->get('frio', 'nav_bg', '#708fa0'));
$nav_bg = $nav_bg ?? DI::pConfig()->get($uid, 'frio', 'nav_bg', DI::config()->get('frio', 'nav_bg', '#708fa0'));
echo '<meta name="theme-color" content="' . $nav_bg . '" />';
?>