diff options
| author | 2016-03-11 22:57:20 +0100 | |
|---|---|---|
| committer | 2016-03-11 22:57:20 +0100 | |
| commit | 8dcc0fd65a36adedb12e5d54bafb39e7e553d38b (patch) | |
| tree | bf47fd99928a6782a309cdd1171516029d4f9611 /app/Models/Feed.php | |
| parent | 919c9c83013ea310f01c309f00dea3f8afa9033e (diff) | |
| parent | 8f4c61a4154641ac22e6d541b6994add3c4803cb (diff) | |
Merge pull request #1119 from FreshRSS/dev1.3.1-beta
Merge dev in 1.3.1-beta
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 23491ee8d..986cc5015 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -451,6 +451,10 @@ class FreshRSS_Feed extends Minz_Model { Minz_Log::warning('Invalid callback for PubSubHubbub: ' . $this->url); return false; } + if (!$state) { //unsubscribe + $hubJson['lease_end'] = time() - 60; + file_put_contents($hubFilename, json_encode($hubJson)); + } $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $this->hubUrl, @@ -470,11 +474,6 @@ class FreshRSS_Feed extends Minz_Model { 'PubSubHubbub ' . ($state ? 'subscribe' : 'unsubscribe') . ' to ' . $this->selfUrl . ' with callback ' . $callbackUrl . ': ' . $info['http_code'] . ' ' . $response . "\n", FILE_APPEND); - if (!$state) { //unsubscribe - $hubJson['lease_end'] = time() - 60; - file_put_contents($hubFilename, json_encode($hubJson)); - } - if (substr($info['http_code'], 0, 1) == '2') { return true; } else { |
