diff options
| author | 2016-09-25 01:26:07 +0200 | |
|---|---|---|
| committer | 2016-09-25 01:26:07 +0200 | |
| commit | 0180fb315c9cd43b732e6557995e3131b28e32da (patch) | |
| tree | b71b3c48a78071e333332c586110ea0b93de18cf /app/Models | |
| parent | 7ac1f8e0ea861081263555d1b74206428309fd01 (diff) | |
| parent | eebeb02eceb4d0716eb96ff5ba32179c5bd18459 (diff) | |
Merge pull request #1261 from Alkarex/api-edit
API edit feeds and categories
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Feed.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 4403a23c4..f2f345662 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -216,7 +216,7 @@ class FreshRSS_Feed extends Minz_Model { $this->nbEntries = intval($value); } - public function load($loadDetails = false) { + public function load($loadDetails = false, $noCache = false) { if ($this->url !== null) { if (CACHE_PATH === false) { throw new Minz_FileNotExistException( @@ -268,7 +268,7 @@ class FreshRSS_Feed extends Minz_Model { $this->_url($clean_url); } - if (($mtime === true) || ($mtime > $this->lastUpdate)) { + if (($mtime === true) || ($mtime > $this->lastUpdate) || $noCache) { //Minz_Log::debug('FreshRSS no cache ' . $mtime . ' > ' . $this->lastUpdate . ' for ' . $clean_url); $this->loadEntries($feed); // et on charge les articles du flux } else { @@ -460,7 +460,7 @@ class FreshRSS_Feed extends Minz_Model { CURLOPT_URL => $this->hubUrl, CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, - CURLOPT_USERAGENT => _t('gen.freshrss') . '/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')', + CURLOPT_USERAGENT => 'FreshRSS/' . FRESHRSS_VERSION . ' (' . PHP_OS . '; ' . FRESHRSS_WEBSITE . ')', CURLOPT_POSTFIELDS => 'hub.verify=sync' . '&hub.mode=' . ($state ? 'subscribe' : 'unsubscribe') . '&hub.topic=' . urlencode($this->selfUrl) |
