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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($a->user)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $x[0] . $typename);
|
$sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $x[0] . $typename);
|
||||||
|
|
||||||
return ($sec_hash == $x[1]);
|
return ($sec_hash == $x[1]);
|
||||||
|
|
|
@ -350,7 +350,7 @@ class Acl extends BaseModule
|
||||||
'type' => 'c',
|
'type' => 'c',
|
||||||
'photo' => Contact::getMicro($contact),
|
'photo' => Contact::getMicro($contact),
|
||||||
'name' => htmlspecialchars($contact['name']),
|
'name' => htmlspecialchars($contact['name']),
|
||||||
'id' => intval($contact['cid']),
|
'id' => intval($contact['id']),
|
||||||
'network' => $contact['network'],
|
'network' => $contact['network'],
|
||||||
'link' => $contact['url'],
|
'link' => $contact['url'],
|
||||||
'nick' => htmlentities(($contact['nick'] ?? '') ?: $contact['addr']),
|
'nick' => htmlentities(($contact['nick'] ?? '') ?: $contact['addr']),
|
||||||
|
|
|
@ -114,14 +114,11 @@ class UserExport extends BaseSettings
|
||||||
$rows = DBA::p($query);
|
$rows = DBA::p($query);
|
||||||
while ($row = DBA::fetch($rows)) {
|
while ($row = DBA::fetch($rows)) {
|
||||||
$p = [];
|
$p = [];
|
||||||
foreach ($row as $k => $v) {
|
foreach ($dbStructure[$table]['fields'] as $column => $field) {
|
||||||
switch ($dbStructure[$table]['fields'][$k]['type']) {
|
if ($field['type'] == 'datetime') {
|
||||||
case 'datetime':
|
$p[$column] = $v ?? DBA::NULL_DATETIME;
|
||||||
$p[$k] = $v ?? DBA::NULL_DATETIME;
|
} else {
|
||||||
break;
|
$p[$column] = $v;
|
||||||
default:
|
|
||||||
$p[$k] = $v;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result[] = $p;
|
$result[] = $p;
|
||||||
|
|
|
@ -963,10 +963,12 @@ class DFRN
|
||||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||||
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
|
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
|
||||||
$parent = Item::selectFirst(['guid', 'plink'], ['uri' => $parent_item, 'uid' => $item['uid']]);
|
$parent = Item::selectFirst(['guid', 'plink'], ['uri' => $parent_item, 'uid' => $item['uid']]);
|
||||||
$attributes = ["ref" => $parent_item, "type" => "text/html",
|
if (DBA::isResult($parent)) {
|
||||||
"href" => $parent['plink'],
|
$attributes = ["ref" => $parent_item, "type" => "text/html",
|
||||||
"dfrn:diaspora_guid" => $parent['guid']];
|
"href" => $parent['plink'],
|
||||||
XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
|
"dfrn:diaspora_guid" => $parent['guid']];
|
||||||
|
XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add conversation data. This is used for OStatus
|
// 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 . '" />';
|
echo '<meta name="theme-color" content="' . $nav_bg . '" />';
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue