diff options
| author | 2016-10-12 10:00:14 +0200 | |
|---|---|---|
| committer | 2016-10-12 10:00:14 +0200 | |
| commit | 2630393587fccb8f14c1b61208debc30d314c015 (patch) | |
| tree | f5110355f065df187d76e9009f1b3cbbe50a7640 | |
| parent | 3e158b5e7490cf4f7ecd7c35a6738f035378513d (diff) | |
| parent | f080774059232de636d08a0ad76bb60fd91be657 (diff) | |
Merge pull request #1304 from Alkarex/favicon-refresh
Randomize favicon refresh
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | p/f.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f05b77c8..68967bbba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ * In a multi-user context, take better advantage of other users’ refreshes [#1280](https://github.com/FreshRSS/FreshRSS/pull/1280) * Support custom ports `localhost:3306` for database servers [#1241](https://github.com/FreshRSS/FreshRSS/issues/1241) * Add date to exported files [#1240](https://github.com/FreshRSS/FreshRSS/issues/1240) - * Auto-refresh favicons after 15 days [#1181](https://github.com/FreshRSS/FreshRSS/issues/1181) + * Auto-refresh favicons once or twice a month [#1181](https://github.com/FreshRSS/FreshRSS/issues/1181), [#1298](https://github.com/FreshRSS/FreshRSS/issues/1298) * Bug fixing * Correction of bugs related CSRF tokens introduced in version 1.5.0 [#1253](https://github.com/FreshRSS/FreshRSS/issues/1253), [44f22ab](https://github.com/FreshRSS/FreshRSS/pull/1261/commits/d9bf9b2c6f0b2cc9dec3b638841b7e3040dcf46f) * Fix bug in Global view introduced in version 1.5.0 [#1269](https://github.com/FreshRSS/FreshRSS/pull/1269) @@ -71,7 +71,7 @@ $txt_mtime = @filemtime($txt); header('Content-Type: image/x-icon'); -if ($ico_mtime == false || $txt_mtime > $ico_mtime || ($ico_mtime < time() - 15 * 86400)) { +if ($ico_mtime == false || $txt_mtime > $ico_mtime || ($ico_mtime < time() - (rand(15, 20) * 86400))) { if ($txt_mtime == false) { show_default_favicon(1800); exit(); @@ -92,6 +92,6 @@ if ($ico_mtime == false || $txt_mtime > $ico_mtime || ($ico_mtime < time() - 15 header('Content-Disposition: inline; filename="' . $id . '.ico"'); -if (!httpConditional($ico_mtime, 2592000, 2)) { +if (!httpConditional($ico_mtime, rand(14, 21) * 86400, 2)) { readfile($ico); } |
