mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +00:00
Merge pull request #9041 from MrPetovan/bug/notices
Fix various notices
This commit is contained in:
commit
61a2b225bb
5 changed files with 17 additions and 14 deletions
|
@ -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]);
|
||||
|
|
|
@ -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']),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 . '" />';
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue