forked from friendica/friendica-addons
use post-content table instead of item-content
This commit is contained in:
parent
63bc3cc85a
commit
7e8526c16f
1 changed files with 5 additions and 5 deletions
|
@ -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');
|
||||
return;
|
||||
}
|
||||
$content = DBA::selectFirst('item-content', [], ['uri-id' => $item['uri-id']]);
|
||||
$content = DBA::selectFirst('post-content', [], ['uri-id' => $item['uri-id']]);
|
||||
$url = $content['plink'];
|
||||
}
|
||||
|
||||
|
@ -693,14 +693,14 @@ function retriever_get_body(array $item) {
|
|||
return $item['body'];
|
||||
}
|
||||
|
||||
// item has been stored in database, body is stored in the item-content table
|
||||
$content = DBA::selectFirst('item-content', ['body'], ['uri-id' => $item['uri-id']]);
|
||||
// item has been stored in database, body is stored in the post-content table
|
||||
$content = DBA::selectFirst('post-content', ['body'], ['uri-id' => $item['uri-id']]);
|
||||
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'];
|
||||
}
|
||||
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 $content['body'];
|
||||
|
|
Loading…
Add table
Reference in a new issue