aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-06-23 17:09:45 +0200
committerMario Vavti <mario@mariovavti.com>2021-06-23 17:09:45 +0200
commitcf791a19099e0e4a8a0679e720a4f99755083cca (patch)
treed813d84a8d5cb95e3b048501a0bc5bca30b588f8 /Zotlabs
parenta34bd3b013887786f5f958450b4823cfd00cd562 (diff)
downloadvolse-hubzilla-cf791a19099e0e4a8a0679e720a4f99755083cca.tar.gz
volse-hubzilla-cf791a19099e0e4a8a0679e720a4f99755083cca.tar.bz2
volse-hubzilla-cf791a19099e0e4a8a0679e720a4f99755083cca.zip
libzotdir: make sure we have the relevant data before string into updates
Diffstat (limited to 'Zotlabs')
-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..adc9b79bb 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 (!($t['hash'] || $t['transaction_id'] || $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 (!($hash || $guid || $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 {
}
}
-
-
-
-
-
}