aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-26 21:08:27 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-26 21:08:27 +0100
commitef6df8aeca9f7b8dda96ab54fffd05f17b27606b (patch)
tree5840b608e7434e88b2b48f21bd071dd71db58c2d /app/Models
parent34fe41ac78b6bd465c12086edbbd856d9533065c (diff)
parent4872442c62f63ef97a0e12c43b4700b98ebcdc15 (diff)
Merge branch 'dev' into dev-1.14.0
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/FeedDAO.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index 7f00642f4..c9c9f6301 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -61,7 +61,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
$valuesTmp['lastUpdate'],
base64_encode($valuesTmp['httpAuth']),
FreshRSS_Feed::KEEP_HISTORY_DEFAULT,
- FreshRSS_Feed::TTL_DEFAULT,
+ isset($valuesTmp['ttl']) ? intval($valuesTmp['ttl']) : FreshRSS_Feed::TTL_DEFAULT,
isset($valuesTmp['attributes']) ? json_encode($valuesTmp['attributes']) : '',
);
@@ -95,6 +95,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
'httpAuth' => $feed->httpAuth(),
'attributes' => $feed->attributes(),
);
+ if ($feed->mute() || $feed->ttl() != FreshRSS_Context::$user_conf->ttl_default) {
+ $values['ttl'] = $feed->ttl() * ($feed->mute() ? -1 : 1);
+ }
$id = $this->addFeed($values);
if ($id) {