diff options
| author | 2016-07-23 17:11:38 +0200 | |
|---|---|---|
| committer | 2016-07-23 17:11:38 +0200 | |
| commit | 3f705cf03ccd919e0930bc3e95b98daff9f0560a (patch) | |
| tree | e12c530198e3d5ee7032d5aaa381e7ecc8781cdf /app/Models/Feed.php | |
| parent | ca6ca218dca17c3806191f72fa2b3fe02acc1692 (diff) | |
| parent | 43f3be7098a908321c29a14a1fbe542389479155 (diff) | |
Merge branch 'dev'
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 { |
