summaryrefslogtreecommitdiff
path: root/app/Models/FeedDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-11-06 15:16:00 +0100
committerGravatar GitHub <noreply@github.com> 2019-11-06 15:16:00 +0100
commit22030155f8fd5cab102ddd897a914cf1a0ffd183 (patch)
tree1af332589e778645dc80cb06de8c45261e3eecdd /app/Models/FeedDAO.php
parent12cdd2cdf6d493a8bd110d1ae310288a0a47afa0 (diff)
Fix database autocreate at install (#2635)
* Fix database autocreate at install Several bugs prevented the auto-creation of the database in Web and CLI installs. Fix https://github.com/YunoHost-Apps/freshrss_ynh/issues/84#issuecomment-549818408 * initDb https://github.com/FreshRSS/FreshRSS/pull/2635#discussion_r343107795
Diffstat (limited to 'app/Models/FeedDAO.php')
-rw-r--r--app/Models/FeedDAO.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index fa0001df7..2bff50d52 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -102,7 +102,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) {
+ if ($feed->mute() || (
+ FreshRSS_Context::$user_conf != null && //When creating a new user
+ $feed->ttl() != FreshRSS_Context::$user_conf->ttl_default)) {
$values['ttl'] = $feed->ttl() * ($feed->mute() ? -1 : 1);
}