diff options
author | Mario <mario@mariovavti.com> | 2024-10-23 12:06:32 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-10-23 12:06:32 +0000 |
commit | e530476e6c5d2319f3a0a09dfe73ec181e923325 (patch) | |
tree | f240e4464d8536562047cda08286ce613f4628ff /include | |
parent | e0a91bed7a2b2b84a3385882952f198661c6ca98 (diff) | |
download | volse-hubzilla-e530476e6c5d2319f3a0a09dfe73ec181e923325.tar.gz volse-hubzilla-e530476e6c5d2319f3a0a09dfe73ec181e923325.tar.bz2 volse-hubzilla-e530476e6c5d2319f3a0a09dfe73ec181e923325.zip |
make sure we select only sys channel items and remove dupes checking (this will be checked in item_store() anyway)
Diffstat (limited to 'include')
-rw-r--r-- | include/items.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/items.php b/include/items.php index 876c20099..423d626ad 100644 --- a/include/items.php +++ b/include/items.php @@ -5112,25 +5112,19 @@ function copy_of_pubitem($channel,$mid) { return $item[0]; } - - $r = q("select * from item where parent_mid = (select parent_mid from item where mid = '%s' and uid = %d ) order by id ", + $r = q("select * from item where parent_mid = (select parent_mid from item where mid = '%s' and uid = %d) and uid = %d order by id ", dbesc($mid), + intval($syschan['channel_id']), intval($syschan['channel_id']) ); if($r) { $items = fetch_post_tags($r,true); foreach($items as $rv) { - $d = q("select id from item where mid = '%s' and uid = %d limit 1", - dbesc($rv['mid']), - intval($channel['channel_id']) - ); - if($d) { - continue; - } unset($rv['id']); unset($rv['parent']); + $rv['aid'] = $channel['channel_account_id']; $rv['uid'] = $channel['channel_id']; $rv['item_wall'] = 0; @@ -5143,5 +5137,6 @@ function copy_of_pubitem($channel,$mid) { } } + return $result; } |