Do not save content in db when downloading an item with readability if option 'no content' checked
This commit is contained in:
parent
01f7dd9802
commit
2afbff41be
@ -342,11 +342,15 @@ function download_item($item_id)
|
|||||||
$filter = new \PicoFeed\Filter($content, $item['url']);
|
$filter = new \PicoFeed\Filter($content, $item['url']);
|
||||||
$content = $filter->execute();
|
$content = $filter->execute();
|
||||||
|
|
||||||
|
$nocontent = (bool) get_config_value('nocontent');
|
||||||
|
if ($nocontent === false) {
|
||||||
|
|
||||||
// Save content
|
// Save content
|
||||||
\PicoTools\singleton('db')
|
\PicoTools\singleton('db')
|
||||||
->table('items')
|
->table('items')
|
||||||
->eq('id', $item['id'])
|
->eq('id', $item['id'])
|
||||||
->save(array('content' => $content));
|
->save(array('content' => $content));
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'result' => true,
|
'result' => true,
|
||||||
|
Loading…
Reference in New Issue
Block a user