aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-01-11 17:00:47 +0100
committerMario Vavti <mario@mariovavti.com>2024-01-11 17:00:47 +0100
commitef2952b5fd44ace7e802c95a99289ff5a1791497 (patch)
tree4e8509402fe053a7f8f90b5c40c9709bbe5c80da
parentd655e1d7656a1b5aa444ca7fd6b4e2e8a067c8f7 (diff)
downloadvolse-hubzilla-ef2952b5fd44ace7e802c95a99289ff5a1791497.tar.gz
volse-hubzilla-ef2952b5fd44ace7e802c95a99289ff5a1791497.tar.bz2
volse-hubzilla-ef2952b5fd44ace7e802c95a99289ff5a1791497.zip
libsync: dev branch compatibility
-rw-r--r--Zotlabs/Lib/Libsync.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php
index 5f183192d..80c447672 100644
--- a/Zotlabs/Lib/Libsync.php
+++ b/Zotlabs/Lib/Libsync.php
@@ -339,6 +339,8 @@ class Libsync {
}
+ $columns = db_columns('channel');
+
$disallowed = [
'channel_id', 'channel_account_id', 'channel_primary', 'channel_prvkey',
'channel_address', 'channel_notifyflags', 'channel_removed', 'channel_deleted',
@@ -349,16 +351,16 @@ class Libsync {
'channel_a_delegate'
];
- $clean = [];
foreach ($arr['channel'] as $k => $v) {
- if (in_array($k, $disallowed))
+ if (in_array($k, $disallowed)) {
+ continue;
+ }
+
+ if (!in_array($k, $columns)) {
continue;
- $clean[$k] = $v;
- }
- if (count($clean)) {
- foreach ($clean as $k => $v) {
- dbq("UPDATE channel set " . dbesc($k) . " = '" . dbesc($v) . "' where channel_id = " . intval($channel['channel_id']));
}
+
+ dbq("UPDATE channel set " . dbesc($k) . " = '" . dbesc($v) . "' where channel_id = " . intval($channel['channel_id']));
}
}