Do not save content in db when downloading an item with readability if option 'no content' checked

This commit is contained in:
doubleface 2013-07-29 05:31:47 -04:00
parent 01f7dd9802
commit 2afbff41be

View File

@ -342,11 +342,15 @@ function download_item($item_id)
$filter = new \PicoFeed\Filter($content, $item['url']);
$content = $filter->execute();
// Save content
\PicoTools\singleton('db')
->table('items')
->eq('id', $item['id'])
->save(array('content' => $content));
$nocontent = (bool) get_config_value('nocontent');
if ($nocontent === false) {
// Save content
\PicoTools\singleton('db')
->table('items')
->eq('id', $item['id'])
->save(array('content' => $content));
}
return array(
'result' => true,