aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2015-05-23 16:37:30 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2015-05-23 16:37:30 +0200
commite3ce10b38a8bdf2eef51835deb86dead7a7dd37d (patch)
treeb70d4be905641d2ebc215aed7a9748431623b68b
parente3f5e157a4f262248e7bee9893fbab93206c4b6d (diff)
parent694dfa1f8b90d8f693ef39c7099c0e8f23c5c777 (diff)
Merge remote-tracking branch 'origin/PubSubHubbub' into dev
-rwxr-xr-xapp/Controllers/feedController.php11
-rw-r--r--app/Models/Feed.php2
2 files changed, 5 insertions, 8 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 3d8a6deb7..957a809cd 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -442,13 +442,10 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
$feed->faviconPrepare();
- if (in_array($feed->url(), array('http://push-pub.appspot.com/feed'))) { //TODO: Remove white-list after testing
- Minz_Log::debug('PubSubHubbub match ' . $feed->url());
- if ($feed->pubSubHubbubPrepare()) {
- Minz_Log::notice('PubSubHubbub subscribe ' . $feed->url());
- if (!$feed->pubSubHubbubSubscribe(true)) { //Subscribe
- Minz_Log::warning('Error while PubSubHubbub subscribing to ' . $feed->url());
- }
+ if ($feed->pubSubHubbubPrepare()) {
+ Minz_Log::notice('PubSubHubbub subscribe ' . $feed->url());
+ if (!$feed->pubSubHubbubSubscribe(true)) { //Subscribe
+ Minz_Log::warning('Error while PubSubHubbub subscribing to ' . $feed->url());
}
}
$feed->unlock();
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index ed0a862c3..bf7ed3967 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -388,7 +388,7 @@ class FreshRSS_Feed extends Minz_Model {
function pubSubHubbubPrepare() {
$key = '';
- if (FreshRSS_Context::$system_conf->base_url && $this->hubUrl && $this->selfUrl) {
+ if (FreshRSS_Context::$system_conf->base_url && $this->hubUrl && $this->selfUrl && @is_dir(PSHB_PATH)) {
$path = PSHB_PATH . '/feeds/' . base64url_encode($this->selfUrl);
$hubFilename = $path . '/!hub.json';
if ($hubFile = @file_get_contents($hubFilename)) {