From 2afbff41be52529ed733072de1cbe1e46b0499e4 Mon Sep 17 00:00:00 2001 From: doubleface Date: Mon, 29 Jul 2013 05:31:47 -0400 Subject: [PATCH] Do not save content in db when downloading an item with readability if option 'no content' checked --- model.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/model.php b/model.php index 33d709c..55e6cf1 100644 --- a/model.php +++ b/model.php @@ -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,