diff options
| author | 2014-07-06 10:12:37 +0200 | |
|---|---|---|
| committer | 2014-07-06 10:12:37 +0200 | |
| commit | 3d3b33ea2e3f00a3de154086341c1fc2abcadc3e (patch) | |
| tree | d3c33ece2febe091eee5a9cbde5e3e702c215d37 /app | |
| parent | 72924cb5fecce336dce5b252f719a50af0981f12 (diff) | |
Bug global TTL
https://github.com/marienfressinaud/FreshRSS/issues/250
Diffstat (limited to 'app')
| -rw-r--r-- | app/Models/FeedDAO.php | 3 | ||||
| -rw-r--r-- | app/views/configure/archiving.phtml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 83f3a6231..756b1f008 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -223,6 +223,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { } public function listFeedsOrderUpdate($defaultCacheDuration = 3600) { + if ($defaultCacheDuration < 0) { + $defaultCacheDuration = 2147483647; + } $sql = 'SELECT id, url, name, website, lastUpdate, pathEntries, httpAuth, keep_history, ttl ' . 'FROM `' . $this->prefix . 'feed` ' . 'WHERE ttl <> -1 AND lastUpdate < (' . (time() + 60) . '-(CASE WHEN ttl=-2 THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ' diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml index 04fa19b0d..c9cc7fe02 100644 --- a/app/views/configure/archiving.phtml +++ b/app/views/configure/archiving.phtml @@ -25,7 +25,7 @@ </div> </div> <div class="form-group"> - <label class="group-name" for="ttl_default"><?php echo Minz_Translate::t('ttl'), ' ', Minz_Translate::t('by_feed'); ?></label> + <label class="group-name" for="ttl_default"><?php echo Minz_Translate::t('ttl'); ?></label> <div class="group-controls"> <select class="number" name="ttl_default" id="ttl_default" required="required"><?php $found = false; |
