mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #1252
This commit is contained in:
parent
f07dc7bd81
commit
0b8654d865
@ -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 Controller
|
||||
|
||||
if ($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!
|
||||
|
Loading…
Reference in New Issue
Block a user