From ca4dcca5b20c3e2e6da1293746cd46674d97c710 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 7 Oct 2016 21:46:48 +0200 Subject: PSHB bugs Introduced by https://github.com/FreshRSS/FreshRSS/pull/1280 --- app/Controllers/feedController.php | 3 ++- p/api/pshb.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index dadc8aa83..8751d2fff 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -271,7 +271,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController { if ($ttl == -1) { continue; //Feed refresh is disabled } - if ($feed->lastUpdate() + 10 >= time() - ($ttl == -2 ? FreshRSS_Context::$user_conf->ttl_default : $ttl)) { + if ((!$simplePiePush) && (!$feed_id) && + ($feed->lastUpdate() + 10 >= time() - ($ttl == -2 ? FreshRSS_Context::$user_conf->ttl_default : $ttl))) { //Too early to refresh from source, but check whether the feed was updated by another user $mtime = $feed->cacheModifiedTime(); if ($feed->lastUpdate() + 10 >= $mtime) { diff --git a/p/api/pshb.php b/p/api/pshb.php index 94a0068ed..e9b66b167 100644 --- a/p/api/pshb.php +++ b/p/api/pshb.php @@ -116,6 +116,7 @@ foreach ($users as $userFilename) { Minz_Configuration::register('user', join_path(USERS_PATH, $username, 'config.php'), join_path(USERS_PATH, '_', 'config.default.php')); + new Minz_ModelPdo($username); //TODO: FIXME: Quick-fix while waiting for a better FreshRSS() constructor/init FreshRSS_Context::init(); list($updated_feeds, $feed) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie); if ($updated_feeds > 0) { -- cgit v1.2.3