diff options
| author | 2018-01-02 23:53:35 +0100 | |
|---|---|---|
| committer | 2018-01-02 23:53:35 +0100 | |
| commit | 7642d334f827d1c077bb1444dfc4e79acf022891 (patch) | |
| tree | 904bb76cc119ff6d7a806cefd3c1fabbdebf2233 /app/views/helpers/feed/update.phtml | |
| parent | e3ffc048d7a10a6116cf80fb6fceda0b4037368c (diff) | |
Replace "keep history" magic value by a constant (#1759)
I think the use of a magic value repeated many times in the code is prone to have some errors made by people not knowing its meaning. Using a constant is a bit more safe. Judging by some comments in the code, I am not the only one.
Diffstat (limited to 'app/views/helpers/feed/update.phtml')
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 595309f49..d379c5df8 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -101,7 +101,7 @@ <label class="group-name" for="keep_history"><?php echo _t('sub.feed.keep_history'); ?></label> <div class="group-controls"> <select class="number" name="keep_history" id="keep_history" required="required"><?php - foreach (array('' => '', -2 => _t('gen.short.by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) { + foreach (array('' => '', FreshRSS_Feed::KEEP_HISTORY_DEFAULT => _t('gen.short.by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', FreshRSS_Feed::KEEP_HISTORY_INFINITE => '∞') as $v => $t) { echo '<option value="' . $v . ($this->feed->keepHistory() === $v ? '" selected="selected' : '') . '">' . $t . '</option>'; } ?></select> |
