Store the context as a separate field

This commit is contained in:
Michael 2024-07-01 15:05:44 +00:00
parent e3c782010f
commit 03189a1c8c
11 changed files with 97 additions and 12 deletions

View file

@ -1081,6 +1081,10 @@ class Item
$parent_id = 0;
$parent_origin = $item['origin'];
if ($item['wall'] && empty($item['context'])) {
$item['context'] = $item['parent-uri'] . '#context';
}
if ($item['wall'] && empty($item['conversation'])) {
$item['conversation'] = $item['parent-uri'] . '#context';
}
@ -1102,6 +1106,10 @@ class Item
$item['conversation-id'] = ItemURI::getIdByURI($item['conversation']);
}
if (!empty($item['context']) && empty($item['context-id'])) {
$item['context-id'] = ItemURI::getIdByURI($item['context']);
}
// Is this item available in the global items (with uid=0)?
if ($item['uid'] == 0) {
$item['global'] = true;