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']); $filter = new \PicoFeed\Filter($content, $item['url']);
$content = $filter->execute(); $content = $filter->execute();
// Save content $nocontent = (bool) get_config_value('nocontent');
\PicoTools\singleton('db') if ($nocontent === false) {
->table('items')
->eq('id', $item['id']) // Save content
->save(array('content' => $content)); \PicoTools\singleton('db')
->table('items')
->eq('id', $item['id'])
->save(array('content' => $content));
}
return array( return array(
'result' => true, 'result' => true,