diff --git a/assets/css/app.css b/assets/css/app.css
index e5fc5d3..e9646f8 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -135,12 +135,8 @@ label {
display: block;
}
-.inline-label {
- display: inline;
-}
-
-input {
- -webkit-appearance: none;
+input[type="checkbox"] {
+ border: 1px solid #ccc;
}
input[type="email"],
@@ -154,6 +150,7 @@ input[type="text"] {
font-size: 99%;
margin-bottom: 10px;
margin-top: 5px;
+ -webkit-appearance: none;
}
input[type="email"]:focus,
@@ -252,6 +249,7 @@ textarea.form-error {
/* buttons */
.btn {
+ -webkit-appearance: none;
display: inline-block;
color: #333;
border: 1px solid #ccc;
diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php
index b8d990c..e3abc4d 100644
--- a/locales/fr_FR/translations.php
+++ b/locales/fr_FR/translations.php
@@ -1,8 +1,7 @@
- 'Ne pas récupérer le contenu des articles (et supprimer ce contenu pour les articles précédents',
+ 'Do not fetch the content of articles' => 'Ne pas récupérer le contenu des articles',
'Remove automatically read items' => 'Supprimer automatiquement les éléments lus',
'Never' => 'Jamais',
'After %d day' => 'Après %d jour',
diff --git a/model.php b/model.php
index da83e29..0e277bc 100644
--- a/model.php
+++ b/model.php
@@ -405,7 +405,7 @@ function autoflush()
function update_items($feed_id, array $items)
{
- $nocontent = (bool)\PicoTools\singleton('db')->table('config')->findOneColumn('nocontent');
+ $nocontent = (bool) \PicoTools\singleton('db')->table('config')->findOneColumn('nocontent');
$items_in_feed = array();
$db = \PicoTools\singleton('db');
@@ -419,7 +419,6 @@ function update_items($feed_id, array $items)
// Insert only new item
if ($db->table('items')->eq('id', $item->id)->count() !== 1) {
- $content = $nocontent ? '' : $item->content;
$db->table('items')->save(array(
'id' => $item->id,
@@ -427,7 +426,7 @@ function update_items($feed_id, array $items)
'url' => $item->url,
'updated' => $item->updated,
'author' => $item->author,
- 'content' => $content,
+ 'content' => $nocontent ? '' : $item->content,
'status' => 'unread',
'feed_id' => $feed_id
));
@@ -553,9 +552,10 @@ function save_config(array $values)
\PicoTools\Translator\load($values['language']);
- // if the user does not want content of feeds, remote it in previous ones
- if ((bool)$values['nocontent']) {
- \PicoTools\singleton('db')->table('items')->update(array('content'=>''));
+ // If the user does not want content of feeds, remove it in previous ones
+ if ((bool) $values['nocontent']) {
+
+ \PicoTools\singleton('db')->table('items')->update(array('content' => ''));
}
return \PicoTools\singleton('db')->table('config')->update($values);
diff --git a/schema.php b/schema.php
index 6636f5b..5c3409a 100644
--- a/schema.php
+++ b/schema.php
@@ -2,11 +2,13 @@
namespace Schema;
+
function version_7($pdo)
{
- $pdo->exec('ALTER TABLE config ADD COLUMN nocontent INTEGER');
+ $pdo->exec('ALTER TABLE config ADD COLUMN nocontent INTEGER DEFAULT 0');
}
+
function version_6($pdo)
{
$pdo->exec('ALTER TABLE config ADD COLUMN autoflush INTEGER DEFAULT 0');
diff --git a/templates/config.php b/templates/config.php
index 47b7c45..b9527dc 100644
--- a/templates/config.php
+++ b/templates/config.php
@@ -19,8 +19,7 @@
= Helper\form_label(t('Remove automatically read items'), 'autoflush') ?>
= Helper\form_select('autoflush', $autoflush_options, $values, $errors) ?>
- = Helper\form_label(t('Do not fetch the content of articles (and remove it content for previous entries)'), 'nocontent', "inline-label") ?>
- = Helper\form_checkbox('nocontent', $values) ?>
+ = Helper\form_checkbox('nocontent', t('Do not fetch the content of articles'), 1, $values['nocontent']) ?>