use post-content table instead of item-content

This commit is contained in:
Matthew Exon 2025-01-19 16:54:10 +01:00
parent 63bc3cc85a
commit 7e8526c16f

View file

@ -440,7 +440,7 @@ function retriever_on_item_insert(array $retriever, array &$item) {
DI::logger()->warning('retriever_on_item_insert: item ' . $item['id'] . ' has no plink and no uri-id'); DI::logger()->warning('retriever_on_item_insert: item ' . $item['id'] . ' has no plink and no uri-id');
return; return;
} }
$content = DBA::selectFirst('item-content', [], ['uri-id' => $item['uri-id']]); $content = DBA::selectFirst('post-content', [], ['uri-id' => $item['uri-id']]);
$url = $content['plink']; $url = $content['plink'];
} }
@ -693,14 +693,14 @@ function retriever_get_body(array $item) {
return $item['body']; return $item['body'];
} }
// item has been stored in database, body is stored in the item-content table // item has been stored in database, body is stored in the post-content table
$content = DBA::selectFirst('item-content', ['body'], ['uri-id' => $item['uri-id']]); $content = DBA::selectFirst('post-content', ['body'], ['uri-id' => $item['uri-id']]);
if (!$content) { if (!$content) {
DI::logger()->warning('retriever_get_body: item-content uri-id ' . $item['uri-id'] . ' has no content'); DI::logger()->warning('retriever_get_body: post-content uri-id ' . $item['uri-id'] . ' has no content');
return $item['body']; return $item['body'];
} }
if (!$content['body']) { if (!$content['body']) {
DI::logger()->warning('retriever_get_body: item-content uri-id ' . $item['uri-id'] . ' has no body'); DI::logger()->warning('retriever_get_body: post-content uri-id ' . $item['uri-id'] . ' has no body');
return $item['body']; return $item['body'];
} }
return $content['body']; return $content['body'];