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.
This commit is contained in:
Alexis Degrugillier
2018-01-02 23:53:35 +01:00
committed by Alexandre Alapetite
parent e3ffc048d7
commit 7642d334f8
8 changed files with 17 additions and 17 deletions

View File

@@ -104,7 +104,7 @@ class FreshRSS_subscription_Controller extends Minz_ActionController {
'pathEntries' => Minz_Request::param('path_entries', ''),
'priority' => intval(Minz_Request::param('priority', FreshRSS_Feed::PRIORITY_MAIN_STREAM)),
'httpAuth' => $httpAuth,
'keep_history' => intval(Minz_Request::param('keep_history', -2)),
'keep_history' => intval(Minz_Request::param('keep_history', FreshRSS_Feed::KEEP_HISTORY_DEFAULT)),
'ttl' => $ttl * ($mute ? -1 : 1),
);