Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #1252
James Cole0b8654d8650b
diff --git a/app/Http/Controllers/Admin/UpdateController.php b/app/Http/Controllers/Admin/UpdateController.phpindex 11703231b3..9777f9a5bf 100644--- a/app/Http/Controllers/Admin/UpdateController.php+++ b/app/Http/Controllers/Admin/UpdateController.php@@ -22,6 +22,7 @@ declare(strict_types=1);namespace FireflyIII\Http\Controllers\Admin;+use Carbon\Carbon;use FireflyConfig;use FireflyIII\Exceptions\FireflyException;use FireflyIII\Http\Controllers\Controller;@@ -120,12 +121,20 @@ class UpdateController extends Controllerif ($check === -1) {// there is a new FF version!- $string = strval(- trans(- 'firefly.update_new_version_alert',- ['your_version' => $current, 'new_version' => $first->getTitle(), 'date' => $first->getUpdated()->formatLocalized($this->monthAndDayFormat)]- )- );+ // has it been released for more than three days?+ $today = new Carbon;+ if ($today->diffInDays($first->getUpdated(), true) > 3) {+ $string = strval(+ trans(+ 'firefly.update_new_version_alert',+ [+ 'your_version' => $current,+ 'new_version' => $first->getTitle(),+ 'date' => $first->getUpdated()->formatLocalized($this->monthAndDayFormat),+ ]+ )+ );+ }}if ($check === 0) {// you are running the current version!