aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzotdir.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-07-29 06:59:13 +0000
committerMario <mario@mariovavti.com>2021-07-29 06:59:13 +0000
commit9722d157bf138753bc168f68c56b4963db6da4e9 (patch)
treea15bb81c35a2367fe4628614471d471ed86d2712 /Zotlabs/Lib/Libzotdir.php
parent219d47f04c7bb04dcc241b9ed6ca411fc9653f09 (diff)
parentc6133d2558ce29e44342fa7be8bb65e0059aea02 (diff)
downloadvolse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.gz
volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.tar.bz2
volse-hubzilla-9722d157bf138753bc168f68c56b4963db6da4e9.zip
Merge branch 'dev' into bs5
Diffstat (limited to 'Zotlabs/Lib/Libzotdir.php')
-rw-r--r--Zotlabs/Lib/Libzotdir.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php
index 507ddb674..4f35a1b80 100644
--- a/Zotlabs/Lib/Libzotdir.php
+++ b/Zotlabs/Lib/Libzotdir.php
@@ -264,6 +264,11 @@ class Libzotdir {
if (is_array($j['transactions']) && count($j['transactions'])) {
foreach ($j['transactions'] as $t) {
+
+ if (empty($t['hash']) || empty($t['transaction_id']) || empty($t['address'])) {
+ continue;
+ }
+
$r = q("select * from updates where ud_guid = '%s' limit 1",
dbesc($t['transaction_id'])
);
@@ -638,8 +643,13 @@ class Libzotdir {
$dirmode = intval(get_config('system', 'directory_mode'));
- if($dirmode == DIRECTORY_MODE_NORMAL)
+ if($dirmode == DIRECTORY_MODE_NORMAL) {
+ return;
+ }
+
+ if (empty($hash) || empty($guid) || empty($addr)) {
return;
+ }
if($flags) {
q("insert into updates (ud_hash, ud_guid, ud_date, ud_flags, ud_addr ) values ( '%s', '%s', '%s', %d, '%s' )",
@@ -659,9 +669,4 @@ class Libzotdir {
}
}
-
-
-
-
-
}