aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-23 13:59:40 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2015-07-23 13:59:40 +0200
commitf4472fc918c1fa1d1cfb2adae6c38a9a261e8c9b (patch)
treee112184b03d01c5bcd2382d91f88505f48dd9f6d /app/Controllers/feedController.php
parentbaa36f158b59c9229e3f1a5a0edb6f1bb3a54198 (diff)
Do not use PubSubHubbub if disabled
See https://github.com/FreshRSS/FreshRSS/issues/865
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 488d066a9..ec3dce777 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -295,14 +295,17 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
// Calculate date of oldest entries we accept in DB.
$nb_month_old = max(FreshRSS_Context::$user_conf->old_entries, 1);
$date_min = time() - (3600 * 24 * 30 * $nb_month_old);
- $pshbMinAge = time() - (3600 * 24); //TODO: Make a configuration.
+
+ // PubSubHubbub support
+ $pubsubhubbubEnabledGeneral = FreshRSS_Context::$system_conf->pubsubhubbub_enabled;
+ $pshbMinAge = time() - (3600 * 24); //TODO: Make a configuration.
$updated_feeds = 0;
$is_read = FreshRSS_Context::$user_conf->mark_when['reception'] ? 1 : 0;
foreach ($feeds as $feed) {
$url = $feed->url(); //For detection of HTTP 301
- $pubSubHubbubEnabled = $feed->pubSubHubbubEnabled();
+ $pubSubHubbubEnabled = $pubsubhubbubEnabledGeneral && $feed->pubSubHubbubEnabled();
if ((!$simplePiePush) && (!$id) && $pubSubHubbubEnabled && ($feed->lastUpdate() > $pshbMinAge)) {
$text = 'Skip pull of feed using PubSubHubbub: ' . $url;
//Minz_Log::debug($text);
@@ -442,7 +445,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
$feed->faviconPrepare();
- if ($feed->pubSubHubbubPrepare()) {
+ if ($pubsubhubbubEnabledGeneral && $feed->pubSubHubbubPrepare()) {
Minz_Log::notice('PubSubHubbub subscribe ' . $feed->url());
if (!$feed->pubSubHubbubSubscribe(true)) { //Subscribe
Minz_Log::warning('Error while PubSubHubbub subscribing to ' . $feed->url());