summaryrefslogtreecommitdiff
path: root/app/Models/FeedDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-26 12:55:12 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-26 12:55:12 +0100
commit7902d10b3adee3788d770b9a75ac63b910140b0c (patch)
tree7f1909fc81047f6d9fe8ec8c568b58e12d96e6f2 /app/Models/FeedDAO.php
parentf1ac6dd5509c6aa9e1d99401c5e1a0b894d4e7b0 (diff)
Import FeedBin (#2228)
* Import FeedBin https://github.com/FreshRSS/FreshRSS/issues/2227 And more tolerant import * Mute import fake feed + Changelog * strtotime for published dates in string
Diffstat (limited to 'app/Models/FeedDAO.php')
-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) {